Overview
This plugin allows you to use Letta as an LLM provider for your voice agents. Letta compatibility is provided by the OpenAI plugin using the Letta Chat Completions API.
Quick reference
This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.
Installation
Install the OpenAI plugin to add Letta support:
uv add "livekit-agents[openai]~=1.3"
Authentication
If your Letta server requires authentication, you need to provide an API key. Set the following environment variable in your .env file:
LETTA_API_KEY
Usage
Use Letta LLM within an AgentSession or as a standalone LLM service. For example, you can use this LLM in the Voice AI quickstart.
from livekit.plugins import openaisession = AgentSession(llm=openai.LLM.with_letta(agent_id="<agent-id>",),# ... tts, stt, vad, turn_detection, etc.)
Parameters
This section describes some of the parameters for the with_letta method. For a complete list of all available parameters, see the plugin documentation.
stringRequiredLetta agent ID. Must begin with agent-.
stringOptionalDefault: https://api.letta.com/v1/voice-betaURL of the Letta server. For example, your self-hosted server or Letta Cloud.
Additional resources
The following links provide more information about the Letta LLM plugin.