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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call retell-ai.retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json 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.
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 - Parameters
- agent_id, metadata, options
kosmo integrations:call retell-ai.retell_ai_create_call '{"agent_id":"example_agent_id","metadata":"example_metadata","options":"example_options"}' --json 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 - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_create_web_call '{}' --json 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 - Parameters
- call_id
kosmo integrations:call retell-ai.retell_ai_get_call '{"call_id":"example_call_id"}' --json 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 - Parameters
- filter
kosmo integrations:call retell-ai.retell_ai_list_calls '{"filter":"example_filter"}' --json kosmo integrations:retell-ai retell_ai_list_calls '{"filter":"example_filter"}' --json retell-ai.retell_ai_update_call
Update call metadata.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_update_call '{}' --json kosmo integrations:retell-ai retell_ai_update_call '{}' --json retell-ai.retell_ai_stop_call
Stop an in-progress call.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_stop_call '{}' --json kosmo integrations:retell-ai retell_ai_stop_call '{}' --json retell-ai.retell_ai_delete_call
Delete a call record.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_delete_call '{}' --json 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 - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_list_agents '{}' --json kosmo integrations:retell-ai retell_ai_list_agents '{}' --json retell-ai.retell_ai_get_agent
Get a voice agent.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_get_agent '{}' --json 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 - Parameters
- voice_id, prompt, options
kosmo integrations:call retell-ai.retell_ai_create_agent '{"voice_id":"example_voice_id","prompt":"example_prompt","options":"example_options"}' --json 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 - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_update_agent '{}' --json kosmo integrations:retell-ai retell_ai_update_agent '{}' --json retell-ai.retell_ai_delete_agent
Delete a voice agent.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_delete_agent '{}' --json kosmo integrations:retell-ai retell_ai_delete_agent '{}' --json retell-ai.retell_ai_list_phone_numbers
List phone numbers.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_list_phone_numbers '{}' --json kosmo integrations:retell-ai retell_ai_list_phone_numbers '{}' --json retell-ai.retell_ai_get_phone_number
Get a phone number.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_get_phone_number '{}' --json kosmo integrations:retell-ai retell_ai_get_phone_number '{}' --json retell-ai.retell_ai_update_phone_number
Update phone number routing.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_update_phone_number '{}' --json kosmo integrations:retell-ai retell_ai_update_phone_number '{}' --json retell-ai.retell_ai_list_retell_llms
List Retell LLMs.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_list_retell_llms '{}' --json kosmo integrations:retell-ai retell_ai_list_retell_llms '{}' --json retell-ai.retell_ai_get_retell_llm
Get a Retell LLM.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_get_retell_llm '{}' --json kosmo integrations:retell-ai retell_ai_get_retell_llm '{}' --json retell-ai.retell_ai_list_voices
List voices.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_list_voices '{}' --json kosmo integrations:retell-ai retell_ai_list_voices '{}' --json retell-ai.retell_ai_get_voice
Get a voice.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_get_voice '{}' --json 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 - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_get_current_user '{}' --json kosmo integrations:retell-ai retell_ai_get_current_user '{}' --json retell-ai.retell_ai_api_get
Call a documented GET endpoint.
read - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_api_get '{}' --json kosmo integrations:retell-ai retell_ai_api_get '{}' --json retell-ai.retell_ai_api_post
Call a documented POST endpoint.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_api_post '{}' --json kosmo integrations:retell-ai retell_ai_api_post '{}' --json retell-ai.retell_ai_api_patch
Call a documented PATCH endpoint.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_api_patch '{}' --json kosmo integrations:retell-ai retell_ai_api_patch '{}' --json retell-ai.retell_ai_api_delete
Call a documented DELETE endpoint.
write - Parameters
- none
kosmo integrations:call retell-ai.retell_ai_api_delete '{}' --json 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
kosmo integrations:schema retell-ai.retell_ai_create_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema retell-ai.retell_ai_create_web_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_call 1 parameters
kosmo integrations:schema retell-ai.retell_ai_get_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
call_id | string | yes | The unique identifier of the call to retrieve (e.g., "call_17a9b81c3c0"). |
retell-ai.retell_ai_list_calls 1 parameters
kosmo integrations:schema retell-ai.retell_ai_list_calls --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema retell-ai.retell_ai_update_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_stop_call 0 parameters
kosmo integrations:schema retell-ai.retell_ai_stop_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_delete_call 0 parameters
kosmo integrations:schema retell-ai.retell_ai_delete_call --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_list_agents 0 parameters
kosmo integrations:schema retell-ai.retell_ai_list_agents --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_agent 0 parameters
kosmo integrations:schema retell-ai.retell_ai_get_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_create_agent 3 parameters
kosmo integrations:schema retell-ai.retell_ai_create_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema retell-ai.retell_ai_update_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_delete_agent 0 parameters
kosmo integrations:schema retell-ai.retell_ai_delete_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_list_phone_numbers 0 parameters
kosmo integrations:schema retell-ai.retell_ai_list_phone_numbers --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_phone_number 0 parameters
kosmo integrations:schema retell-ai.retell_ai_get_phone_number --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_update_phone_number 0 parameters
kosmo integrations:schema retell-ai.retell_ai_update_phone_number --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_list_retell_llms 0 parameters
kosmo integrations:schema retell-ai.retell_ai_list_retell_llms --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_retell_llm 0 parameters
kosmo integrations:schema retell-ai.retell_ai_get_retell_llm --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_list_voices 0 parameters
kosmo integrations:schema retell-ai.retell_ai_list_voices --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_voice 0 parameters
kosmo integrations:schema retell-ai.retell_ai_get_voice --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_get_current_user 0 parameters
kosmo integrations:schema retell-ai.retell_ai_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_api_get 0 parameters
kosmo integrations:schema retell-ai.retell_ai_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_api_post 0 parameters
kosmo integrations:schema retell-ai.retell_ai_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_api_patch 0 parameters
kosmo integrations:schema retell-ai.retell_ai_api_patch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
retell-ai.retell_ai_api_delete 0 parameters
kosmo integrations:schema retell-ai.retell_ai_api_delete --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.