selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

letta logo

Self-host letta

0.16.8

Runtime for stateful AI agents with long-term memory

ReleaseOpen CoreApache-2.0
docker compose up --build -d
Updated6 months ago
LanguagePython
Setup difficultyModerate
MobileResponsive
Stars
25 429
Port
4500 (App Server WebSocket endpoint and optional OpenAI-compatible API (Docker Compose deployment port))
Docker
letta/letta
Letta agent chat screen from the documentation overview

What is letta?

Should you self-host letta?

letta scores 78/100 on selfhost.directory (how scoring works) and ranks #14 of 209 in AI Agents. It has 25 429 GitHub stars, +336 in the last 30 days.

It shipped 10 stable releases in the past year. The latest, 0.16.8, came out on 14 May 2026. New versions land roughly every 3 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is Orca (91/100, 123 964 stars). It scores higher overall, so compare the two before you pick. See letta vs Orca side by side.

Features

  • App Server token authentication
  • Channel access control
  • Fully local on-device agent state
  • Local LLM inference (Ollama, LM Studio, llama.cpp)
  • MCP tool support
  • Messaging channel bots (Slack, Telegram, Discord, WhatsApp, Signal)
  • Model-agnostic LLM support
  • OpenAI Compatible APIopt-in flag; does not expose the full App Server lifecycle or approval flow
  • Scheduled recurring tasks
  • Self-hosted App Server
  • Shared agents and team permissionsLetta Cloud / Teams feature, not part of the local self-hosted backend
  • TypeScript Agent SDKno Python Agent SDK

letta README

Letta

Build stateful agents with memory that can learn and improve over time.

Letta (f.k.a. MemGPT) is actively developed. The current source code lives in letta-ai/letta-code, which includes the agent harness, interactive terminal UI, App Server, channels, and the runtime used by the desktop and web apps.

Get started

Install Letta from npm:

npm install -g @letta-ai/letta-code

How to install letta

Install letta with Docker

git clone https://github.com/letta-ai/letta-app-server-deployment.git
cd letta-app-server-deployment
cp .env.example .env
docker compose up --build -d
docker compose logs -f
curl http://127.0.0.1:4500/readyz

Official deployment repository with one Dockerfile; persist /root/.letta and /workspace, set LETTA_APP_SERVER_TOKEN plus a model provider key, health check /readyz.

How to configure letta

  • LETTA_API_KEYAPI key for authentication (alternative to OAuth)
  • LETTA_BASE_URLBase URL for a self-hosted Letta server
  • OPENAI_API_KEYOpenAI API key given to the deprecated open-source Docker server
  • ANTHROPIC_API_KEYAnthropic API key for Claude models on the deprecated Docker server
  • OLLAMA_BASE_URLBase URL of a local Ollama inference server

letta releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Why does my agent's context window keep changing?

Switching models or context-window variants resets your custom limit to that model's preset, so run /context-limit again after changing models.

How can I add custom tools to my agent?

Skills are the recommended way to teach an agent a new API or service; alternatively register session-scoped client tools via the Agent SDK, add a local mod, or use client-side MCP.

Is web search built into Letta agents, the CLI, and the app?

Cloud agents created via CLI or apps get web_search and fetch_webpage plus an image-generation skill; fully local agents do not, so you add capabilities yourself.

Is there a mobile app for Letta?

There is no native iOS or Android app; chat.letta.com is mobile-compatible, and you can build your own app with the Agent SDK's browser/React Native client.

Does MemFS or a Letta agent's memory support semantic or vector search?

MemFS has no vector index by default and is searched with file-search tools; optional semantic/hybrid search comes from the MemFS Search mod, and local backends search transcripts with full-text matching only.

Does the Letta Agent SDK support AgentFile (.af)?

Not directly: AgentFile import and export are not exposed by the Agent SDK, and you import .af files with letta --import for agents hosted in Letta Cloud.

Is there a Python version of the SDK?

No, the Agent SDK is TypeScript-only; for Python you run App Server separately and speak its WebSocket protocol yourself.

How do I keep Open WebUI chats in separate Letta conversations?

Set ENABLE_FORWARD_USER_INFO_HEADERS=true on Open WebUI so it sends X-OpenWebUI-Chat-Id, which App Server uses to route each chat into its own Letta conversation.

Is there a REST API?

The native interface is the App Server WebSocket protocol; passing --openai-api adds OpenAI-style Models, Chat Completions and Responses endpoints over HTTP.

What port does App Server run on?

By default it picks a free loopback port and prints the address; you pin one explicitly with --listen ws://127.0.0.1:4500, but 4500 is only an example.

Can I connect the CLI to a remote App Server?

No. The CLI only talks to Letta Cloud agents or local agents on the same machine, so for a remote App Server you SSH to that machine and run letta there.

How do I use a remote App Server with a rich UI?

Enable the App Server's OpenAI-compatible API and point a frontend such as Open WebUI at it, use the ACP adapter with clients like Zed, or build your own UI with the Agent SDK.

What happened to the previous desktop app?

The old Electron desktop app is deprecated and will stop working; use chat.letta.com (installable as a desktop app) or the Letta CLI for local files and tools.

How can I use the web app with local agents?

It cannot: the hosted web app only works with agents stored in Letta Cloud, although those agents' tools can run on your own machine via the CLI. For agents kept on your device you build your own frontend with the Agent SDK against a self-hosted App Server.

More in AI Agents

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…