# tool_exa_search

A RocketRide tool node that gives an AI agent live web search powered by [Exa](https://exa.ai)'s semantic search.

> Experimental: this node is marked `experimental` and may change.

## What it does

When an agent calls the `exa_search` tool, the node runs a real-time search against the
Exa `/search` REST API and hands back structured results: title, URL, text content,
relevance score, published date, and author.

Implemented with the **requests** library, no Exa SDK is used. Requests time out after
30 seconds and are retried up to 3 times with exponential backoff (2 s base delay) on
rate limits (HTTP 429), server errors (5xx), and timeouts. Failures are returned to the
agent as a structured `{"success": false, "error": ...}` result rather than raised.

The node has no pipeline lanes (`lanes` is `{}`). Only agent runtimes reach it, through
the `invoke` capability.

---

## Configuration


| Field | Type | Description |
|---|---|---|
| `apikey` | string | Default empty. Exa API key (from https://exa.ai) |
| `numResults` | integer | Default 10. Maximum number of search results to return (1-50) |
| `useAutoprompt` | boolean | Default true. Let Exa optimize the query for better results |
| `searchType` | string | Default "auto". Type of search to perform |
| `includeText` | boolean | Default true. Include full text content in results |


The config values act as defaults, the agent can override `num_results`, `type`,
`use_autoprompt`, and `include_text` per call.

---

## Available tools

### `exa_search`

Search the web using Exa semantic search. `query` is the only required parameter.


| Tool | Description |
|---|---|---|
| `exa_search` | Search the web using Exa semantic search. Provide a natural language query to find relevant web pages. Returns structured results with title, URL, text content, relevance score, and published date. |


Returns an object with `success`, `query`, `num_results`, `results` (array of
`{title, url, score, published_date, author, text?}`, `text` only when content was
requested and returned), and `error` on failure.

---

## Authentication

Drop your Exa API key into the **API Key** config field (grab one at https://exa.ai).
The field is encrypted at rest and masked in the UI. Alternatively, set the
`EXA_API_KEY` environment variable on the engine host, the config field takes
precedence when both are set. The key is sent to the Exa API in the `x-api-key`
request header.

---

<!-- ROCKETRIDE:GENERATED:PARAMS START -->
<!-- Generated by nodes:docs-generate. Do not edit by hand. -->

## Schema

| Field | Type | Description | Default |
|---|---|---|---|
| `tool_exa_search.apikey` | `string` | **API Key**<br/>Exa API key (from https://exa.ai) | `""` |
| `tool_exa_search.includeText` | `boolean` | **Include Text Content**<br/>Include full text content in results | `true` |
| `tool_exa_search.numResults` | `integer` | **Number of Results**<br/>Maximum number of search results to return (1-50) | `10` |
| `tool_exa_search.searchType` | `string` | **Search Type**<br/>Type of search to perform | `"auto"` |
| `tool_exa_search.useAutoprompt` | `boolean` | **Use Autoprompt**<br/>Let Exa optimize the query for better results | `true` |

## Dependencies

- `requests`

## Source

[<svg viewBox="0 0 16 16" width="15" height="15" fill="currentColor" aria-hidden="true" style="vertical-align:-0.15em;margin-right:0.35em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> View source](https://github.com/rocketride-org/rocketride-server/tree/develop/nodes/src/nodes/tool_exa_search)
<!-- ROCKETRIDE:GENERATED:PARAMS END -->
