Skip to content
  • Auto
  • Light
  • Dark
DiscordForumGitHubSign up
Experimental
Voice agents
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Connecting with Vapi

  1. Add your LETTA_API_KEY

    Add Letta Cloud as an integration by entering your LETTA_API_KEY into the “Custom LLM” field at https://dashboard.vapi.ai/settings/integrations.

  2. Create an assistant

    Create a Vapi assistant at https://dashboard.vapi.ai/assistants/ and use the “Blank Template”.

  3. Connect your Letta agent

    Select “Custom LLM” for the model, and enter in the chat completions endpoint: https://api.letta.com/v1/chat/completions

    In the request body, set the “model” field to your agent ID in the format agent-{AGENT-ID}.

    Note: The legacy /v1/voice-beta/{AGENT-ID} endpoint has been deprecated. Use /v1/chat/completions with the agent ID specified in the “model” field instead.

  4. Talk to your agent

    You can now interact with your agent through Vapi, including calling and texting your agent!

To connect to a self-hosted server, you will need to have a internal accessible endpoint for your Letta server and add any authentication tokens (if they exist) instead of LETTA_API_KEY. We recommend using ngrok to expose your Letta server to the internet.

  1. Setting up ngrok

    If you are self-hosting the Letta server locally (at localhost), you will need to use ngrok to expose your Letta server to the internet:

    1. Create an account on ngrok
    2. Create an auth token and add it into your CLI
      ngrok config add-authtoken <YOUR_AUTH_TOKEN>
    3. Point your ngrok server to your Letta server:
      ngrok http http://localhost:8283

    Now, you should have a forwarding URL like https://{YOUR_FORWARDING_URL}.ngrok.app.

  2. Create an assistant

    Create a Vapi assistant at https://dashboard.vapi.ai/assistants/ and use the “Blank Template”.

  3. Connect your Letta agent

    Select “Custom LLM” for the model, and enter in the chat completions endpoint: https://{YOUR_FORWARDING_URL}.ngrok.app/v1/chat/completions

    In the request body, set the “model” field to your agent ID in the format agent-{AGENT_ID}.

    Note: The legacy /v1/voice-beta/{AGENT_ID} endpoint has been deprecated. Use /v1/chat/completions with the agent ID specified in the “model” field instead.

  4. Talk to your agent

    You can now interact with your agent through Vapi, including calling and texting your agent!