Skip to content

codewithkenzo/exaflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

exaflow logo

ExaFlow: Advanced Semantic Search & AI Integration

npm version License: MIT TypeScript Bun

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 exaflow

Using npm

npm install -g exaflow

Verify

exaflow --version

Setup

Create a .env file with your Exa API key:

EXA_API_KEY=your_exa_api_key_here

Usage

πŸ“š 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 binary

Options

-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.ts

Response 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 development

Performance

  • ⚑ 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

Built With

  • Exa - Neural search API
  • Bun - JavaScript runtime
  • MCP - AI integration
  • TypeScript - Type safety

semantic-search exa-api ai-integration mcp-protocol typescript cli-tool

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •