-
Couldn't load subscription status.
- Fork 2.3k
feat: add Airweave search tool integration #1656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Conversation
…oai#1608) * improvement(performance): remove unused source/target indices, add index on snapshot id (simstudioai#1603) * fix(blog): rename building to blogs with redirect (simstudioai#1604) * improvement(privacy-policy): updated privacy policy for google (simstudioai#1602) * updated privacy policy for google * update terms, privacy, and emails to incl address and update verbiage * feat(guardrails): added guardrails block/tools and docs (simstudioai#1605) * Adding guardrails block * ack PR comments * cleanup checkbox in dark mode * cleanup * fix supabase tools * fix(inference-billing): fix inference billing when stream is true via API, add drag-and-drop functionality to deployed chat (simstudioai#1606) * fix(inference): fix inference billing when stream is true via API * add drag-and-drop to deployed chat * feat(mistal): added mistral as a provider, updated model prices (simstudioai#1607) * feat(mistal): added mistral as a provider, updated model prices * remove the ability for a block to reference its own outluts * fixed order of responses for guardrails block * feat(versions): added the ability to rename deployment versions (simstudioai#1610) * fix(vulns): fix various vulnerabilities and enhanced code security (simstudioai#1611) * fix(vulns): fix SSRF vulnerabilities * cleanup * cleanup * regen docs * remove unused deps * fix failing tests * cleanup * update deps * regen bun lock
…ad support for more blocks
…OpenTelemetry and Zustand
|
@EwanTauran is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR adds Airweave search tool integration to enable unified search across 30+ connected data sources (Stripe, GitHub, Notion, Slack, etc.). The implementation follows Sim's tool development patterns with proper TypeScript types, parameter visibility, and registry registration.
Key Changes:
- Added tool implementation (
tools/airweave/) with search API integration - Created block configuration (
blocks/blocks/airweave.ts) with UI controls - Registered tool and block in respective registries
- Added layered stack icon for visual identity
Issues Found:
- Missing
offsetsubBlock in UI despite being declared in inputs (affects pagination UX) - Unrelated dependencies added (
@opentelemetry/*,chalk,zustand) - may belong in separate PR or previous commit
Confidence Score: 4/5
- Safe to merge with one logical fix needed for pagination UI completeness
- Implementation follows Sim conventions correctly with proper types, parameter visibility, and tool structure. One logical issue exists where offset input is declared but missing from UI subBlocks. Dependency additions (OpenTelemetry, chalk, zustand) are unrelated to the PR scope and need verification. Core Airweave integration is solid and well-documented.
- Pay attention to
apps/sim/blocks/blocks/airweave.ts(missing offset subBlock) andapps/sim/package.json(unrelated dependencies)
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/tools/airweave/types.ts | 5/5 | Clean type definitions for Airweave API - well-structured with proper TypeScript types |
| apps/sim/tools/airweave/search.ts | 5/5 | Proper tool implementation following Sim conventions, with correct parameter visibility and request structure |
| apps/sim/blocks/blocks/airweave.ts | 4/5 | Block configuration is well-structured, but missing offset subBlock UI despite declaring it in inputs |
| apps/sim/package.json | 3/5 | Added OpenTelemetry, chalk, and zustand dependencies - unclear if needed for Airweave integration |
Sequence Diagram
sequenceDiagram
participant User
participant AirweaveBlock
participant AirweaveSearchTool
participant AirweaveAPI
User->>AirweaveBlock: Configure search (collectionId, query, responseType)
AirweaveBlock->>AirweaveSearchTool: Execute airweave_search tool
AirweaveSearchTool->>AirweaveSearchTool: Build request body (limit, offset, recencyBias)
AirweaveSearchTool->>AirweaveAPI: POST /v1/collections/{id}/search
Note over AirweaveSearchTool,AirweaveAPI: Authorization: Bearer {apiKey}
AirweaveAPI-->>AirweaveSearchTool: JSON response (status, results, completion)
AirweaveSearchTool->>AirweaveSearchTool: Transform response
AirweaveSearchTool-->>AirweaveBlock: ToolResponse (status, results[], completion?)
AirweaveBlock-->>User: Display search results or AI summary
8 files reviewed, 4 comments
| inputs: { | ||
| collectionId: { type: 'string', description: 'Airweave collection ID' }, | ||
| query: { type: 'string', description: 'Search query' }, | ||
| limit: { type: 'number', description: 'Maximum number of results' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: offset input is declared but missing from subBlocks - users can't configure pagination offset in the UI
| limit: { type: 'number', description: 'Maximum number of results' }, | |
| offset: { type: 'number', description: 'Pagination offset (default: 0)' }, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/blocks/blocks/airweave.ts
Line: 84:84
Comment:
**logic:** `offset` input is declared but missing from `subBlocks` - users can't configure pagination offset in the UI
```suggestion
offset: { type: 'number', description: 'Pagination offset (default: 0)' },
```
How can I resolve this? If you propose a fix, please make it concise.| "@opentelemetry/sdk-trace-base": "2.1.0", | ||
| "@opentelemetry/sdk-trace-node": "2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Check if OpenTelemetry dependencies are needed for this PR - they appear unrelated to Airweave integration
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/package.json
Line: 42:43
Comment:
**style:** Check if OpenTelemetry dependencies are needed for this PR - they appear unrelated to Airweave integration
How can I resolve this? If you propose a fix, please make it concise.| "@types/three": "0.177.0", | ||
| "better-auth": "1.3.12", | ||
| "browser-image-compression": "^2.0.2", | ||
| "chalk": "5.6.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Check if chalk is needed for this PR - not used in Airweave integration files
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/package.json
Line: 70:70
Comment:
**style:** Check if `chalk` is needed for this PR - not used in Airweave integration files
How can I resolve this? If you propose a fix, please make it concise.| "uuid": "^11.1.0", | ||
| "xlsx": "0.18.5", | ||
| "zod": "^3.24.2" | ||
| "zod": "^3.24.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Check if zustand is needed for this PR - not used in Airweave integration files
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/package.json
Line: 122:122
Comment:
**style:** Check if `zustand` is needed for this PR - not used in Airweave integration files
How can I resolve this? If you propose a fix, please make it concise.|
@EwanTauran can you rebase with staging, & run the generate-docs script from sim/package.json to auto-gen the tool docs. Thanks!! |
…n gh action for docs (simstudioai#1652) * fix(i18n): fix SDK and guardrails translation corruption * re-enable i18n gh action
…e, and improve performance (simstudioai#1651) * improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve perforamnce * cleanup * cleaned up * ack PR comments
|
rebased with staging and generated docs |
Adds Airweave integration to Sim, enabling agents to search across 30+ connected data sources including Stripe, GitHub, Notion, Slack, HubSpot, Zendesk, and more through a unified search API.
Airweave makes any app searchable by syncing data from various sources with minimal configuration. This integration allows Sim workflows to query internal company data, customer information, and business metrics from all connected sources in a single search.
What is Airweave?
Airweave is an open-source platform that provides unified search across multiple business applications. It:
Why This Integration Matters
Currently, Sim workflows that need to access company data require:
With Airweave, agents can:
Implementation Details
Files Added
Tools:
tools/airweave/types.ts- TypeScript type definitions for Airweave APItools/airweave/search.ts- Search tool implementation with ToolConfigtools/airweave/index.ts- Tool exportsBlock:
blocks/blocks/airweave.ts- Block configuration with UI elementsFiles Modified
components/icons.tsx- AddedAirweaveIcon(layered stack icon)tools/registry.ts- Registeredairweave_searchtoolblocks/registry.ts- RegisteredairweaveblockTool Configuration
Tool ID:
airweave_searchBlock Type:
airweaveCategory: Tools
Authentication: API Key
Parameters:
collectionId(string, required, user-only): The Airweave collection to searchquery(string, required, user-or-llm): Search query textlimit(number, optional, user-only): Maximum results (1-100, default: 10)offset(number, optional, user-only): Pagination offset (default: 0)responseType(string, optional, user-only): 'raw' for results or 'completion' for AI summaryrecencyBias(number, optional, user-only): Time-weighted ranking (0.0-1.0, default: 0.0)apiKey(string, required, user-only): Airweave API keyOutputs:
status(string): Search operation status (success, no_results, no_relevant_results)results(array): Search results with content, metadata, and relevance scorescompletion(string, optional): AI-generated answer when using completion modeBlock Features
Usage Examples
As Standalone Block
Search for customer feedback across all connected platforms:
As Agent Tool
Enable agents to search company knowledge automatically:
Example interaction:
Real-World Scenario: Multi-Source Customer Research
What the agent can do:
All with a single query like: "What's the history with Acme Corp?"
Integration Benefits
For Workflows
For Agents
For Users
Technical Compliance
✅ Follows SimStudio Guidelines:
AirweaveBlock,AirweaveIcon,airweave_search){provider}_{tool_name}✅ Code Quality:
✅ Documentation Ready:
Setup Requirements
For Users
For Developers
No additional dependencies required. All necessary types are included.
Testing Checklist
scripts/generate-docs.sh(post-merge potentially? wdyt sim team)Screenshots
Will be added after successful CI/CD run and local testing in clean environment
Related Resources
Breaking Changes
None - this is a new integration with no impact on existing functionality.
Future Enhancements
Potential follow-ups (probably not in this PR):
Addresses issue #1657