PluginWorks in Claude CodeCurrent
Exa
Exa AI web search, deep research, and content extraction. Provides MCP tools and research skills for comprehensive web search, people discovery, company research, academic papers, and more.
0
Try it
See what this would do for you. No sign-up needed.
Install in Claude Code
Run these in Claude Code, in order. The first adds the marketplace, the second installs the plugin.
Step 1
/plugin marketplace add anthropics/claude-plugins-official
Step 2
/plugin install exa@claude-plugins-official
Review commands before running them. Promptu never runs code on your machine or pushes changes to your repo.
What's inside
2 skills
- exa-agent
- search
1 MCP server
Security scan
Flagged
Promptu's text scan flagged something in this plugin. Read its files before you install it.
long-encoded-blob in README.md:13
Details
<h1 align="center">
<img src="assets/Exa.svg" alt="Exa" width="64" />
<br>
Exa MCP Server
</h1>
<p align="center">Connect AI agents to Exa for web search, content fetching, and multi-step research.</p>
<p align="center">
<a href="https://cursor.com/en/install-mcp?name=exa&config=eyJ1cmwiOiJodHRwczovL21jcC5leGEuYWkvbWNwIn0="><img src="https://custom-icon-badges.demolab.com/badge/Install_in_Cursor-000000?style=for-the-badge&logo=cursor-ai-white" alt="Install in Cursor" /></a>
<a href="https://vscode.dev/redirect/mcp/install?name=exa&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.exa.ai%2Fmcp%22%7D"><img src="https://custom-icon-badges.demolab.com/badge/Install_in_VS_Code-007ACC?style=for-the-badge&logo=vsc&logoColor=white" alt="Install in VS Code" /></a>
<a href="https://claude.com/plugins/exa"><img src="https://img.shields.io/badge/Claude_Plugin-C66140?style=for-the-badge&logo=claude&logoColor=white" alt="Install Claude Plugin" /></a>
<a href="https://chatgpt.com/plugins/exa?open_in_app"><img src="https://img.shields.io/badge/Codex%2FChatGPT_Plugin-4A5BFE?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0yMi4yODE5IDkuODIxMWE1Ljk4NDcgNS45ODQ3IDAgMCAwLS41MTU3LTQuOTEwOCA2LjA0NjIgNi4wNDYyIDAgMCAwLTYuNTA5OC0yLjlBNi4wNjUxIDYuMDY1MSAwIDAgMCA0Ljk4MDcgNC4xODE4YTUuOTg0NyA1Ljk4NDcgMCAwIDAtMy45OTc3IDIuOSA2LjA0NjIgNi4wNDYyIDAgMCAwIC43NDI3IDcuMDk2NiA1Ljk4IDUuOTggMCAwIDAgLjUxMSA0LjkxMDcgNi4wNTEgNi4wNTEgMCAwIDAgNi41MTQ2IDIuOTAwMUE1Ljk4NDcgNS45ODQ3IDAgMCAwIDEzLjI1OTkgMjRhNi4wNTU3IDYuMDU1NyAwIDAgMCA1Ljc3MTgtNC4yMDU4IDUuOTg5NCA1Ljk4OTQgMCAwIDAgMy45OTc3LTIuOTAwMSA2LjA1NTcgNi4wNTU3IDAgMCAwLS43NDc1LTcuMDcyOXptLTkuMDIyIDEyLjYwODFhNC40NzU1IDQuNDc1NSAwIDAgMS0yLjg3NjQtMS4wNDA4bC4xNDE5LS4wODA0IDQuNzc4My0yLjc1ODJhLjc5NDguNzk0OCAwIDAgMCAuMzkyNy0uNjgxM3YtNi43MzY5bDIuMDIgMS4xNjg2YS4wNzEuMDcxIDAgMCAxIC4wMzguMDUydjUuNTgyNmE0LjUwNCA0LjUwNCAwIDAgMS00LjQ5NDUgNC40OTQ0em0tOS42NjA3LTQuMTI1NGE0LjQ3MDggNC40NzA4IDAgMCAxLS41MzQ2LTMuMDEzN2wuMTQyLjA4NTIgNC43ODMgMi43NTgyYS43NzEyLjc3MTIgMCAwIDAgLjc4MDYgMGw1Ljg0MjgtMy4zNjg1djIuMzMyNGEuMDgwNC4wODA0IDAgMCAxLS4wMzMyLjA2MTVMOS43NCAxOS45NTAyYTQuNDk5MiA0LjQ5OTIgMCAwIDEtNi4xNDA4LTEuNjQ2NHpNMi4zNDA4IDcuODk1NmE0LjQ4NSA0LjQ4NSAwIDAgMSAyLjM2NTUtMS45NzI4VjExLjZhLjc2NjQuNzY2NCAwIDAgMCAuMzg3OS42NzY1bDUuODE0NCAzLjM1NDMtMi4wMjAxIDEuMTY4NWEuMDc1Ny4wNzU3IDAgMCAxLS4wNzEgMGwtNC44MzAzLTIuNzg2NUE0LjUwNCA0LjUwNCAwIDAgMSAyLjM0MDggNy44NzJ6bTE2LjU5NjMgMy44NTU4TDEzLjEwMzggOC4zNjQgMTUuMTE5MiA3LjJhLjA3NTcuMDc1NyAwIDAgMSAuMDcxIDBsNC44MzAzIDIuNzkxM2E0LjQ5NDQgNC40OTQ0IDAgMCAxLS42NzY1IDguMTA0MnYtNS42NzcyYS43OS43OSAwIDAgMC0uNDA3LS42Njd6bTIuMDEwNy0zLjAyMzFsLS4xNDItLjA4NTItNC43NzM1LTIuNzgxOGEuNzc1OS43NzU5IDAgMCAwLS43ODU0IDBMOS40MDkgOS4yMjk3VjYuODk3NGEuMDY2Mi4wNjYyIDAgMCAxIC4wMjg0LS4wNjE1bDQuODMwMy0yLjc4NjZhNC40OTkyIDQuNDk5MiAwIDAgMSA2LjY4MDIgNC42NnpNOC4zMDY1IDEyLjg2M2wtMi4wMi0xLjE2MzhhLjA4MDQuMDgwNCAwIDAgMS0uMDM4LS4wNTY3VjYuMDc0MmE0LjQ5OTIgNC40OTkyIDAgMCAxIDcuMzc1Ny0zLjQ1MzdsLS4xNDIuMDgwNUw4LjcwNCA1LjQ1OWEuNzk0OC43OTQ4IDAgMCAwLS4zOTI3LjY4MTN6bTEuMDk3Ni0yLjM2NTRsMi42MDItMS40OTk4IDIuNjA2OSAxLjQ5OTh2Mi45OTk0bC0yLjU5NzQgMS40OTk3LTIuNjA2Ny0xLjQ5OTdaIi8+PC9zdmc+" alt="Install Codex/ChatGPT Plugin" /></a>
</p>
<p align="center">
<a href="https://docs.exa.ai/reference/exa-mcp"><b>Documentation</b></a>
·
<a href="https://www.npmjs.com/package/exa-mcp-server"><b>NPM Package</b></a>
·
<a href="https://dashboard.exa.ai/api-keys"><b>Get your API key</b></a>
</p>
## Installation
Connect to Exa's hosted MCP server:
```
https://mcp.exa.ai/mcp
```
Or use a plugin when your client supports one.
### Agent Plugin
This repository is an [Agent Plugin](https://agent-plugins.org). Install it with any [compatible client](https://agent-plugins.org/compatible-clients).
### Claude
Install from the [Claude Plugin Marketplace](https://claude.com/plugins/exa), or run:
```bash
claude plugin install exa@claude-plugins-official
```
### Codex / ChatGPT
Install via [Plugins in ChatGPT](https://chatgpt.com/plugins/exa), or run:
```bash
codex mcp add exa --url https://mcp.exa.ai/mcp
```
### Other MCP Clients
Most clients can be configured manually with the standard `mcpServers` shape:
```json
{
"mcpServers": {
"exa": {
"type": "streamable-http",
"url": "https://mcp.exa.ai/mcp",
}
}
}
```
<details>
<summary><b>Client-specific configs</b></summary>
Exa MCP works with most other clients, point them at `https://mcp.exa.ai/mcp`.
| Client | Where to add it |
| --- | --- |
| Kiro | Use the [Kiro power](https://github.com/exa-labs/kiro-power-exa), or add manually to `~/.kiro/settings/mcp.json` |
| LM Studio | [Add to LM Studio](https://lmstudio.ai/install-mcp?name=exa&config=eyJ1cmwiOiJodHRwczovL21jcC5leGEuYWkvbWNwIn0%3D), or add manually to `mcp.json` |
| Replit | [Add to Replit](https://replit.com/integrations?mcp=) |
| Grok Build | `/marketplace` → install **Exa**, then `/mcp` to sign in |
| Gemini CLI | Add manually to `~/.gemini/settings.json` |
| OpenCode | Add manually to `opencode.json` |
| Windsurf | Add manually to `~/.codeium/windsurf/mcp_config.json` |
| Google Antigravity | Add manually to `mcp_config.json` |
| Zed | Add manually to `settings.json` under `context_servers` |
| Warp | [Settings → Agents → MCP servers](warp://settings/mcp) |
| v0 by Vercel | [Settings → MCP connections](https://v0.app/settings/mcp-connections) |
</details>
## Available Tools
### Default Tools
| Tool | Description |
| --- | --- |
| `web_search_exa` | Search the web for any topic and get clean, ready-to-use content |
| `web_fetch_exa` | Read a webpage's full content as clean markdown from one or more URLs |
### Optional Tools (enable via the `tools` parameter)
| Tool | Description |
| --- | --- |
| `agent_run` | Run an [Exa Agent](https://docs.exa.ai/reference/agent-api-guide) for multi-step research, list-building, enrichment, and structured output |
| `web_search_advanced_exa` | Advanced search with filters, domains, dates, highlights, summaries, and subpage crawling |
Enable tools by appending them to the MCP URL (this will replace the defaults, so include all you want):
```
https://mcp.exa.ai/mcp?tools=web_search_advanced_exa
https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,agent_run
```
Exa Agent requires authentication (OAuth or an [API key](https://dashboard.exa.ai/api-keys)).
## Agent Skills
Skills live in [`skills/`](./skills/) and load with Agent Plugin / Claude plugin installs.
| Skill | Path | Use when |
| --- | --- | --- |
| `search` | [`skills/search/`](./skills/search/SKILL.md) | Deep research, lead gen, competitive analysis, multi-step web investigation |
| `exa-agent` | [`skills/exa-agent/`](./skills/exa-agent/SKILL.md) | Exa Agent runs, enrichment, structured output, Connect providers |
Invoke from your client's skill UI (or `/skill-name` where supported). MCP-only setups still get the tools; skills add orchestration on top.
## Authentication
The hosted MCP server works anonymously with rate limits. For higher limits and access to Exa Agent, use either OAuth or an API key.
**OAuth** is preferred: most clients prompt you to sign in to Exa. To force the login flow (useful for shared connectors and plugins), use `https://mcp.exa.ai/mcp?login` or `https://mcp.exa.ai/mcp/oauth`.
If you prefer, you can get an API key from the [dashboard](https://dashboard.exa.ai/api-keys) and pass it on the URL as `?exaApiKey=…`. You can also send it as a `Authorization: Bearer …` header or an `x-api-key` header.
Built with ❤️ by Exa
## skills/exa-agent/SKILL.md
---
name: exa-agent
description: "Use Exa Agent for multi-step web research, list-building, enrichment, structured output, run continuation, and coverage validation. Exa Agent can access additional data providers: fiber, financial_datasets, similarweb, baselayer, affiliate, particle, and jinko."
---
# Exa Agent Research
You are operating Exa Agent through MCP. Exa Agent is a tool that allows you to run multi-step web research, list-building, enrichment, structured output, run continuation, and coverage validation.
## Required tools
- `agent_run`
## Exa Connect providers
When a run needs premium partner data alongside Exa web search, pass `dataSources` to `agent_run`.
Use only the currently usable self-serve providers:
- `fiber`: B2B company, people, jobs, and contact enrichment
- `financial_datasets`: ticker-based news for US public companies
- `similarweb`: website traffic estimates, rankings, and competitor discovery
- `baselayer`: US business verification, officers, registrations, and KYB
- `affiliate`: product catalog search, pricing, brands, and merchant links
- `particle`: podcast transcript search with speaker attribution and timestamps
- `jinko`: travel destination discovery ranked by fare
Do not suggest request-only providers unless the user explicitly says their Exa account already has them enabled.
## Decision tree
Choose the work surface before acting:
1. Known input rows plus repeated same-shape enrichment at scale
- Write a deterministic script using Exa APIs directly.
- Use bounded concurrency, exponential backoff, checkpoints, and a stable output file.
- Read the output file and synthesize from it.
- Do not burn context manually looping over hundreds of identical tool calls.
2. Open-ended universe definition, list-building, people/company discovery, multi-hop research, structured research, or follow-up over previous work
- Use Exa Agent.
- Define the objective and `outputSchema` before creating the run.
## Before creating a run
Always write down:
- Objective: what the run is meant to answer.
- Universe: what entities qualify.
- Segments: geographies, industries, personas, dates, asset classes, or other partitions.
- Coverage target: desired count, maximum count, and what "good enough" means.
- Output fields: columns needed in the final answer.
- Evidence requirements: URLs, source titles, dates, and confidence.
- Exclusions: prior results or disallowed entities.
If the user uses relative time like "recent", "last 6 months", or "post-IPO", calculate exact dates from today's date first.
## Schema rules
Use `outputSchema` for list-building, enrichment, finance/company research, and repeatable workflows.
Rules:
- Use a top-level object.
- Put list rows in a named array field.
- Add `maxItems` to arrays when possible.
- Include source/evidence fields, not just conclusions.
- Include stable identifiers: company name, website/domain, person LinkedIn URL, ticker, CIK, etc.
- Include confidence or rationale fields for fuzzy judgments.
- Keep required fields limited to what must exist.
- Use `format: "uri"`, `format: "email"`, or `format: "phone"` when needed.
Example company-list schema:
```json
{
"type": "object",
"properties": {
"companies": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"properties": {
"company_name": { "type": "string" },
"website": { "type": "string", "format": "uri" },
"segment": { "type": "string" },
"why_it_qualifies": { "type": "string" },
"evidence_url": { "type": "string", "format": "uri" },
"confidence": { "type": "string", "enum": ["low", "medium", "high"] }
},
"required": ["company_name", "website", "why_it_qualifies", "evidence_url"]
}
},
"coverage_notes": { "type": "string" },
"known_gaps": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["companies", "coverage_notes"]
}
```
Example with Exa Connect:
```json
{
"tool": "agent_run",
"arguments": {
"query": "Find 10 fast-growing B2B SaaS companies and return estimated monthly website visits from Similarweb.",
"dataSources": [
{ "provider": "similarweb" }
],
"outputSchema": {
"type": "object",
"properties": {
"companies": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"domain": { "type": "string" },
"monthlyVisits": {
"type": "number",
"description": "Estimated monthly visits from Similarweb"
}
},
"required": ["name", "domain", "monthlyVisits"]
}
}
},
"required": ["companies"]
}
}
}
```
## Exa Agent workflow
1. Run the agent
- Call `agent_run`.
- Omit `effort` to use the tool's `low` default. Choose `auto` or a higher effort only when the user asks for more depth or the task clearly requires it.
- Include `outputSchema` for structured work.
- Use `input.data` for known rows.
- Use `input.exclusion` for entities already returned or disallowed.
- Add `dataSources` only when one of the self-serve Exa Connect providers is clearly useful.
- Name the provider-specific data you want in both the query and the schema so Agent uses the provider instead of falling back to web search.
- Save the returned `id` when a later continuation may use `previousRunId`.
- If the response has `status: "running"`, call `agent_run` again with that `runId` until `outputReady` is true. This continuation is available for retained runs that outlive one MCP call.
- Zero Data Retention (ZDR) teams: new runs always stream, and output is only available on that live stream (not via `runId` resumption). The MCP call window is ~750 seconds; if a ZDR run cannot finish in one call, retry with lower effort or split the task. `previousRunId` is not available on ZDR.
2. Read the result
- Wait until `outputReady` is true (or status is failed/cancelled).
- Read both `output.structured` and `output.grounding`.
- Do not assume results are exhaustive just because the run completed.
3. Validate coverage
- Check row count against target.
- Check segment coverage.
- Deduplicate entities.
- Inspect evidence quality.
- Identify gaps.
4. Continue if needed
- Use `agent_run` with `previousRunId` for follow-up/refinement.
- Use `input.exclusion` to avoid resurfacing prior results.
- Segment large universes into multiple runs if one run is too broad.
5. Final answer
- State what was done.
- Present structured results.
- State coverage and limitations.
- Say "best-effort discovery" unless exhaustiveness was explicitly scoped and validated.
## Continuation patterns
Use `previousRunId` when:
- narrowing a list
- filling missing fields
- asking for another segment
- validating a prior set
- requesting "more like these"
Do not use `previousRunId` when:
- the prior run failed or is still running
- the new task is unrelated
- you need clean independent coverage for another segment
For independent segments, create separate runs and aggregate results yourself.
## Exhaustiveness and coverage language
Never claim exhaustive coverage unless all are true:
- The universe is bounded and well-defined.
- Search/discovery strategy covers the main segments.
- The output count and gaps were checked.
- Duplicates were resolved.
- Evidence was inspected.
- Any remaining unknowns are disclosed.
Preferred language when not fully validated:
- "best-effort discovery"
- "high-confidence initial universe"
- "not exhaustive"
- "coverage appears strongest in X and weaker in Y"
Avoid:
- "all companies"
- "complete list"
- "exhaustive"
- "definitive"
unless validation supports it.
## Batch Script Mode
If the task requires many parallel Exa calls of the same shape, especially batch enrichment over known companies/people:
1. Write a script instead of issuing many MCP calls manually.
2. The script must:
- read deterministic inputs from a file
- use bounded concurrency
- use exponential backoff for 429/5xx
- checkpoint partial progress
- write deterministic JSON/CSV/TSV output
- preserve raw API errors per row
3. Run the script.
4. Read the output file.
5. Synthesize from the output.
Use Exa Agent instead of Batch Script Mode when the hard part is discovery, reasoning, multi-hop research, or deciding what to search next.
## Failure handling
If a run fails to start:
- Surface the HTTP error and fix schema/auth/input.
- Do not silently fall back to generic web search for Exa Agent-shaped work.
If the run fails:
- Explain the failure from the returned terminal status.
- Create a corrected follow-up/new run only if the correction is clear.
If the run objective/schema is wrong, abort the streaming call. The server will attempt to cancel the upstream run; you will then need to create a new run with the corrected objective/schema.
If output is sparse:
- Continue with `previousRunId`.
- Add exclusions for prior results.
- Segment the universe.
- Tighten or clarify schema fields.
## skills/search/SKILL.md
---
name: search
description: "Deep research powered by Exa. Use for lead generation, literature reviews, deep dives, competitive analysis, or any query where one search falls short, including phrases like 'research this', 'find everything about', 'find me all', or 'deep dive on'."
---
# Exa Research Orchestrator
You are the orchestrator. Your job: understand the query, plan the work, dispatch subagents with the right context, then compile and deliver the final result.
## Prerequisites: Auth
Server: `https://mcp.exa.ai/mcp`.
1. **OAuth (recommended)** — client opens `auth.exa.ai`, user signs in with Google / SSO / email, JWT is attached automatically. No key to copy.
2. **API key** — if OAuth isn't available, get one at https://dashboard.exa.ai/api-keys and pass it via `Authorization: Bearer …`, `?exaApiKey=…`, or `EXA_API_KEY` (local npm).
3. **Anonymous** — works without setup but rate-limited.
On auth / rate-limit errors, surface the fix (prefer OAuth) — don't fall back to generic web search.
## Date Calculation (Do This First)
If the query involves time ("last week", "recent", "past 6 months"), calculate exact dates from today's date in your environment context. Write out the calculation explicitly before doing anything else. Never eyeball dates or reuse dates from examples.
## Step 1: Assess the Query
Read the user's query and determine two things:
**How complex is this?**
- **Extremely Simple** (e.g. reading the contents of 1-2 pages): Handle it yourself. Read `references/searching.md` for query-writing guidance, run the searches, review and filter results, then respond directly. No subagents needed.
- **Moderate** (when a fast or low-effort search is requested): Delegate to 1 subagent to keep your context window clean.
- **Advanced** (clear topic, clear filters, a few parallel searches): Light subagent use. One round of parallel subagents, then compile.
- **Complex** (cross-referencing across entity types, multi-hop chains, exhaustive coverage, semantic filtering): Full multi-pass with parallel subagents.
**Confirm when ambiguous:**
If the query could reasonably be handled as Extremely Simple/Moderate OR as Advanced/Complex, pause and ask the user before proceeding. Present:
1. Your interpretation of the query
2. The two (or more) plausible complexity levels
3. What each level would look like in practice (e.g., "I can do a quick 1-2 search lookup, or I can fan out across 3-4 subagents to get deeper coverage")
4. Let the user choose
Examples of ambiguous queries:
- "What are the best LLM fine-tuning frameworks?" — could be a quick opinionated list (Moderate) or an exhaustive evaluated comparison (Complex)
- "Find competitors to Acme Corp" — could be a quick search for known competitors (Moderate) or a deep sweep across funding databases, press, and niche directories (Complex)
- "What's the latest on WebGPU?" — could be one news search (Extremely Simple) or a multi-angle survey of specs, browser support, community adoption, and benchmarks (Advanced)
Do NOT ask for confirmation when:
- The query is clearly extremely simple (fact lookups, single-entity questions)
- The query is clearly complex (explicit multi-constraint, "find everything", "exhaustive", "comprehensive")
- The user has already specified depth ("do a deep dive", "quick answer")
Note: if the user explicitly asks for something (e.g. "100" of something), continue to work until you've achieved it.
**What work needs to happen?** Identify which of these apply (most queries use 3-5):
1. **Seed from user input**: The user provided a list of entities to start from (company names, tickers, paper titles). Each seed becomes a parallel workstream.
2. **Define what qualifies**: What makes a result a valid "row"? Translate the user's criteria into concrete checks.
3. **Define what to capture**: What fields ("columns") does each result need? Build the schema before searching.
4. **Search broadly**: Generate diverse queries and run them to find candidates. This is where subagents do the heavy lifting.
5. **Extract structured data**: Pull specific fields from raw search results into the schema.
6. **Filter**: Apply hard constraints (dates, geography, thresholds) and soft judgments (quality, relevance, semantic checks).
7. **Merge and deduplicate**: Combine results from multiple subagents. Same URL = drop duplicate. Same entity from different sources = merge fields, keep best data.
8. **Score and rank**: For "best of" (e.g. "what's the best ___?") queries, define the scoring criteria explicitly, then rank.
9. **Synthesize narrative**: For research queries, organize findings by theme and write prose with citations.
## Step 2: Dispatch Subagents
### What subagents do
Subagents run Exa searches and process the results. They keep raw search output out of your context window. Each subagent should:
- Read the reference file(s) you point it to
- Run the specific searches you assign
- Return compact, structured output
### How to dispatch
Use the **Agent tool** to dispatch subagents. Reference file paths are relative to the directory this file was loaded from.
Use `model: "haiku"` for subagents.
Tell each subagent:
1. Which reference file(s) to read for instructions (always include the absolute path)
2. What specific searches to run or what specific work to do
3. What output format to return
**Template:**
```
Read the file at [this skill's directory]/references/searching.md for instructions on how to query Exa effectively.
Then do the following:
[specific task description]
[specific queries to run, if you are prescribing them]
[validation criteria -- what makes a result qualify, so the subagent filters before returning]
Return: [output format -- e.g. "compact JSON with name, url, snippet per result" or "markdown table with columns X, Y, Z"].
End with EXACTLY: `sources_reviewed: N` where N = sum of `numResults` across every `web_search_exa` call (incl. retries). E.g. calls with numResults 10, 10, 5 → `sources_reviewed: 25`.
```
**Pass the `sources_reviewed` instruction line to every subagent verbatim — don't paraphrase.**
### Which reference files to point subagents to
Always point subagents to `references/searching.md`. It contains Exa query guidance and an index of domain-specific pattern files that the subagent will select from based on its task.
Point to whichever of these also apply:
| File | Point a subagent here when... |
|---|---|
| `references/extraction.md` | The subagent needs to extract specific data points into a schema you defined |
| `references/filtering.md` | The subagent needs to evaluate results against criteria (especially semantic/soft filters) |
| `references/synthesis.md` | The subagent is producing a prose synthesis rather than structured data |
| `references/source-quality.md` | The subagent needs to assess source credibility, especially for "best of", ranking, or expert-finding queries |
### How to split work across subagents
If running parallel subagents, decompose the primary task/question into **sub-questions** to cover different search territories.
For example, "best open-source LLM fine-tuning frameworks for production use" can be decomposed into multiple parallel sub-questions:
1. "What open-source LLM fine-tuning frameworks do production engineers recommend, and what do they say about using them in real deployments?"
2. "What open-source LLM fine-tuning tools have launched or gained traction in the last 6 months that aren't yet widely known?"
3. "What are the most common complaints, failure modes, and reasons teams migrated away from specific open-source LLM fine-tuning frameworks in production?"
Depending on your "**How complex is this?**" analysis: Some need 2-3; some need many. Some need several different angles, creative thought patterns, adversarial perspectives. It depends on what the user is asking for and how deep they want you to go.
Give the sub-question directly to the subagent in its prompt.
### Subagent sizing
- Aim for 3-5 searches per subagent
- Parallelize aggressively — independent workstreams should be separate subagents launched in a single message
- Do not use `run_in_background` — dispatch all subagents in one message and wait for their results
- For per-seed work (enriching a list of 20 companies), batch 3-5 seeds per subagent
### Token isolation
Never run bulk searches in your main context. The whole point of subagents is to keep raw search output out of your context window. Subagents process results and return only distilled output.
### When things go wrong
- **Subagent returns empty**: Rephrase queries with different angles, not synonyms. If still empty, the topic may have limited web coverage -- report that.
- **Subagent returns off-topic results**: Queries were too vague. Retry with longer, more specific queries.
## Step 3: Compile Results
After subagents return:
**Deduplicate:**
1. Collect all results into a single list
2. Remove exact URL duplicates
3. Same entity from different sources: merge fields, keep the most complete/recent data
4. Track: "Deduplicated X results down to Y unique entries"
**Validate coverage:**
- Are there obvious gaps? (missing time periods, missing geographic regions, missing entity types)
- For each gap found, run targeted follow-up searches (via subagent if multiple queries are needed, direct if extremely simple)
- For "find everything" queries, check if results from different subagents overlap heavily (good sign) or are completely disjoint (may indicate missed angles)
**Format the output:**
If you used subagents, open with: "I used Exa to review {X} sources across {Y} subagents. Here's what was found:" (X = sum of `sources_reviewed` across all subagents and passes plus any direct searches you ran; Y = total subagents dispatched. Pluralize naturally.)
Then: Format output beautifully, filling up no more than one scroll length of the claude code screen. Include hyperlinked text where relevant. Below it, you may also include things (in a short, easy-to-read format) that:
- ("Result") directly answer the original user request (in few words; make every word count)
- ("Process") include anything worth noting about your process and what you consider to be high-signal in this domain vs. what you filtered out.
- ("Patterns") any patterns identified that are non-obvious, require n-th order thinking, and are not included or alluded to in the rest of the output but might be interesting to the user.
- ("Notes") based on everything you know about the user and their work beyond this task, mention anything notable/useful you found that is not included or alluded to in the rest of the output.
If it's impossible to fit the full output in a single screen, write a file in the most relevant/useful file format (.csv, .md) to `./exa-results/<topic>-<YYYY-MM-DD>` and include a pointer to the full file below the 1-screen output.
**General output rules:**
- No emojis unless the user requested them
- Include in-line 1-word or multi-word hyperlinks throughout outputs where hyperlinking is a value-add.
- Prefer tables over lists (fall back to lists only when fields are non-uniform or values are too long to fit cleanly)
## Multi-Pass Queries
Some queries require multiple sequential passes where later passes depend on earlier results. Common patterns:
**Entity chaining** (multi-hop): Pass 1 finds entities (companies), Pass 2 finds related entities per result (people at those companies), Pass 3 enriches those (their public statements). Each pass is a round of parallel subagents.
**Exploratory then targeted**: Pass 1 scouts the landscape broadly, Pass 2 searches deeply in the most promising directions found in Pass 1.
**Criteria discovery**: When "best" isn't predefined, Pass 1 surveys what practitioners actually value, Pass 2 searches for candidates matching those criteria.
Between passes, compile and deduplicate before dispatching the next round.
## Evaluating Source Quality
Source quality matters most for "best of", ranking, expert-finding, and best-practices queries, but is useful context for almost any research task.
**At the subagent level:** Point subagents to `references/source-quality.md` so they tag source quality in their output. This lets you weight results during compilation.
**At the orchestrator level**, when compiling subagent results:
1. **Convergence across high-signal sources**: Convergence alone isn't meaningful (3 low-quality sources agreeing is just shared noise). What matters is when multiple independent, high-signal sources (practitioners, people with skin in the game) converge on the same finding.
2. **Practitioner vs commentator**: Weight practitioners (people doing the work) higher than commentators (people writing about the work).
3. **Via negativa**: Before synthesizing, define who to exclude (sources with misaligned incentives, no skin in the game, or unfalsifiable claims). Filtering out noise is more valuable than seeking brilliance.
4. **Red-team your compiled results**: What perspectives are missing? What biases might be distorting the aggregate? If a gap emerges, run a targeted follow-up.
5. **Ideas over entities**: For expert-finding and best-practices queries, the primary output is convergent truths, not a ranked list of names. Lead with what the best sources agree on, then cite who said it.
## Gotchas
- **Over-execution on simple queries**: If the user asks "what year was X founded", don't spin up subagents. One search, one answer.
- **Under-execution on hard queries**: If the query has 4+ constraints, temporal joins, or semantic filtering, a single search will not cut it. Fan out.
- **Synonym queries**: Running "overrated AI tools" and "overhyped AI tools" as separate subagent queries wastes tokens. These hit the same embedding region. Diversify by angle instead.
- **Forgetting to deduplicate**: Multiple subagents will return overlapping results. Always deduplicate before synthesis.
- **Treating Exa results as validated**: Exa returns similarity, not yet validated. A result appearing in search output does not mean it meets the user's criteria. You must validate.
- **Date drift**: Always calculate dates from the current environment date. Never reuse dates from these instructions or from previous queries.

