Use the Exa AI CLI from KosmoKrator to call Exa AI tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Exa AI can be configured headlessly with `kosmokrator integrations:configure exa`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure exa --set api_key="$EXA_API_KEY" --enable --read allow --write ask --jsonkosmokrator integrations:doctor exa --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
api_key
EXA_API_KEY
Secret secret
yes
API Key
url
EXA_URL
URL url
no
Base URL
Call Exa AI Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Exa AI.
exa.exa_search
Read read
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.
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.
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.
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.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
exa.exa_search
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.
Operation
Read read
Schema command
kosmo integrations:schema exa.exa_search --json
Parameter
Type
Required
Description
query
string
yes
Natural language search query. Describe the type of content you want to find.
num_results
integer
no
Number of results to return (default: 10, max: 100).
use_autoprompt
boolean
no
Let Exa automatically optimize your query for better results (default: true).
type
string
no
Search type: "keyword" for exact matches, "neural" for semantic search, "auto" to let Exa decide (default: "auto").
category
string
no
Filter results to a specific category of content.
start_published_date
string
no
Only return results published after this date (ISO 8601, e.g., "2024-01-01T00:00:00Z").
exa.exa_find_similar
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.
The URL to find similar pages for (e.g., "https://example.com/article").
num_results
integer
no
Number of similar pages to return (default: 10, max: 100).
exa.exa_get_contents
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.
List of Exa document IDs to retrieve contents for.
text
boolean
no
Include full page text in the response (default: true).
highlights
object
no
Highlight configuration for extracting key passages from the content.
exa.exa_search_and_contents
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.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.