data
Exa AI CLI for AI Agents
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 CLI Setup
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 --enable --read allow --write ask --json
kosmokrator integrations:doctor exa --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
No credentials are required.
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
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","end_published_date":"example_end_published_date","include_domains":"example_include_domains"}' --json kosmo integrations: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","end_published_date":"example_end_published_date","include_domains":"example_include_domains"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities 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 Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
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.
read - Parameters
- query, num_results, use_autoprompt, type, category, start_published_date, end_published_date, include_domains, exclude_domains, output_schema
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","end_published_date":"example_end_published_date","include_domains":"example_include_domains"}' --json kosmo integrations: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","end_published_date":"example_end_published_date","include_domains":"example_include_domains"}' --json 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.
read - Parameters
- query, num_results, use_autoprompt, type, category, start_published_date, text, highlights, summary, max_age_hours, output_schema
kosmo integrations:call exa.exa_search_and_contents '{"query":"example_query","num_results":1,"use_autoprompt":true,"type":"example_type","category":"example_category","start_published_date":"example_start_published_date","text":true,"highlights":"example_highlights"}' --json kosmo integrations:exa exa_search_and_contents '{"query":"example_query","num_results":1,"use_autoprompt":true,"type":"example_type","category":"example_category","start_published_date":"example_start_published_date","text":true,"highlights":"example_highlights"}' --json exa.exa_answer
Get a grounded answer to a question using Exa search results, including citations when returned by Exa.
read - Parameters
- query, text, stream
kosmo integrations:call exa.exa_answer '{"query":"example_query","text":true,"stream":true}' --json kosmo integrations:exa exa_answer '{"query":"example_query","text":true,"stream":true}' --json 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.
read - Parameters
- url, num_results, exclude_source_domain, include_domains, exclude_domains
kosmo integrations:call exa.exa_find_similar '{"url":"example_url","num_results":1,"exclude_source_domain":true,"include_domains":"example_include_domains","exclude_domains":"example_exclude_domains"}' --json kosmo integrations:exa exa_find_similar '{"url":"example_url","num_results":1,"exclude_source_domain":true,"include_domains":"example_include_domains","exclude_domains":"example_exclude_domains"}' --json exa.exa_get_contents
Retrieve full page contents, summaries, highlights, and metadata for URLs or Exa document IDs.
read - Parameters
- urls, ids, text, highlights, summary, livecrawl, max_age_hours, subpages, subpage_target
kosmo integrations:call exa.exa_get_contents '{"urls":"example_urls","ids":"example_ids","text":true,"highlights":"example_highlights","summary":"example_summary","livecrawl":"example_livecrawl","max_age_hours":1,"subpages":1}' --json kosmo integrations:exa exa_get_contents '{"urls":"example_urls","ids":"example_ids","text":true,"highlights":"example_highlights","summary":"example_summary","livecrawl":"example_livecrawl","max_age_hours":1,"subpages":1}' --json exa.exa_get_current_user
Get the currently authenticated Exa user's profile information, including email and API usage details. Useful for verifying credentials.
read - Parameters
- none
kosmo integrations:call exa.exa_get_current_user '{}' --json kosmo integrations:exa exa_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
exa.exa_search 10 parameters
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. Current options include auto, instant, fast, deep-lite, deep, deep-reasoning, keyword, and neural. |
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"). |
end_published_date | string | no | Only return results published before this date (ISO 8601). |
include_domains | array | no | Domains to include. |
exclude_domains | array | no | Domains to exclude. |
output_schema | object | no | Optional JSON schema for structured output with deep search types. |
exa.exa_search_and_contents 11 parameters
kosmo integrations:schema exa.exa_search_and_contents --json | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Natural language search query. |
num_results | integer | no | Number of results to return (default: 10, max: 100). |
use_autoprompt | boolean | no | Let Exa automatically optimize your query (default: true). |
type | string | no | Search type. Current options include auto, instant, fast, deep-lite, deep, deep-reasoning, keyword, and neural. |
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"). |
text | boolean | no | Include full page text in the response (default: true). |
highlights | object | no | Highlight configuration for extracting key passages. |
summary | object | no | Summary configuration for LLM-generated summaries. |
max_age_hours | integer | no | Maximum cached content age in hours for returned contents. |
output_schema | object | no | Optional JSON schema for structured output with deep search types. |
exa.exa_answer 3 parameters
kosmo integrations:schema exa.exa_answer --json | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Question or query to answer. |
text | boolean | no | Include full text content in search results used for the answer. |
stream | boolean | no | Whether to request streaming. Hosts usually should leave this false because tools return JSON. |
exa.exa_find_similar 5 parameters
kosmo integrations:schema exa.exa_find_similar --json | Parameter | Type | Required | Description |
|---|---|---|---|
url | string | yes | 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). |
exclude_source_domain | boolean | no | Exclude results from the same domain as the source URL. |
include_domains | array | no | Domains to include. |
exclude_domains | array | no | Domains to exclude. |
exa.exa_get_contents 9 parameters
kosmo integrations:schema exa.exa_get_contents --json | Parameter | Type | Required | Description |
|---|---|---|---|
urls | array | no | List of URLs to retrieve contents for. Preferred for the current Exa Contents API. |
ids | array | no | List of Exa document IDs from search results. Backward-compatible alternative to urls. |
text | boolean | no | Include full page text in the response (default: true). |
highlights | object | no | Highlight configuration for extracting key passages from the content. |
summary | object | no | Summary configuration for LLM-generated page summaries. |
livecrawl | string | no | Deprecated livecrawl preference. Prefer max_age_hours when possible. |
max_age_hours | integer | no | Maximum cached content age in hours. 0 always livecrawls; -1 always uses cache. |
subpages | integer | no | Number of linked subpages to crawl. |
subpage_target | string | no | Term used to target specific subpages. |
exa.exa_get_current_user 0 parameters
kosmo integrations:schema exa.exa_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
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.