Install
openclaw skills install exa-api-alRetrieve fresh, relevant, and citation-backed web information using neural and keyword search via the Exa API for up-to-date answers and content.
openclaw skills install exa-api-alInstructional knowledge for an AI agent. This file teaches WHEN and HOW to use Exa (neural web search). It is NOT executable code. It assumes Exa is reachable through tools (e.g. the
exa-mcpserver) or an HTTP client againsthttps://api.exa.ai.
exa-web-search-skill — neural and keyword web search, content retrieval,
similarity discovery, and citation-grounded answering via Exa (exa.ai).
Teach the agent to retrieve fresh, relevant, citable information from the open web using Exa. The agent uses this skill to:
Apply the rules below to choose the right operation, design queries, evaluate sources, cite correctly, control cost, and handle errors — without ever leaking the API key or blindly trusting web content.
Use Exa when ANY of the following holds:
answer operation.A quick reasoning summary the agent should run: "Is the answer likely outside my training data, time-sensitive, or required to be cited? If yes → Exa."
Do not call Exa when:
contents when you want Exa's clean extraction; prefer
a plain fetch tool only if extraction quality does not matter.| Variable | Required | Purpose |
|---|---|---|
EXA_API_KEY | Yes | Authenticates every request via x-api-key header. |
Rules:
EXA_API_KEY is missing, do not attempt the call. Report that the key is
not configured and stop.exa-mcp server, the server holds the key; the agent calls
tools and never sees the key. Still never request or surface it.| Operation | Endpoint | Use it to… |
|---|---|---|
search | POST /search | Find URLs by query (neural/keyword/auto/fast). |
contents | POST /contents | Get clean text/highlights/summary for URLs. |
findSimilar | POST /findSimilar | Find pages semantically similar to a URL. |
answer | POST /answer | Get a short cited answer to a question. |
research | POST /research (beta) | Run a multi-step research task. Beta — treat output as preliminary. |
Auth: every request sends header x-api-key: <EXA_API_KEY>.
Every response includes costDollars (usage cost). Always check it.
Typical expected tool names when an MCP server is present:
exa_search, exa_get_contents, exa_find_similar, exa_answer.
Verification needed: confirm the exact
research(beta) request/response schema and tool name with https://docs.exa.ai before relying on it.
Goal: get the smallest set of the most relevant URLs at the lowest cost.
type:
auto (default) — let Exa pick. Safe first choice when unsure.neural — meaning-based, conceptual, "find content about…" queries.keyword — exact terms, names, error strings, codes, quoted phrases.
Cheaper than neural.fast — low-latency, lower-cost lookups where top relevance is enough.category when the intent maps to one (e.g. news, research paper,
company, pdf, github, tweet, personal site). It sharpens results.
Verification needed: confirm the current category list at https://docs.exa.ai.
includeDomains[] / excludeDomains[] to scope to or away from sites.startPublishedDate / endPublishedDate (ISO 8601) for time scoping.numResults conservatively. Start with 5–10. Raise only if results
are insufficient. More results = more cost (especially with contents).contents only when needed. If you only need URLs/titles to pick
what to read, omit contents and fetch them in a second step for the chosen few.
Requesting text, highlights, or summary inline adds cost.resolvedSearchType, results[].score,
publishedDate, and costDollars. Refine if scores are low or results stale.Use contents to turn URLs into clean, readable content.
urls[] — the IDs/URLs you selected from a search (recall id = url).summary — shortest, cheapest; good for triage and quick grounding.highlights — the most relevant snippets; good for targeted citation.text — full cleaned page text; use only when you must read deeply.livecrawl (in contents) when you need the freshest version of a page
rather than a cached copy; expect higher latency/cost.Use findSimilar when you have one strong reference URL and want more like it.
url (the reference) and numResults (start small, 5–10).includeDomains/excludeDomains and date filters to
constrain the neighborhood.score; drop low-score and exact-duplicate URLs.contents call on the kept
URLs — do not request contents you will not use.Use answer for a quick, cited answer instead of manual search-then-read.
answer with query (the question) and text: true to get supporting
source text where available.{ answer, citations:[{id,title,url,text?}], costDollars }.answer and ALWAYS surface the citations to the user (see §12).publishedDate, and re-verify if stale.answer for single, well-scoped factual questions. For broad research
spanning many sources, prefer search + contents so you control selection.Before relying on any result:
score (0–1) as a relevance signal, not a truth signal. High score
means "matches the query," not "is correct." Prefer higher-score results but
still judge content.publishedDate recency for any time-sensitive claim. Stale dates on
fast-moving topics are a red flag.[n] to the claim.[n] → title + url (the id).url (= id) as the canonical link. Do not invent or
shorten URLs.answer, pass through its citations as the sources list.Example sources block:
Sources:
[1] Title of Article — https://example.com/article
[2] Other Source — https://example.org/page
neural, write a natural descriptive phrase of
the concept; for keyword, use exact terms, names, or quoted strings.startPublishedDate/endPublishedDate whenever recency
matters; combine with category: news for current events.includeDomains to trust specific sites or
excludeDomains to suppress noise (e.g. exclude aggregators).| Status / case | Cause | Correct reaction |
|---|---|---|
401 INVALID_API_KEY | Missing/invalid key | Do NOT retry. Report key misconfig and stop. |
400 INVALID_REQUEST_BODY | Bad params/shape | Do NOT retry blindly. Fix the request, then call. |
| 429 rate limit | Too many requests | Back off and retry with exponential backoff + jitter. |
| 5xx / timeout | Transient server/network issue | Retry a few times with exponential backoff. |
| Empty results | Query too narrow/wrong type | Refine query, change type, relax filters; re-run. |
Rules of thumb:
Every response carries costDollars. Treat cost as a first-class constraint.
keyword, fast) when they suffice; reserve
neural for genuine semantic needs.numResults. Start at 5–10; increase only when justified.contents for only those. Prefer summary/highlights over full
text when they answer the need.livecrawl unless freshness truly matters.costDollars across the session; if a workflow is getting expensive,
narrow scope or stop.startPublishedDate to bound recency and use
category: news for current events.publishedDate on results before treating them as current.livecrawl in
contents — accepting added latency/cost.EXA_API_KEY in output, logs, citations, or tool arguments
surfaced to the user.excludeDomains to avoid disallowed sources;
honor any allowlist the user/policy specifies via includeDomains.Before each Exa interaction, confirm:
EXA_API_KEY is configured; never printed.type; set conservative numResults.[n] + Sources list (urls).costDollars; cached results for reuse.A. Cited answer to a fresh factual question
answer with query and text: true.publishedDate; cross-check if volatile (§16).citations (§12).B. Topic research with controlled cost
search with type: auto, numResults: 8, relevant category, no inline
contents.score/recency; pick the 3–4 best URLs (§11).contents on just those, requesting summary first; escalate to text only
if needed (§8, §15).[n] citations and a Sources list.C. Find-similar discovery
findSimilar with that url, numResults: 10 (§9).contents (summary) on kept URLs, then present a cited shortlist.neural everywhere and overpaying when keyword/fast would do.text for many results before triaging — large needless cost.costDollars and score.score as a correctness measure.x-api-key auth, parameters, response
fields, costDollars, error codes) are ground truth. When Exa changes, update
here first, then the reference/ files.> Verification needed: and link
https://docs.exa.ai. Do not silently invent Exa behavior.research endpoint is beta — re-check its schema and stability before
promoting it from beta status here.