exaflow
v2.4.0
Published
π Advanced semantic search & AI integration toolkit with Exa API and MCP server support
Maintainers
Readme
ExaFlow: Advanced Semantic Search & AI Integration
AI-Powered Search β’ Intelligent Content β’ MCP Integration β’ Lightning Fast
What is ExaFlow?
Semantic search toolkit for AI applications. Built with TypeScript, ExaFlow combines Exa's neural search with intelligent caching, real-time streaming, and MCP integration.
Perfect for:
- π€ AI applications with enhanced search
- π¬ Research automation & multi-step pipelines
- π° Content analysis with live crawling
- π οΈ Developer tools & CLI workflows
- π’ Enterprise search with advanced filtering
Installation
Using Bun (Recommended)
bun install -g exaflowUsing npm
npm install -g exaflowVerify
exaflow --versionSetup
Create a .env file with your Exa API key:
EXA_API_KEY=your_exa_api_key_hereUsage
π Context API
Get code & technical content with token limits.
exaflow context "React hooks patterns" --tokens 3000
exaflow context "TypeScript patterns" --tokens 5000π Search API
Semantic search with neural ranking.
exaflow search "machine learning trends 2024" --type neural --num-results 20
exaflow search "AI research papers" --type neural --include-contentsπ Contents API
Extract content from URLs with live crawling.
exaflow contents --ids urls.txt --livecrawl always --subpages 5
exaflow contents --stdin --subpage-target "about,news"π Websets API
Async search with enrichment & polling.
WEBSET_ID=$(exaflow websets create --output json | jq -r '.data.webset.id')
exaflow websets search --webset-id $WEBSET_ID --search-query "AI research"
exaflow websets poll --webset-id $WEBSET_ID㪠Research API
Multi-step research with structured output.
exaflow research --instructions "Analyze latest AI trends" --poll
exaflow research --instructions-file prompt.md --schema output-schema.jsonπ€ MCP Server
Integrate with AI applications.
exaflow mcp-server
exaflow mcp-server --transport http --port 3000
exaflow-mcp # Global binaryOptions
-c, --concurrency <number> # Parallel operations (1-20, default: 5)
-t, --timeout <number> # Request timeout in ms (default: 30000)
--compact # Compact JSON output
--silent # Suppress event streaming
--output <format> # Output format: json|text (default: json)Architecture
src/
βββ clients/ # Exa API clients
β βββ base-client.ts
β βββ exa-context.ts
β βββ exa-search.ts
β βββ exa-contents.ts
β βββ exa-websets.ts
β βββ exa-research.ts
βββ util/ # Utilities
β βββ concurrency.ts
β βββ http.ts
β βββ http-cache.ts
β βββ streaming.ts
β βββ fs.ts
βββ cli.ts
βββ mcp-server.ts
βββ schema.tsResponse Format
All commands return structured JSON with status, timing, citations, and data:
{
"status": "success|partial|error",
"taskId": "unique-task-id",
"timing": {
"startedAt": "2024-01-01T00:00:00Z",
"completedAt": "2024-01-01T00:01:00Z",
"duration": 60000
},
"citations": [
{
"url": "https://example.com",
"title": "Article Title",
"snippet": "Relevant excerpt...",
"author": "Author Name",
"publishedDate": "2024-01-01T00:00:00Z"
}
],
"data": {}
}Development
bun install # Install dependencies
bun run build # Build project
bun run dev # CLI development
bun run dev:mcp # MCP server developmentPerformance
- β‘ 885,371 requests/second - Search throughput
- πΎ 85% cache hit rate - 40% API call reduction
- πͺΆ <1MB footprint - Minimal memory overhead
- π 1-20 parallel ops - Configurable concurrency
Security
- β Comprehensive input validation
- π Secure API key handling
- π Exponential backoff with jitter
- π‘οΈ Graceful degradation on failures
- β±οΈ Per-request timeout controls
License
MIT Β© 2026 - See LICENSE for details.
Links
- π Issues
- π¬ Discussions
- π¦ npm
Built With
- Exa - Neural search API
- Bun - JavaScript runtime
- MCP - AI integration
- TypeScript - Type safety
