Back to Openclaw

Exa search

docs/tools/exa-search.md

2026.5.54.4 KB
Original Source

OpenClaw supports Exa AI as a web_search provider. Exa offers neural, keyword, and hybrid search modes with built-in content extraction (highlights, text, summaries).

Get an API key

<Steps> <Step title="Create an account"> Sign up at [exa.ai](https://exa.ai/) and generate an API key from your dashboard. </Step> <Step title="Store the key"> Set `EXA_API_KEY` in the Gateway environment, or configure via:
```bash
openclaw configure --section web
```
</Step> </Steps>

Config

json5
{
  plugins: {
    entries: {
      exa: {
        config: {
          webSearch: {
            apiKey: "exa-...", // optional if EXA_API_KEY is set
            baseUrl: "https://api.exa.ai", // optional; OpenClaw appends /search
          },
        },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "exa",
      },
    },
  },
}

Environment alternative: set EXA_API_KEY in the Gateway environment. For a gateway install, put it in ~/.openclaw/.env.

Base URL override

Set plugins.entries.exa.config.webSearch.baseUrl when Exa search requests should go through a compatible proxy or alternate Exa endpoint. OpenClaw normalizes bare hosts by prepending https:// and appends /search unless the path already ends there. The resolved endpoint is included in the search cache key, so results from different Exa endpoints are not shared.

Tool parameters

<ParamField path="query" type="string" required> Search query. </ParamField> <ParamField path="count" type="number"> Results to return (1–100). </ParamField> <ParamField path="type" type="'auto' | 'neural' | 'fast' | 'deep' | 'deep-reasoning' | 'instant'"> Search mode. </ParamField> <ParamField path="freshness" type="'day' | 'week' | 'month' | 'year'"> Time filter. </ParamField> <ParamField path="date_after" type="string"> Results after this date (`YYYY-MM-DD`). </ParamField> <ParamField path="date_before" type="string"> Results before this date (`YYYY-MM-DD`). </ParamField> <ParamField path="contents" type="object"> Content extraction options (see below). </ParamField>

Content extraction

Exa can return extracted content alongside search results. Pass a contents object to enable:

javascript
await web_search({
  query: "transformer architecture explained",
  type: "neural",
  contents: {
    text: true, // full page text
    highlights: { numSentences: 3 }, // key sentences
    summary: true, // AI summary
  },
});
Contents optionTypeDescription
textboolean | { maxCharacters }Extract full page text
highlightsboolean | { maxCharacters, query, numSentences, highlightsPerUrl }Extract key sentences
summaryboolean | { query }AI-generated summary

Search modes

ModeDescription
autoExa picks the best mode (default)
neuralSemantic/meaning-based search
fastQuick keyword search
deepThorough deep search
deep-reasoningDeep search with reasoning
instantFastest results

Notes

  • If no contents option is provided, Exa defaults to { highlights: true } so results include key sentence excerpts
  • Results preserve highlightScores and summary fields from the Exa API response when available
  • Result descriptions are resolved from highlights first, then summary, then full text — whichever is available
  • freshness and date_after/date_before cannot be combined — use one time-filter mode
  • Up to 100 results can be returned per query (subject to Exa search-type limits)
  • Results are cached for 15 minutes by default (configurable via cacheTtlMinutes)
  • Exa is an official API integration with structured JSON responses