KosmoKrator

ai

Retell AI CLI for AI Agents

Use the Retell AI CLI from KosmoKrator to call Retell AI tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 5 read 2 write Bearer token auth

Retell AI CLI Setup

Retell AI can be configured headlessly with `kosmokrator integrations:configure retell`.

# 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 retell --set access_token="$RETELL_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor retell --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token RETELL_ACCESS_TOKEN Secret secret yes Access Token
url RETELL_URL URL url no API Base URL

Call Retell AI Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call retell.retell_list_calls '{
  "limit": 1,
  "filter_criteria": "example_filter_criteria",
  "before": "example_before",
  "after": "example_after"
}' --json

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

kosmo integrations:retell retell_list_calls '{
  "limit": 1,
  "filter_criteria": "example_filter_criteria",
  "before": "example_before",
  "after": "example_after"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs retell --json
kosmo integrations:docs retell.retell_list_calls --json
kosmo integrations:schema retell.retell_list_calls --json
kosmo integrations:search "Retell 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 Retell AI.

retell.retell_list_calls

Read read

List AI voice calls from Retell. Supports filtering by criteria and cursor-based pagination using before/after timestamps.

Parameters
limit, filter_criteria, before, after

Generic CLI call

kosmo integrations:call retell.retell_list_calls '{"limit":1,"filter_criteria":"example_filter_criteria","before":"example_before","after":"example_after"}' --json

Provider shortcut

kosmo integrations:retell retell_list_calls '{"limit":1,"filter_criteria":"example_filter_criteria","before":"example_before","after":"example_after"}' --json

retell.retell_get_call

Read read

Get detailed information about a specific AI voice call, including transcript, duration, and status.

Parameters
call_id

Generic CLI call

kosmo integrations:call retell.retell_get_call '{"call_id":"example_call_id"}' --json

Provider shortcut

kosmo integrations:retell retell_get_call '{"call_id":"example_call_id"}' --json

retell.retell_create_phone_call

Write write

Create a new AI-powered phone call using a Retell AI agent. The agent will handle the conversation automatically.

Parameters
agent_id, metadata, retell_llm_dynamic_variables

Generic CLI call

kosmo integrations:call retell.retell_create_phone_call '{"agent_id":"example_agent_id","metadata":"example_metadata","retell_llm_dynamic_variables":"example_retell_llm_dynamic_variables"}' --json

Provider shortcut

kosmo integrations:retell retell_create_phone_call '{"agent_id":"example_agent_id","metadata":"example_metadata","retell_llm_dynamic_variables":"example_retell_llm_dynamic_variables"}' --json

retell.retell_list_agents

Read read

List all AI voice agents configured in Retell AI. Returns agent IDs, names, and configuration details.

Parameters
none

Generic CLI call

kosmo integrations:call retell.retell_list_agents '{}' --json

Provider shortcut

kosmo integrations:retell retell_list_agents '{}' --json

retell.retell_get_agent

Read read

Get detailed information about a specific AI voice agent, including its model, voice, prompt, and configuration.

Parameters
agent_id

Generic CLI call

kosmo integrations:call retell.retell_get_agent '{"agent_id":"example_agent_id"}' --json

Provider shortcut

kosmo integrations:retell retell_get_agent '{"agent_id":"example_agent_id"}' --json

retell.retell_create_agent

Write write

Create a new AI voice agent in Retell AI. Configure the model, voice, system prompt, and response engine.

Parameters
model, voice_id, prompt, response_engine

Generic CLI call

kosmo integrations:call retell.retell_create_agent '{"model":"example_model","voice_id":"example_voice_id","prompt":"example_prompt","response_engine":"example_response_engine"}' --json

Provider shortcut

kosmo integrations:retell retell_create_agent '{"model":"example_model","voice_id":"example_voice_id","prompt":"example_prompt","response_engine":"example_response_engine"}' --json

retell.retell_get_current_user

Read read

Get information about the currently authenticated Retell AI user. Useful for verifying credentials and account details.

Parameters
none

Generic CLI call

kosmo integrations:call retell.retell_get_current_user '{}' --json

Provider shortcut

kosmo integrations:retell retell_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

retell.retell_list_calls

List AI voice calls from Retell. Supports filtering by criteria and cursor-based pagination using before/after timestamps.

Operation
Read read
Schema command
kosmo integrations:schema retell.retell_list_calls --json
ParameterTypeRequiredDescription
limit integer no Maximum number of calls to return.
filter_criteria object no Filter criteria for calls. Supports filtering by agent_id, call_status, etc. Pass as a JSON object.
before string no Return calls created before this timestamp (ISO 8601 or Unix timestamp). Used for cursor-based pagination.
after string no Return calls created after this timestamp (ISO 8601 or Unix timestamp). Used for cursor-based pagination.

retell.retell_get_call

Get detailed information about a specific AI voice call, including transcript, duration, and status.

Operation
Read read
Schema command
kosmo integrations:schema retell.retell_get_call --json
ParameterTypeRequiredDescription
call_id string yes The unique identifier of the call (e.g., "call_abcdef123456").

retell.retell_create_phone_call

Create a new AI-powered phone call using a Retell AI agent. The agent will handle the conversation automatically.

Operation
Write write
Schema command
kosmo integrations:schema retell.retell_create_phone_call --json
ParameterTypeRequiredDescription
agent_id string yes The ID of the Retell AI agent to use for the call.
metadata object no Optional metadata to attach to the call (e.g., customer info, call purpose). Pass as a JSON object.
retell_llm_dynamic_variables object no Optional dynamic variables to inject into the agent's LLM prompt at runtime. Pass as a JSON object with string key-value pairs.

retell.retell_list_agents

List all AI voice agents configured in Retell AI. Returns agent IDs, names, and configuration details.

Operation
Read read
Schema command
kosmo integrations:schema retell.retell_list_agents --json
ParameterTypeRequiredDescription
No parameters.

retell.retell_get_agent

Get detailed information about a specific AI voice agent, including its model, voice, prompt, and configuration.

Operation
Read read
Schema command
kosmo integrations:schema retell.retell_get_agent --json
ParameterTypeRequiredDescription
agent_id string yes The unique identifier of the agent (e.g., "agent_abcdef123456").

retell.retell_create_agent

Create a new AI voice agent in Retell AI. Configure the model, voice, system prompt, and response engine.

Operation
Write write
Schema command
kosmo integrations:schema retell.retell_create_agent --json
ParameterTypeRequiredDescription
model string no The LLM model to use (e.g., "gpt-4o", "gpt-4o-mini", "claude-3.5-sonnet").
voice_id string no The voice ID to use for the agent. Browse available voices in the Retell AI dashboard.
prompt string no The system prompt that defines the agent's behavior and personality.
response_engine object no Response engine configuration. Pass as a JSON object (e.g., {"type": "retell-llm", "llm_url": "..."}).

retell.retell_get_current_user

Get information about the currently authenticated Retell AI user. Useful for verifying credentials and account details.

Operation
Read read
Schema command
kosmo integrations:schema retell.retell_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.