OpenAI-compatible proxy for Letta Cloud agents.
Point any OpenAI-compatible client (OpenClaw, LangChain, OpenAI SDK, etc.) at this proxy and it will route requests to your Letta agents. Includes a web dashboard for testing.
- Drop-in OpenAI API —
/v1/modelsand/v1/chat/completions(streaming supported) - Full tool-calling — bidirectional tool call round-trips
- Web dashboard — manage API keys, list agents, test chat in-browser
- Two modes:
dashboard— full web UI + API (default)light— API only, minimal dependencies
- Docker support —
docker runready
# 1. Clone
git clone https://github.com/kaivyy/lettaproxy.git
cd lettaproxy
# 2. Start (auto-installs dependencies)
./start.sh
# 3. Open dashboard and enter your Letta API key
# http://localhost:1416That's it. The dashboard will guide you through connecting your Letta account.
export LETTA_API_KEY="***"
./start.sh./start.sh light| Variable | Default | Description |
|---|---|---|
LETTA_API_KEY |
(empty) | Letta Cloud API key. Get one at app.letta.com |
LETTA_BASE_URL |
https://api.letta.com |
Letta API base URL (change for self-hosted) |
PROXY_PORT |
1416 |
Proxy listen port |
PROXY_HOST |
0.0.0.0 |
Proxy bind address |
| Method | Path | Description |
|---|---|---|
GET |
/v1/models |
List Letta agents as OpenAI models |
POST |
/v1/chat/completions |
Chat with a Letta agent (streaming supported) |
| Method | Path | Description |
|---|---|---|
GET |
/ |
Web dashboard UI |
GET |
/api/status |
Connection & agent status |
POST |
/api/set-key |
Save Letta API key (validates before saving) |
POST |
/api/chat |
Simple test chat |
| Method | Path | Description |
|---|---|---|
GET |
/health |
Health check |
The proxy supports full bidirectional tool calling:
- Client sends
tools[]in OpenAI function-calling format - Proxy forwards tools to the Letta agent
- Agent may call tools → proxy returns
tool_callswithfinish_reason: "tool_calls" - Client executes tools and sends results back as
toolrole messages - Agent produces final text response with
finish_reason: "stop"
Add to your openclaw.json under models.providers:
{
"letta": {
"baseUrl": "http://127.0.0.1:1416/v1",
"api": "openai-completions",
"models": [
{
"id": "<agent-id>",
"name": "My Letta Agent",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 8192
}
]
}
}Then add the model to your agent's allowlist and use /model letta/<agent-id> to switch.
docker build -t letta-proxy .
docker run -p 1416:1416 -e LETTA_API_KEY="***" letta-proxyIf you're running Letta locally (not Letta Cloud), set the base URL:
export LETTA_BASE_URL=http://localhost:8283
./start.sh- Python 3.9+
- See
requirements.txtfor dependencies (auto-installed bystart.sh)
MIT