KosmoKrator

search

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.

5 functions 5 read 0 write API key auth

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 --set api_key="$EXA_API_KEY" --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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
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.

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

Use the provider shortcut form for shorter human-facing commands.

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"
}' --json

Agent Discovery Commands

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

All CLI Functions

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_find_similar

Read read

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.

Parameters
url, num_results

Generic CLI call

kosmo integrations:call exa.exa_find_similar '{"url":"example_url","num_results":1}' --json

Provider shortcut

kosmo integrations:exa exa_find_similar '{"url":"example_url","num_results":1}' --json

exa.exa_get_contents

Read read

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.

Parameters
ids, text, highlights

Generic CLI call

kosmo integrations:call exa.exa_get_contents '{"ids":"example_ids","text":true,"highlights":"example_highlights"}' --json

Provider shortcut

kosmo integrations:exa exa_get_contents '{"ids":"example_ids","text":true,"highlights":"example_highlights"}' --json

exa.exa_search_and_contents

Read read

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.

Parameters
query, num_results, use_autoprompt, type, category, start_published_date, text, highlights

Generic CLI call

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

Provider shortcut

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_get_current_user

Read read

Get the currently authenticated Exa user's profile information, including email and API usage details. Useful for verifying credentials.

Parameters
none

Generic CLI call

kosmo integrations:call exa.exa_get_current_user '{}' --json

Provider shortcut

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_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.

Operation
Read read
Schema command
kosmo integrations:schema exa.exa_find_similar --json
ParameterTypeRequiredDescription
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).

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.

Operation
Read read
Schema command
kosmo integrations:schema exa.exa_get_contents --json
ParameterTypeRequiredDescription
ids array yes 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.

Operation
Read read
Schema command
kosmo integrations:schema exa.exa_search_and_contents --json
ParameterTypeRequiredDescription
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: "keyword", "neural", or "auto" (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").
text boolean no Include full page text in the response (default: true).
highlights object no Highlight configuration for extracting key passages.

exa.exa_get_current_user

Get the currently authenticated Exa user's profile information, including email and API usage details. Useful for verifying credentials.

Operation
Read read
Schema command
kosmo integrations:schema exa.exa_get_current_user --json
ParameterTypeRequiredDescription
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.