Exa-powered agents can search the web semantically, find current information, and cite sources—making them ideal for research, fact-checking, and knowledge-intensive tasks.
Quick Start
- Python
- JavaScript
- cURL
Exa Search Configuration
Exa provides semantic search capabilities that go beyond keyword matching. Web search is enabled per-request by adding"auto_search" to the tools_enabled list on the agent completion body (a sibling of agent_config, not a field inside it).
Configuration Options
Search depth and result formatting are controlled by the agent itself (via its
system_prompt and reasoning), not by request-level parameters — there are no exa_search_num_results or exa_search_max_characters fields to tune.
Recommended Configuration
Enable search the same way regardless of how much research the task needs — depth is a function of the task and system prompt, not a tunable request parameter:Use Cases
Market Research Agent
Technical Documentation Research
News and Current Events
Academic Research Assistant
Using Exa with Multi-Agent Systems
Combine Exa search with multi-agent architectures for sophisticated research workflows.tools_enabled (and therefore auto_search) is only available on /v1/agent/completions (single-agent runs). The /v1/swarm/completions endpoint has no tools_enabled field, so web search cannot be enabled directly on a swarm — give individual agents search-oriented system prompts, or run a search-enabled single agent as a preprocessing step and feed its findings into the swarm’s task.Research Team with Specialized Agents
Best Practices
1. Craft Effective Search-Oriented Prompts
Structure your system prompts to leverage search capabilities:2. Match Prompt Depth to Task Complexity
Sinceauto_search has no tunable result-count or snippet-length parameters, control research depth through the system prompt instead — instruct the agent how many sources to consult and how thoroughly to synthesize them for the task at hand (quick fact lookup vs. comprehensive analysis).
3. Use Appropriate Temperature Settings
- Factual research (0.1-0.2): When accuracy is critical
- Balanced analysis (0.3-0.4): For synthesis and interpretation
- Creative exploration (0.5-0.7): For brainstorming and ideation
4. Handle Time-Sensitive Information
For topics where recency matters, include temporal context in your task:5. Request Source Citations
Include citation requirements in your system prompt:Error Handling
Response Format
Search-enabled agents return the standard/v1/agent/completions response shape. The outputs field contains the agent’s final synthesized answer (including any citations the agent chose to include in its text) — there is no separate structured search_results array; source handling happens inside the agent’s tool call and reasoning, not as a distinct response field.
total_cost in usage reflects token costs only. The flat $0.04 auto_search tool fee is deducted from your account credits separately and does not appear in this usage object.
Cost Optimization
Eachauto_search tool call costs a flat $0.04 (search_cost), deducted from your account credits, on top of normal token costs. Optimize usage with these strategies:
- Only enable search when needed: Omit
tools_enabled(or leaveauto_searchout of it) for tasks that don’t require live web data — you’ll skip the $0.04 fee entirely. - Cache research results: Store responses for repeated similar queries instead of re-running search.
- Use appropriate models: Use
gpt-4.1-minifor simpler research tasks to reduce token costs. - Limit output length: Set a smaller
max_tokensonagent_configto control response length and cost.
Related Resources
- Search-Enabled Agents - Basic search configuration
- Multi-Agent Workflows - Combining search with swarms