KosmoKrator

productivity

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.

Retell AI CLI Setup

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

Install, configure, and verify
# 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-ai --set api_key="$RETELL_AI_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor retell-ai --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.

KeyEnv varTypeRequiredLabel
api_key RETELL_AI_API_KEY Secret secret yes API Key
url RETELL_AI_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call retell-ai.retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json
Provider shortcut
kosmo integrations:retell-ai retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs retell-ai --json
kosmo integrations:docs retell-ai.retell_ai_create_call --json
kosmo integrations:schema retell-ai.retell_ai_create_call --json
kosmo integrations:search "Retell 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.

retell-ai.retell_ai_create_call

Create a new AI-powered phone call using a Retell AI voice agent. Specify the agent ID and optional metadata to attach context to the call.

Write write
Parameters
agent_id, metadata, options
Generic call
kosmo integrations:call retell-ai.retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json

retell-ai.retell_ai_create_web_call

Create a Retell web call.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_create_web_call '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_create_web_call '{}' --json

retell-ai.retell_ai_get_call

Retrieve details for a specific phone call by its ID. Returns call status, duration, transcript, and associated metadata.

Read read
Parameters
call_id
Generic call
kosmo integrations:call retell-ai.retell_ai_get_call '{"call_id":"example_call_id"}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_call '{"call_id":"example_call_id"}' --json

retell-ai.retell_ai_list_calls

List phone calls from Retell AI. Returns call records with status, duration, and metadata. Supports optional filters for agent, status, or date range.

Read read
Parameters
filter
Generic call
kosmo integrations:call retell-ai.retell_ai_list_calls '{"filter":"example_filter"}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_list_calls '{"filter":"example_filter"}' --json

retell-ai.retell_ai_update_call

Update call metadata.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_update_call '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_update_call '{}' --json

retell-ai.retell_ai_stop_call

Stop an in-progress call.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_stop_call '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_stop_call '{}' --json

retell-ai.retell_ai_delete_call

Delete a call record.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_delete_call '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_delete_call '{}' --json

retell-ai.retell_ai_list_agents

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

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_list_agents '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_list_agents '{}' --json

retell-ai.retell_ai_get_agent

Get a voice agent.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_get_agent '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_agent '{}' --json

retell-ai.retell_ai_create_agent

Create a new voice AI agent in Retell AI. Specify the voice ID and system prompt. Additional options like agent name, language, and behavior settings can be provided.

Write write
Parameters
voice_id, prompt, options
Generic call
kosmo integrations:call retell-ai.retell_ai_create_agent '{"voice_id":"example_voice_id","prompt":"example_prompt","options":"example_options"}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_create_agent '{"voice_id":"example_voice_id","prompt":"example_prompt","options":"example_options"}' --json

retell-ai.retell_ai_update_agent

Update a voice agent.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_update_agent '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_update_agent '{}' --json

retell-ai.retell_ai_delete_agent

Delete a voice agent.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_delete_agent '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_delete_agent '{}' --json

retell-ai.retell_ai_list_phone_numbers

List phone numbers.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_list_phone_numbers '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_list_phone_numbers '{}' --json

retell-ai.retell_ai_get_phone_number

Get a phone number.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_get_phone_number '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_phone_number '{}' --json

retell-ai.retell_ai_update_phone_number

Update phone number routing.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_update_phone_number '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_update_phone_number '{}' --json

retell-ai.retell_ai_list_retell_llms

List Retell LLMs.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_list_retell_llms '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_list_retell_llms '{}' --json

retell-ai.retell_ai_get_retell_llm

Get a Retell LLM.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_get_retell_llm '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_retell_llm '{}' --json

retell-ai.retell_ai_list_voices

List voices.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_list_voices '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_list_voices '{}' --json

retell-ai.retell_ai_get_voice

Get a voice.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_get_voice '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_voice '{}' --json

retell-ai.retell_ai_get_current_user

Retrieve current Retell AI account information, including available agents and account status. Useful for verifying connectivity and understanding account capabilities.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_get_current_user '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_get_current_user '{}' --json

retell-ai.retell_ai_api_get

Call a documented GET endpoint.

Read read
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_api_get '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_api_get '{}' --json

retell-ai.retell_ai_api_post

Call a documented POST endpoint.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_api_post '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_api_post '{}' --json

retell-ai.retell_ai_api_patch

Call a documented PATCH endpoint.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_api_patch '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_api_patch '{}' --json

retell-ai.retell_ai_api_delete

Call a documented DELETE endpoint.

Write write
Parameters
none
Generic call
kosmo integrations:call retell-ai.retell_ai_api_delete '{}' --json
Shortcut
kosmo integrations:retell-ai retell_ai_api_delete '{}' --json

Function Schemas

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

retell-ai.retell_ai_create_call 3 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_create_call --json
ParameterTypeRequiredDescription
agent_id string yes The Retell AI agent ID to use for the call (e.g., "agent_17a9b81c3c0").
metadata object no Optional key-value metadata to attach to the call for tracking and context (e.g., {"customer_id": "12345", "campaign": "onboarding"}).
options object no Additional create-phone-call fields such as from_number, to_number, override_agent_id, and retell_llm_dynamic_variables.
retell-ai.retell_ai_create_web_call 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_create_web_call --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_call 1 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_call --json
ParameterTypeRequiredDescription
call_id string yes The unique identifier of the call to retrieve (e.g., "call_17a9b81c3c0").
retell-ai.retell_ai_list_calls 1 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_list_calls --json
ParameterTypeRequiredDescription
filter object no Optional filters to apply. Supported keys may include agent_id, status, start_timestamp, end_timestamp, etc.
retell-ai.retell_ai_update_call 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_update_call --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_stop_call 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_stop_call --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_delete_call 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_delete_call --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_list_agents 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_list_agents --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_agent 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_agent --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_create_agent 3 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_create_agent --json
ParameterTypeRequiredDescription
voice_id string yes The voice ID to assign to the agent (e.g., "11labs_Alice"). Determines the voice the agent speaks with.
prompt string yes The system prompt that defines the agent's behavior, personality, and conversation guidelines.
options object no Additional agent configuration options (e.g., {"agent_name": "Support Agent", "language": "en", "ambient_noise": true}).
retell-ai.retell_ai_update_agent 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_update_agent --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_delete_agent 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_delete_agent --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_list_phone_numbers 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_list_phone_numbers --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_phone_number 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_phone_number --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_update_phone_number 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_update_phone_number --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_list_retell_llms 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_list_retell_llms --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_retell_llm 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_retell_llm --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_list_voices 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_list_voices --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_voice 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_voice --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_get_current_user 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_api_get 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_api_get --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_api_post 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_api_post --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_api_patch 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_api_patch --json
ParameterTypeRequiredDescription
No parameters.
retell-ai.retell_ai_api_delete 0 parameters
Schema command
kosmo integrations:schema retell-ai.retell_ai_api_delete --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.