> ## Documentation Index
> Fetch the complete documentation index at: https://exa.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Exa API is served at https://api.exa.ai. Authenticate with `Authorization: Bearer $EXA_API_KEY` (or `x-api-key: $EXA_API_KEY`); create keys at https://dashboard.exa.ai/api-keys?utm_source=docs&utm_medium=docs&utm_campaign=markdown_instructions. Every way an agent can get access to Exa is described at https://exa.ai/auth.md.
> Prefer the official SDKs, `exa-py` (`pip install exa-py`) and `exa-js` (`npm install exa-js`); both read `EXA_API_KEY` from the environment.
> Tool-using agents can call Exa without writing code through the hosted MCP server at https://mcp.exa.ai/mcp, or install the Exa agent skill with `npx skills add exa-labs/agent-skills` (skill file: https://exa.ai/docs/skill.md).
> The OpenAPI specs at https://exa.ai/docs/exa-spec.yaml and https://exa.ai/docs/team-management-spec.yaml are the source of truth for request and response schemas.

# OpenClaw

> Give OpenClaw live web search and page contents with Exa.

[OpenClaw](https://openclaw.ai/) supports Exa as a native `web_search` provider. Once selected, every OpenClaw agent can use Exa search modes, date filters, and content extraction through the built-in web tool.

## Set up Exa

**1. Install the Exa plugin**

```bash theme={null}
openclaw plugins install @openclaw/exa-plugin
openclaw gateway restart
```

**2. Get an Exa API key**

> [card] [Get your Exa API key](https://dashboard.exa.ai/api-keys?utm_source=docs\&utm_medium=docs\&utm_campaign=get_key_card)
>
> Create a key in the dashboard. New accounts start with free credits.

**3. Store the key**

For a gateway installation, add the key to `~/.openclaw/.env`:

```bash ~/.openclaw/.env theme={null}
EXA_API_KEY=your-exa-api-key
```

Restart the gateway after changing its environment.

**4. Select Exa for web search**

Run:

```bash theme={null}
openclaw configure --section web
```

Choose **Exa** as the web search provider. OpenClaw stores the provider selection in its configuration and reads the credential from `EXA_API_KEY`.

## Configure manually

You can select Exa directly in OpenClaw's JSON5 configuration:

```json5 theme={null}
{
  tools: {
    web: {
      search: {
        provider: "exa",
      },
    },
  },
}
```

To store the key in configuration instead of the gateway environment:

```json5 theme={null}
{
  plugins: {
    entries: {
      exa: {
        config: {
          webSearch: {
            apiKey: "exa-...",
          },
        },
      },
    },
  },
}
```

> [!NOTE]
>
> Prefer `EXA_API_KEY` or an OpenClaw SecretRef over committing an API key to a configuration file.

## What agents can request

OpenClaw exposes Exa through `web_search`.

| Parameter | Purpose |
| - | - |
| `query` | The web search query. |
| `count` | Number of results, up to 100 and subject to the selected search type's limit. |
| `type` | Exa search mode: `auto`, `deep`, `neural`, or the [legacy](https://exa.ai/docs/search/quickstart.md#legacy-search-types) `fast`, `instant`, or `deep-reasoning`. |
| `freshness` | Restrict results to a recent day, week, month, or year. |
| `date_after` / `date_before` | Restrict results with `YYYY-MM-DD` boundaries. |
| `contents` | Return full text, highlights, or summaries with each result. |

If `contents` is omitted, OpenClaw requests highlights by default. The agent can ask for a different content shape when it needs complete pages or summaries:

```javascript theme={null}
await web_search({
  query: "transformer architecture explained",
  type: "neural",
  contents: {
    text: { maxCharacters: 5000 },
    highlights: { numSentences: 3 },
    summary: true,
  },
});
```

OpenClaw caches web search results for 15 minutes by default. Change `tools.web.search.cacheTtlMinutes` or set it to `0` when every request must be fresh.

## Troubleshooting

> [accordion] OpenClaw does not show Exa as a provider
>
> Install `@openclaw/exa-plugin`, restart the gateway, and run `openclaw configure --section web` again.

> [accordion] OpenClaw reports a missing Exa key
>
> Check that `EXA_API_KEY` is available to the gateway process, not only your interactive shell. For a gateway install, place it in `~/.openclaw/.env` and restart the gateway.

> [accordion] Search results appear stale
>
> OpenClaw caches results independently of Exa. Lower `tools.web.search.cacheTtlMinutes` or set it to `0`, then use Exa content freshness options when requesting page contents.

## Resources

> [card] [OpenClaw Exa provider](https://docs.openclaw.ai/tools/exa-search)
>
> Review the current plugin configuration and tool parameters.

> [card] [Exa Search](https://exa.ai/docs/search/quickstart.md)
>
> Compare Exa search modes and response formats.

> [card] [Content freshness](https://exa.ai/docs/contents/quickstart.md#content-freshness)
>
> Control indexed and live-retrieved page contents.
