https://github.com/wsargent/letta-openai-proxy
An OpenAI API compatible proxy for Letta agents. Use this for Open WebUI etc.
https://github.com/wsargent/letta-openai-proxy
letta
Last synced: 3 months ago
JSON representation
An OpenAI API compatible proxy for Letta agents. Use this for Open WebUI etc.
- Host: GitHub
- URL: https://github.com/wsargent/letta-openai-proxy
- Owner: wsargent
- License: mit
- Created: 2025-06-27T17:23:07.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-05T17:02:53.000Z (3 months ago)
- Last Synced: 2025-07-05T18:33:14.380Z (3 months ago)
- Topics: letta
- Language: Python
- Homepage: https://tersesystems.com
- Size: 86.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Letta OpenAI Proxy
This project makes [Letta](https://docs.letta.com) agents available through an OpenAI-compatible API. Agents are listed as models, and sending messages through the chat completion API will send messages to the selected Letta agent and receive reasoning messages.
## Set up
This project uses `uv` to run the application. The usual uv methods apply:
```
uv sync
uv venv
source .venv/bin/activate
```You will need a letta server to run. The easiest way to do this is to go to https://github.com/wsargent/groundedllm -- set up the tokens and run `docker compose up` to bring up the system.
Copy the `env_example` to `.env` and set up your credentials:
```
LETTA_BASE_URL=http://your-letta-serverLETTA_API_TOKEN=your-letta-password-if-any
```## Running
The server uses [Hayhooks](https://docs.haystack.deepset.ai/docs/hayhooks) to run:
```
uv run python app.py
```The server will come up at http://localhost:1416
Please see the Hayhooks documentation for logging and configuration options.
## Using the Client
You can use any OpenAI API compatible client to chat with the agent. I prefer [Open WebUI](https://docs.openwebui.com) but there are many options.
For your convenience, a simple command line client is included that you can run standalone:
```
uv run python cli_client.py
```And then type `/models` to list the available models.
Unfortunately, Apple's Terminal app doesn't support clickable hyperlinks: I recommend you use [iTerm2](https://iterm2.com) or another terminal that supports [OSC8](https://github.com/Alhadis/OSC8-Adoption) as it makes clicking on links much easier.
## Limitations
You cannot use tools or upload data sources with an agent currently.