Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Retell AI

Scalekit connector
Open markdown

The Retell AI connector lets your AI agent act in each user's Retell AI account. Each user connects their own Retell AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 83 tools.

Tools
83
What they doRead · write · destructive
36 · 34 · 1336 read34 write13 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Retell AI connection

    In AgentKit > Connections, create a Retell AI connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'retell'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Retell AI:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'retell_get_api_key_info',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Retell AI credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • retell_agent_playground_completionGet an agent's next reply to a conversation you supply, without creating a chat or storing anything in Retell.Read-only

    Agent Playground Completion

    Get an agent's next reply to a conversation you supply, without creating a chat or storing anything in Retell. Returns messages (only the newly generated messages), current_state or current_node_id, dynamic_variables, call_ended and any knowledge base content retrieved. Use retell_agent_playground_completion to test how an agent responds. Use retell_create_chat_completion to continue a real chat.

    Inputs

    agent_idstringrequired
    ID of the voice or chat agent, from the `agent_id` field returned by retell_list_agents. Example: oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD
    messagesarrayrequired
    Full conversation so far, oldest first. Each message has a role (user or agent) and content; tool call messages may also appear. Example: [{"role": "user", "content": "Hi, I'd like to check my appointment."}]
    component_idstring
    Conversation flow component ID, required when current_node_id is a node inside a component. Example: component_xyz789
    current_node_idstring
    For conversation flow agents, the node to resume from. Example: start-node-abc123
    current_statestring
    For Retell LLM agents, the state to resume from. Example: greeting
    dynamic_variablesobject
    Dynamic variables to substitute into the prompt, as string key-value pairs. Example: {"customer_name": "John Smith"}
    tool_mocksarray
    Mocked tool results so the agent does not call real tools. Each mock names the tool_name, an input_match_rule and the output string. Example: [{"tool_name": "check_availability", "input_match_rule": {"type": "any"}, "output": "{\"available\": true}"}]
    versioninteger
    Agent version to use. Omit for the latest version. Example: 2
  • retell_get_agentGet the full configuration of a Retell voice agent.Read-only

    Get Agent

    Get the full configuration of a Retell voice agent. Returns the agent object, including agent_id, version, is_published, response_engine, agent_name, voice_id, language and the voice, webhook and call settings. Use retell_get_agent for voice agents. Use retell_get_chat_agent for chat agents and retell_list_agent_versions to see its versions.

    Inputs

    agent_idstringrequired
    ID of the voice agent, from the `agent_id` field returned by retell_list_agents. Example: oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD
    versioninteger
    Agent version to retrieve. Omit for the latest version. Example: 2
  • retell_get_api_key_infoGet information about the API key used for this connection and the organization that owns it.Read-only

    Get API Key Info

    Get information about the API key used for this connection and the organization that owns it. Returns org_id, org_name and api_key_name. Use retell_get_api_key_info to confirm which Retell organization the connection acts on.

    Inputs

    This tool takes no inputs.

  • retell_get_batch_testGet the status and pass/fail counts of a Retell batch test job.Read-only

    Get Batch Test

    Get the status and pass/fail counts of a Retell batch test job. Returns the batch test job, including test_case_batch_job_id, status, response_engine, pass_count, fail_count, error_count, total_count and timestamps. Use retell_get_batch_test to check whether a batch has finished. Use retell_list_test_runs for the individual results.

    Inputs

    test_case_batch_job_idstringrequired
    ID of the batch test job, from the `test_case_batch_job_id` field returned by retell_create_batch_test or retell_list_batch_tests. Example: 7e6d5c4b3a2918070f1e2d3c4b5a6978
  • retell_get_callGet the full record of one Retell phone or web call.Read-only

    Get Call

    Get the full record of one Retell phone or web call. Returns the call object: call_id, call_type, call_status, agent_id, from_number, to_number, direction, start and end timestamps, duration_ms, transcript, transcript_object, recording_url, public_log_url, disconnection_reason, call_analysis (summary, sentiment, success, custom data), call_cost and latency. Use retell_get_call for one call's transcript and analysis. Use retell_list_calls to find calls.

    Inputs

    call_idstringrequired
    ID of the call, from the `call_id` field returned by retell_list_calls or retell_create_phone_call. Example: Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6
  • retell_get_chatGet the full record of one Retell chat or SMS conversation.Read-only

    Get Chat

    Get the full record of one Retell chat or SMS conversation. Returns the chat object, including chat_id, agent_id, chat_status, chat_type, transcript, messages with tool calls, metadata, chat_cost and chat_analysis. Use retell_get_chat for one conversation's messages and analysis. Use retell_list_chats to find chats.

    Inputs

    chat_idstringrequired
    ID of the chat, from the `chat_id` field returned by retell_list_chats or retell_create_chat. Example: Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6
  • retell_get_chat_agentGet the full configuration of a Retell chat agent.Read-only

    Get Chat Agent

    Get the full configuration of a Retell chat agent. Returns the chat agent object, including agent_id, version, is_published, response_engine, agent_name, language, webhook settings and post-chat analysis settings. Use retell_get_chat_agent for chat agents. Use retell_get_agent for voice agents.

    Inputs

    agent_idstringrequired
    ID of the chat agent, from the `agent_id` field returned by retell_list_agents. Example: oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD
    versioninteger
    Agent version to retrieve. Omit for the latest version. Example: 2
  • retell_get_concurrencyGet the Retell organization's current call concurrency and its limits.Read-only

    Get Concurrency

    Get the Retell organization's current call concurrency and its limits. Returns current_concurrency, concurrency_limit, base_concurrency, purchased_concurrency, purchase limits, reserved_inbound_concurrency and burst settings. Use retell_get_concurrency before launching calls or a batch to check how many calls can run at once.

    Inputs

    This tool takes no inputs.