ai package (version 5 or newer) is an optional peer dependency of caesar-search — optional for the rest of the SDK, required for this subpath. Importing caesar-search/ai without it fails at module resolution.
CAESAR_API_KEY only if you have a partner key for higher throughput.
The tools
caesarTools() returns an object with exactly two tools, keyed caesar_search and caesar_read.
caesar_search
| Parameter | Type | Description |
|---|---|---|
query | string, required | The search query. |
max_results | number | Maximum results, 1-50. Default 8. |
response_format | compact | standard | full | compact (default) is the token-efficient choice. |
client.search(query, { maxResults, verbosity }). The ids_only verbosity is deliberately omitted from the tool’s response_format enum — it exists at the client level, but is a poor fit for tool results. See response shaping.
caesar_read
| Parameter | Type | Description |
|---|---|---|
target | string, required | URL or doc_id to read. |
query | string | Focus content selection on a question. |
max_chars | number | Content character cap. Default 12000 (applied server-side). |
start_char | number | Resume a truncated read from this character offset. |
client.read(target, { query, maxChars, startChar }).
Configuring the client
Pass your own configured client to control auth, timeouts, and retries:For agents
- Tool results default to
compactto protect the context window. Ask forstandardorfullonly when you need passages or provenance. - Thread
doc_idvalues between tool calls:caesar_searchreturns adoc_idper result, and it is the most reliabletargetforcaesar_read— more stable than re-passing the URL.