Skip to content
Guide

Setting up Exa

Search built for AI use, with matching passages from each page.

On this page

Exa is a search engine built for AI use. For each result, Aldwin shows the passages from the page that best match your question. This guide covers what Exa is, how to get a key, and how to connect it to Aldwin.

What Exa is#

Exa finds pages by meaning as well as keywords. Aldwin asks Exa for highlights: a few short passages per page chosen for your query, so the snippet says something useful without opening the page. See Exa.

When Aldwin searches with Exa, your query goes to Exa over the internet. If you want search that stays on your own machine, use SearXNG instead.

What you need#

  • An Exa account and API key
  • Aldwin installed (uv tool install aldwin)

Exa is a paid API. Highlights can add a small charge per result on top of the search itself. See Exa pricing.

Get a key#

  1. Sign in at the Exa dashboard.
  2. Open API keys and create a key.
  3. Copy the key. Treat it like a password.

Connect Aldwin#

In the web app#

  1. Open Settings from the bottom of the sidebar and choose Search.
  2. Find Exa and select Connect.
  3. Paste your key and select Connect. Aldwin checks the key with Exa before saving it, and tells you why if it does not work.
  4. If Exa is not marked In use, select Use this one.

To remove it later, select Disconnect. You can also switch between connected providers from the search picker in the message box.

In the terminal#

  1. Start Aldwin and type /search.
  2. Use the arrow keys to pick Exa under Not connected, then press Enter.
  3. Aldwin shows where to get a key. Paste it at Exa API key: (the input is hidden) and press Enter.
  4. Aldwin shows Checking key…. It first asks Exa about the key for free. If Exa won't answer that for your plan, Aldwin runs one search instead, which uses one Exa query.
  5. When the key works you see ✓ Exa connected · now used for search. If it doesn't, Aldwin says why and asks again; press Enter on an empty prompt to cancel. Nothing is saved until the check passes.

From the same screen you can switch back to another provider, choose Automatic, or pick Exa again to Update key or Disconnect.

You can also type /search exa: Aldwin uses Exa if it is connected, or goes straight to the key prompt if not.

Other ways to add the key#

These skip the check, so use them only if you prefer files or environment variables.

Secrets file. Add this line to ~/.aldwin/secrets.yaml (create the file if it does not exist, and keep any lines already in it):

exa_api_key: your-key-here

Environment variable, for one terminal session or in your shell profile (~/.zshrc or ~/.bashrc):

export EXA_API_KEY=your-key-here

An environment variable wins over a saved key. With /search set to Automatic, Aldwin uses the first connected provider in this order: Tavily, SearXNG, Brave, Exa, Perplexity, Parallel, Firecrawl. Exa comes after Tavily, SearXNG and Brave, so it is picked automatically only when none of those is set up.

Try it#

aldwin

Ask something that needs the live web, for example:

Use web_search to look up today's Python release news.

You should see numbered results with titles, links, and short snippets. Running /search again shows Web search · Exa (chosen) at the top.

Privacy notes#

  • Your search queries go to Exa, which handles them under its own terms.
  • Pages Aldwin then opens with web_fetch are fetched from your machine, not through Exa.
  • When you connect, Aldwin sends the key to Exa to check it. The key is then kept only in ~/.aldwin/secrets.yaml (or your environment), and Aldwin removes it from any error message it shows.
  • Details: Privacy.

Troubleshooting#

Messages from /search appear right after you paste a key. Errors during a search appear after search failed: in the web_search result.

What Aldwin saysFix
Exa rejected this key (HTTP 401). ...The key is wrong, revoked, or was pasted with extra characters. Copy it again from the Exa dashboard.
Exa accepted the key, but the account is out of credits (HTTP 402). ...Add credit or move to a bigger plan, then connect again.
Exa is rate limiting this key (HTTP 429). ...Wait a minute and try again.
Could not reach Exa to check the key ...Check your internet connection. If it keeps happening, Exa may be down; try again later.
Exa's key comes from EXA_API_KEY in your environment. ...Disconnect can't remove an environment variable. Delete the export EXA_API_KEY=... line from your shell profile, then restart Aldwin.
Exa search isn't set up. ...Aldwin has no key for Exa. Run /search and connect it.
invalid or unauthorized Exa API key (HTTP 401)The key stopped working after it was connected (revoked or expired). Run /search, pick Exa, and choose Update key.
Exa rate limit or quota reached (HTTP 429)Too many searches at once, or your plan's allowance is used up. Wait a minute, or check usage in the Exa dashboard.
request timed outExa took longer than 15 seconds to answer a search. Try again, or switch provider with /search.
Aldwin uses another providerRun /search, pick Exa, and choose Use for search. With Automatic, a provider earlier in the order wins.
Was this page helpful?