Web Search & Deep Research
AI-powered web search with Exa for real-time information retrieval
Web Search & Deep Research
Eden Stack uses Exa for AI-powered web search and deep research capabilities.
Why Exa over Perplexity?
We evaluated both Exa and Perplexity's APIs for web search integration. Here's why we chose Exa:
| Feature | Exa | Perplexity |
|---|---|---|
| Search Accuracy | 90.04% (SimpleQA) | 88.70% (SimpleQA) |
| Domain Filtering | Up to 1,200 domains | Up to 20 domains |
| Max Results | 100 per request | 20 per request |
| Rate Limits | 5-100 QPS | 1-30 QPS |
| Full Page Content | Yes | No |
| Structured Output | Custom JSON schemas | Fixed format |
| Developer Control | Flexible search types | Limited options |
Key Advantages
-
Full Developer Control - Choose between keyword search, neural search, or hybrid approaches based on your quality, speed, or cost needs.
-
Content Retrieval - Get URLs, full page contents, snippets, or structured output based on custom schemas. Perplexity only returns LLM-generated answers.
-
Higher Limits - Up to 100 QPS for high-throughput applications vs Perplexity's 30 QPS maximum.
-
Deep Research API - Async multi-step research pipeline that decomposes complex questions into search queries, synthesizes findings, and returns grounded reports with citations.
Integration in Eden Stack
Chat Web Search (Tool-based)
In the chat interface, Claude automatically decides when to search the web using Exa as a tool:
import { exaWebSearch } from "@eden/ai/tools";
const response = await streamText({
model: anthropic("claude-sonnet-4-20250514"),
messages,
tools: {
webSearch: exaWebSearch(),
},
maxSteps: 5,
});No toggle needed - the AI decides when current web information would help answer the question.
Deep Research (Event-driven)
For comprehensive research tasks, use the durable Inngest-powered deep research:
// POST /agents/deep-research
const response = await fetch("/agents/deep-research", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
query: "What are the latest developments in AI agents?",
userId: "user_123",
model: "exa-research", // or "exa-research-pro" for higher quality
}),
});
const { jobId } = await response.json();
// Returns immediately with jobId
// Poll for results
const result = await fetch(`/agents/deep-research/${jobId}`);
// Or wait for push notification on mobileThe deep research flow:
- Request → Creates job in database, fires Inngest event
- Inngest Function → Runs Exa research with retries
- Completion → Stores results, sends push notification
- Client → Polls for results or receives push notification
Direct SDK Usage
For custom integrations, use the Exa SDK directly:
import { exaDeepResearch, exaSearch } from "@eden/agents";
// Quick search with contents
const quickResults = await exaSearch("React Server Components best practices");
// Deep research (20-90 seconds, multi-step)
const research = await exaDeepResearch(
"Compare GPU architectures from NVIDIA, AMD, and Intel in 2024",
{
model: "exa-research-pro",
outputSchema: {
type: "object",
properties: {
gpus: {
type: "array",
items: {
type: "object",
properties: {
manufacturer: { type: "string" },
model: { type: "string" },
msrpUsd: { type: "number" },
},
},
},
},
},
}
);Environment Setup
Add your Exa API key to .env:
# Get from: https://dashboard.exa.ai
EXA_API_KEY=your-exa-api-keyPricing
Exa uses usage-based pricing:
| Operation | exa-research | exa-research-pro |
|---|---|---|
| Search | $5/1k searches | $5/1k searches |
| Page Read | $5/1k pages | $10/1k pages |
| Reasoning | $5/1M tokens | $5/1M tokens |
A typical deep research task costs ~$0.10-0.25.
Next Steps
- AI Features - Chat completions and agent networks
- Background Jobs - Inngest integration details
- Document Processing - Extract text from PDFs and documents
Full documentation for Eden Stack users
This documentation is exclusively available to Eden Stack customers. Already purchased? Log in to access the full content.