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. Create a key in the Caesar app and set it in the runtime environment before the model calls these tools.
The tools
caesarTools() returns two enumerable tools:
Use the TypeScript SDK client directly for other API actions. Legacy direct properties
caesar_search and caesar_read remain available for existing code, but they are non-enumerable so they are not sent to models as tool choices.
web_search
Runs
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.
web_fetch
Runs
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:web_searchreturns adoc_idper result, and it is the most reliabletargetforweb_fetch— more stable than re-passing the URL.