search
Exa AI CLI for Headless Automation
Use the Exa AI CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
5 functions 5 read 0 write API key auth
Exa AI CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Exa AI CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Exa AI CLI for Headless Automation
kosmokrator integrations:configure exa --set api_key="$EXA_API_KEY" --enable --read allow --write ask --json
kosmo integrations:call exa.exa_search '{"query":"example_query","num_results":1,"use_autoprompt":true,"type":"example_type","category":"example_category","start_published_date":"example_start_published_date"}' --json Discovery Before Execution
Agents and scripts can inspect Exa AI docs and schemas before choosing a function.
kosmo integrations:docs exa --json
kosmo integrations:docs exa.exa_search --json
kosmo integrations:schema exa.exa_search --json
kosmo integrations:search "Exa AI" --json
kosmo integrations:list --json Useful Exa AI CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
exa.exa_search | Read | query, num_results, use_autoprompt, type, category, start_published_date | Perform a neural search query across the web using Exa AI. Returns a list of relevant pages with titles, URLs, and scores. Supports filtering by category, date range, and autoprompt mode. |
exa.exa_find_similar | Read | url, num_results | Find web pages similar to a given URL. Useful for discovering related content, competitors, or alternative resources. Returns a list of similar pages with titles, URLs, and scores. |
exa.exa_get_contents | Read | ids, text, highlights | Retrieve the full text contents and optional highlights for a list of Exa document IDs. Use this after a search or findSimilar call to get the actual page content. |
exa.exa_search_and_contents | Read | query, num_results, use_autoprompt, type, category, start_published_date, text, highlights | Search the web and retrieve full page contents in one call. Combines search and content retrieval into a single request for efficiency. Returns results with both metadata and full text content. |
exa.exa_get_current_user | Read | none | Get the currently authenticated Exa user's profile information, including email and API usage details. Useful for verifying credentials. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.