LLMAISelf-Hosting

Letta (MemGPT) with Docker: AI agents with long-term memory on your own server (Linux, Windows, Mac)

Before you start

  • 20 min read
  • Updated November 2026

Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#

Letta is a free program that runs AI agents with long-term memory: the agent keeps its identity and notes as plain Markdown files in a Git folder on your own machine, and it rewrites them as it learns.

Letta official logo

Logo: the official Letta project (github.com/letta-ai/letta-computer-deployment). Letta's licence keeps its name and logo outside Apache-2.0; it is shown here only to identify the tool.

Uses: a coding helper that remembers your repository, a server helper with your setup notes, a personal assistant that knows your habits. This is memory in files, not model training. The agent runs shell commands and edits files, so treat it as a powerful tool.

Read this first. Letta was called MemGPT. The old Docker server (Letta V1, with PostgreSQL, port 8283 and the "ADE" web app) is retired: its README says so, and its last release is 0.16.8. Tutorials that mention 8283 or PostgreSQL describe it. The maintained project is Letta Code, with a built-in App Server. Letta Cloud is a separate hosted service you do not need.

WhatValue (official sources, read November 2026)
Current versionLetta Code v0.34.70, released 23 November 2026 (previous: v0.34.69, 22 November)
Image to pinghcr.io/letta-ai/letta-code:0.34.70 (same image as Docker Hub letta/letta:0.34.70; amd64 and arm64)
Time neededAbout 30 minutes (our estimate)
RAMNo official minimum found. Your model needs its own memory
Port4500 is only an example. A bare --listen picks a free loopback port
LicenceApache-2.0, but the Letta name, logo and images are Letta, Inc. brand assets outside that licence
Official docsdocs.letta.com and github.com/letta-ai/letta-code

The Tutor agent picture shipped with Letta Code: a small white robot with four claws floating above an orange planet surface

Image: the official Letta Code project (assets at v0.34.70, "Tutor" agent picture; not a screenshot of the program)

At a glance:

  • State: one folder, ~/.letta. No PostgreSQL, no Redis, no vector index by default.
  • Memory: "MemFS", Markdown files tracked by Git, which you can read and git log.
  • Models: Ollama, LM Studio, llama.cpp, any OpenAI-compatible server, or paid APIs.
  • Chat windows: the App Server speaks the OpenAI API, so Open WebUI can use your agents.

Which version. Releases come almost every day (v0.34.67 to v0.34.70 in four days). We pin 0.34.70, the newest release. We found no report that blocks an install, but open bugs exist (see Known bugs). The docs and the official deployment repository disagree, so Step 2 uses our own Compose file.

How it fits together#

You talk to the Letta App Server, it keeps each agent's files in a state folder, runs the agent's tools in a workspace folder, and asks your own model server for answers.

Letta flow: chat windows reach the Letta App Server on port 4500 through an optional Caddy or Traefik HTTPS proxy, the letta command works on the same state folder, the App Server reads and writes the state folder with Git memory, runs shell and file tools in the workspace, and calls your Ollama or llama.cpp model server

Drawn for this guide from the official docs and source. The HTTPS route (dashed) is optional.

PartJobTalks to
letta commandText interface on your machineThe state folder and your model server
App Server (letta server)Always-on serviceClients over one WebSocket at /ws; plain HTTP on the same port
State folder and MemFSAgent settings, chats, Git memoryFiles only, no network
Model serverWrites the answers and tool callsCalled by Letta over HTTP
Chat window (optional)Open WebUI or LibreChatApp Server /v1 routes with a token
HTTPS proxy (optional)Caddy or TraefikForwards to the App Server

Keep three questions apart. Where does the state live? On your disk, with the local backend. Where do the tools run? On the machine or container that runs Letta. Where does the model run? Wherever you point it. A bare letta server (no --listen) connects outward to Letta Cloud and keeps the state there.

Before you start#

SystemTry it on your computer (Step 1)Run it in Docker (Step 2)
LinuxNode.js 22.23.4 or newer, npm, GitDocker Engine and the Compose plugin; x86-64 or arm64
WindowsNode.js 22.23.4 or newer, npm, GitDocker Desktop (Linux containers) and PowerShell
MacNode.js 22.23.4 or newer, npm, GitDocker Desktop, Intel or Apple Silicon

The docs say "Node.js 22.19+", but package.json at v0.34.70 asks for 22.23.4 (or 24.22.1, 26.12.1) or newer. With an older Node, npm can silently install an older Letta (CLI docs). Git matters because memory is a Git repository. We use npm, not uv or pipx.

Check your tools (the same everywhere):

Run in terminalbash
node --version
git --version
docker --version
docker compose version

You also need a model server such as Ollama. The docs say it must support Chat Completions and tool calling, and advise beginners to try a large cloud model first, because small models make agents behave oddly.

Checklist:

  • [ ] Node 22.23.4+ (Step 1) and Docker with Compose (Step 2)
  • [ ] A running model server with a tool-capable model
  • [ ] Port 4500 free on the host
  • [ ] For HTTPS only: a domain with DNS, and ports 80 and 443 free

Tested by DIY Lab Hub: not yet. Commands come from the official docs, the source code and the registry pages at v0.34.70, read in November 2026. We did not run the Compose file.

Step 1: Install Letta Code and try it#

This test needs no Docker. First switch telemetry off (it is on by default, see Security), then install the pinned version.

Tip: Never use sudo npm install -g. The docs say root ownership breaks Letta's self-update. On EACCES, use nvm or a user-owned npm folder.

Linux#

Run in terminalbash
echo 'export LETTA_CODE_TELEM=0' >> ~/.bashrc
echo 'export DO_NOT_TRACK=1' >> ~/.bashrc
source ~/.bashrc
npm install -g @letta-ai/[email protected]
letta backend local
letta --backend local connect ollama
mkdir -p ~/letta-test && cd ~/letta-test
letta --backend local --permission-mode standard

Check it worked. The text interface opens with an input box. Type /init, then tell the agent: "My server is called atlas and runs Debian." Quit and run ls ~/.letta/lc-local-backend/memfs/. You see one folder per agent, with Markdown files under memory.

letta backend local saves "local" as the default, so Letta does not ask you to sign in. connect ollama finds Ollama at http://localhost:11434/v1. standard makes Letta ask before it runs commands or edits files; the default unrestricted does not.

Windows (PowerShell)#

File contentpowershell
[Environment]::SetEnvironmentVariable("LETTA_CODE_TELEM", "0", "User")
[Environment]::SetEnvironmentVariable("DO_NOT_TRACK", "1", "User")
$env:LETTA_CODE_TELEM = "0"
$env:DO_NOT_TRACK = "1"
npm install -g @letta-ai/[email protected]
letta backend local
letta --backend local connect ollama
New-Item -ItemType Directory -Force "$HOME\letta-test" | Out-Null
Set-Location "$HOME\letta-test"
letta --backend local --permission-mode standard

Check it worked. After /init and one message, Get-ChildItem "$HOME\.letta\lc-local-backend\memfs" lists an agent folder. On native Windows the agent's automatic "dreaming" (background tidying of its notes) is off by default; /dream and /reflect still work, and LETTA_ENABLE_WINDOWS_AUTO_REFLECTION=1 turns it on.

Mac (Terminal)#

Same commands as Linux, but write the two export lines to ~/.zshrc and run source ~/.zshrc. Check it worked: same as Linux.

Connect your own model#

The connect commands are the same on every system.

Model serverCommand
Ollama on this machineletta --backend local connect ollama
Ollama on another machineletta connect ollama --base-url http://<host>:11434/v1
LM Studioletta --backend local connect lmstudio --base-url http://127.0.0.1:1234/v1
llama.cpp serverletta connect llama-cpp --base-url http://localhost:8080/v1
Any OpenAI-compatible server (for example vLLM)letta connect openai-compatible --base-url http://<host>:<port>/v1

Add --api-key <key> where the server needs one. Inside the interface, /connect and /model do the same job. Our llama.cpp server guide runs that server.

Context size matters. Letta puts the agent's identity and root memory files into every prompt (one user measured about 15,000 tokens). Ollama can serve a smaller window than the model advertises (its OLLAMA_CONTEXT_LENGTH setting) and then silently cuts the start of the prompt, so the agent seems to forget who it is. Letta now reads the served window from Ollama and refuses a turn whose fixed prompt cannot fit (PR 3838). For LM Studio and llama.cpp, set a large context yourself and check /context-limit.

Ollama and Docker. Ollama listens on 127.0.0.1:11434 by default, which a Linux container cannot reach. Set OLLAMA_HOST=0.0.0.0:11434 (Ollama FAQ: a systemd override on Linux, launchctl setenv for the Mac app, a user variable on Windows), restart Ollama, and block that port from your LAN and the internet with a firewall.

What leaves your machine:

SetupWhat goes out
local backend + local model, telemetry offNothing from agent use
local backend + a paid API (for example Anthropic)Every prompt, memory file and tool result goes to that provider
Letta Cloud, or bare letta serverAgent state and chats go to Letta Cloud
Telemetry left onUsage events go to Letta (see Security)

Step 2: Run Letta as an always-on server in Docker#

There is no official Compose file for a fully local App Server. The docs link a "deployment repository", but it now redirects to letta-computer-deployment, whose container "connects outward to Letta Cloud" and needs no inbound port. That is cloud mode. The file below is our own composition from the official image and the documented flags. We did not run it.

Three choices in it:

  • Port 127.0.0.1:4500:4500: Docker otherwise publishes to every interface and can bypass host firewalls like ufw.
  • --ws-auth capability-token: Letta refuses to listen on 0.0.0.0 without authentication.
  • The token file is mounted read-only (:ro) at an absolute path. The server compares a SHA-256 hash of it with each client's token.

Linux#

Make the folders and the token:

Run in terminalbash
mkdir -p ~/docker_volumes/letta/{state,workspace,secrets,backups}
cd ~/docker_volumes/letta
(umask 077; openssl rand -hex 32 > secrets/app_server_token)

Save this as ~/docker_volumes/letta/docker-compose.yml:

File contentyaml
services:
  letta:
    image: ghcr.io/letta-ai/letta-code:0.34.70
    container_name: letta
    restart: unless-stopped
    command:
      - letta
      - server
      - --backend
      - local
      - --listen
      - ws://0.0.0.0:4500
      - --ws-auth
      - capability-token
      - --ws-token-file
      - /run/secrets/app_server_token
      - --openai-api
    environment:
      - LETTA_CODE_TELEM=0
      - DO_NOT_TRACK=1
    ports:
      - "127.0.0.1:4500:4500"
    volumes:
      - ./state:/root/.letta
      - ./workspace:/workspace
      - ./secrets/app_server_token:/run/secrets/app_server_token:ro
    extra_hosts:
      - "host.docker.internal:host-gateway"

extra_hosts gives a Linux container the name host.docker.internal (Docker Desktop has it already). Start and test:

Run in terminalbash
docker compose up -d
docker compose logs letta
curl http://127.0.0.1:4500/readyz

Check it worked. The log shows a Listening on ws://...:4500 line and a WebSocket: line (the docs show the loopback form). curl prints ok: the source answers /readyz with HTTP 200 and ok, without login.

Now connect the model and create the first agent inside the container:

Run in terminalbash
docker compose exec letta letta --backend local connect ollama --base-url http://host.docker.internal:11434/v1
docker compose exec letta letta --backend local --new-agent

Say hello in the interface, then quit. Now list the agents the OpenAI-style route sees:

Run in terminalbash
TOKEN=$(tr -d '\r\n' < secrets/app_server_token)
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:4500/v1/models

Check it worked. The JSON lists your agent as a model. An empty list means no agent exists yet.

Windows (PowerShell)#

Codepowershell
$dir = "$HOME\docker_volumes\letta"
New-Item -ItemType Directory -Force "$dir\state", "$dir\workspace", "$dir\secrets", "$dir\backups" | Out-Null
Set-Location $dir
$bytes = New-Object byte[] 32
[System.Security.Cryptography.RandomNumberGenerator]::Create().GetBytes($bytes)
$hex = -join ($bytes | ForEach-Object { $_.ToString("x2") })
Set-Content -Path "$dir\secrets\app_server_token" -Value $hex -Encoding ascii -NoNewline

Save the same docker-compose.yml as above in $HOME\docker_volumes\letta. Then:

Run in terminalpowershell
docker compose up -d
docker compose logs letta
curl.exe http://127.0.0.1:4500/readyz
docker compose exec letta letta --backend local connect ollama --base-url http://host.docker.internal:11434/v1
docker compose exec letta letta --backend local --new-agent
$token = (Get-Content "$dir\secrets\app_server_token" -Raw).Trim()
curl.exe -H "Authorization: Bearer $token" http://127.0.0.1:4500/v1/models

Check it worked. ok, then your agent in the model list. ASCII encoding matters: a byte-order mark would change the token.

Mac (Terminal)#

Same commands and Compose file as Linux, with Docker Desktop running. Check it worked: same as Linux.

Tip: Do not copy docker run lines or Compose files from older posts. The image now refuses old settings (see Troubleshooting).

Add a chat window#

Three limits first. The hosted chat.letta.com does not work with self-hosted agents. The letta command cannot connect to a remote App Server: SSH in, or use docker compose exec. Browsers cannot call the App Server directly: it answers HTTP 403 to any request with an Origin header. A server-side tool must sit in between.

Open WebUI, LibreChat and LobeChat are such tools. Our Compose file has --openai-api, so Letta serves GET /v1/models, POST /v1/chat/completions and POST /v1/responses, and each agent is a "model".

  1. Add an OpenAI-compatible connection. Base URL: http://letta:4500/v1 if the chat tool runs in Docker on the same network as Letta (for example the proxy network below), or http://127.0.0.1:4500/v1 if it runs on the host.
  2. Paste the token file's contents as the API key.
  3. For Open WebUI, set ENABLE_FORWARD_USER_INFO_HEADERS=true on the Open WebUI container, not on Letta. Each chat then gets its own Letta conversation. Otherwise each request starts a fresh temporary one, unless the client sends an X-Letta-Chat-Key header.

Check it worked. Your agent appears in the model list, and two messages in a row show it keeps the thread. Our LibreChat guide covers one such front end.

Put it behind HTTPS with Traefik#

Skip this if you only use Letta on your own computer. You need a domain with a DNS record and ports 80 and 443. Use a dedicated name such as letta.<your-domain>: the docs describe no sub-path support. Drop the ports: block so 4500 is not exposed. Create the shared network once:

Run in terminalbash
docker network create proxy

With Traefik#

Change the Letta service like this and run docker compose up -d:

File contentyaml
services:
  letta:
    image: ghcr.io/letta-ai/letta-code:0.34.70
    container_name: letta
    restart: unless-stopped
    command:
      - letta
      - server
      - --backend
      - local
      - --listen
      - ws://0.0.0.0:4500
      - --ws-auth
      - capability-token
      - --ws-token-file
      - /run/secrets/app_server_token
      - --openai-api
    environment:
      - LETTA_CODE_TELEM=0
      - DO_NOT_TRACK=1
    volumes:
      - ./state:/root/.letta
      - ./workspace:/workspace
      - ./secrets/app_server_token:/run/secrets/app_server_token:ro
    extra_hosts:
      - "host.docker.internal:host-gateway"
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.letta.rule=Host(`letta.<your-domain>`)"
      - "traefik.http.routers.letta.entrypoints=https"
      - "traefik.http.routers.letta.tls=true"
      - "traefik.http.services.letta.loadbalancer.server.port=4500"

networks:
  proxy:
    external: true

Check it worked. curl -I https://letta.<your-domain>/readyz returns an HTTP 200 status line with a valid certificate.

Without Traefik: Caddy#

Use the Letta file above minus the labels: block (keep networks:). Caddy renews its own certificates and proxies WebSockets by itself. Mount the conf folder, not a single file:

Run in terminalbash
mkdir -p ~/docker_volumes/caddy/{conf,data,config}
cd ~/docker_volumes/caddy
cat > docker-compose.yml << 'EOF'
services:
  caddy:
    image: caddy:2.11.9
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy:ro
      - ./data:/data
      - ./config:/config
    networks:
      - proxy

networks:
  proxy:
    external: true
EOF

Save ~/docker_volumes/caddy/conf/Caddyfile:

File contenttext
letta.example.com {
    reverse_proxy letta:4500
}

For a home-only name add tls internal inside the braces and trust Caddy's root once per device (our Caddy guide shows how). Start both stacks with docker compose up -d. Use letta:4500, never 127.0.0.1:4500: inside Caddy that is Caddy itself. The Docker commands are the same in PowerShell.

Check it worked. curl -I https://letta.example.com/readyz shows an HTTP status line over HTTPS.

Security and testing#

The docs warn that the App Server has shell and filesystem access on its host. Anyone with the token has it too.

ControlHow
AuthenticationRequired off loopback. Exact error without it: refusing to start non-loopback websocket listener 0.0.0.0:4500 without auth; configure --ws-auth capability-token or --ws-auth signed-bearer-token
Tokenchmod 600, never in browser code (docs: keep it in your backend or secret store)
What the agent can touchMount only ./workspace. Never mount /var/run/docker.sock or ~/.ssh
Permission modeThe interactive default is unrestricted. Use standard or strict (asks for every tool call)
Your settings fileOpen issues 5462 and 5797 (see Troubleshooting) weaken deny rules. Rely on container isolation, not rules alone
Provider keysUse a dedicated key with a spend cap
TelemetryOff in our files. The source skips it when LETTA_CODE_TELEM is 0 or false, or DO_NOT_TRACK is 1

On telemetry: by default the source sends Letta's API events such as session start (version, platform), tool names, errors, user_input events and token counts. We did not check what user_input carries. Provider calls and agent tools have their own traffic, so this is not an air-gapped mode.

Quick tests (use curl.exe on Windows):

Run in terminalbash
curl -i http://127.0.0.1:4500/healthz
curl -i http://127.0.0.1:4500/app-server-info
curl -i -H "Authorization: Bearer $TOKEN" http://127.0.0.1:4500/app-server-info
curl -i -H "Origin: https://example.com" -H "Authorization: Bearer $TOKEN" http://127.0.0.1:4500/v1/models

Expect 200 and ok; a refusal without the token; 200 with it; 403 for the Origin request.

Common mistakes#

These come from the docs, the source code and GitHub issues.

MistakeWhy it happensDo this instead
Following a Docker, PostgreSQL, port 8283 or "ADE" tutorialIt describes the retired Letta V1 server (last release 0.16.8). The new image exits with code 64 if given those settingsUse Letta Code and letta server --backend local as here
Cloning the deployment repository the docs linkIt now redirects to letta-computer-deployment, which connects outward to Letta Cloud and keeps state thereUse our Step 2 file, or the plain letta server --listen command
npm install -g on an old Nodenpm silently installs an older Letta that fits that NodeNode 22.23.4 or newer, and pin @0.34.70
Pinning a release older than 0.34.66 with --openai-apiChat requests hang with no answer (issue 5609); the fix, PR 5619, is in v0.34.66Pin 0.34.66 or newer, as this guide does
sudo npm install -gRoot-owned files break self-update (docs)nvm, a user npm prefix, or uv/pipx
Skipping --backend localREADME, CLI docs and settings docs describe the first run differently; bare letta server is cloud modeRun letta backend local once and pass the flag in scripts
Opening chat.letta.com or the CLI against a remote App ServerNeither supports self-hosted servers (FAQ)SSH in and run letta there, or use Open WebUI through --openai-api
Ollama turns hang about a minute, then failSlow first-token on a big prompt trips the 60 s stall timer (issue 4650)Set LETTA_STREAM_STALL_RECONCILE_MS=600000; shrink memory and skills
The agent forgets its nameThe model server serves a smaller context than advertised and cuts the prompt start (PR 3838)Raise the served context (Ollama: OLLAMA_CONTEXT_LENGTH); check /context-limit
localhost:11434 inside the containerIn a container localhost is the containerhttp://host.docker.internal:11434/v1 and extra_hosts; Ollama on 0.0.0.0
A typo in .letta/settings.jsonUnreadable JSON drops permissions.deny and the mode (issue 5462)Validate the file after every edit; start with an explicit --permission-mode
Using letta --import, /export or .af filesAgentFile support was removed in v0.32.2Back up the state folder (see below)
AI assistants: an invented image name, port 8283, LETTA_SERVER_PASSWORD, SECURE, pg_dump, letta connect vllm, DISABLE_SIGNUPThey mix the retired server with the new one. No such flags exist for Letta CodeImage ghcr.io/letta-ai/letta-code:0.34.70, --ws-auth, and letta connect openai-compatible for vLLM

Tip: Press Ctrl+F on any Letta tutorial and search for 8283 and postgres. If either is a setup step, it is for the retired server. Close the tab.

Tip: Set ENABLE_FORWARD_USER_INFO_HEADERS=true on Open WebUI, not on Letta, as the FAQ says. Otherwise chats mix into one conversation.

Troubleshooting#

ProblemSolution
Container exits at once or will not startRead docker compose logs letta; the exact texts below cover the two usual causes
connect ollama cannot reach the hostOllama is running? OLLAMA_HOST=0.0.0.0:11434 set? extra_hosts present?
Every client message starts a new conversationSend a stable X-Letta-Chat-Key header, or set the Open WebUI variable
WebSocket client gets HTTP 426It uses the old ?channel=control or ?channel=stream URL. Use the single /ws socket
/v1/models is emptyNo agent exists yet. Create one with --new-agent
Open WebUI sits on "Responding" during a long tool runOpen issue 3647: no heartbeat on the stream during silent tool work. Wait, or run shorter jobs
Memory use keeps growingOpen issue 5848. Restart the container in quiet hours

Exact error texts#

  • The retired Python Letta server is end-of-life and this image now contains Letta Code. Then: The old PostgreSQL data cannot be mounted directly into the current server. Back up the old data, remove the V1 settings, start fresh.
  • refusing to start non-loopback websocket listener 0.0.0.0:4500 without auth Add the auth flags and the token file.
  • Stream ended without finish_reason or no run id arrived (issue 4650): slow prompt processing. Raise LETTA_STREAM_STALL_RECONCILE_MS.
  • Error loading project settings, using defaults (issue 5462): your settings JSON is broken. Fix it now, because the deny rules may not apply.
  • 404 Model not found: llama2 (closed issue 2791, seen on 0.27.7): helper agents picked the wrong model. Fixed by PR 2796.

Known bugs (open, November 2026)#

Most were reported on older builds. We did not check them on v0.34.70.

  • 4650: local Ollama turns stall on slow first tokens.
  • 5462: an unparseable settings file starts the agent in unrestricted mode.
  • 5797: a lone &, as in ls & rm -rf ./x, passes as read-only; deny rules check only the first segment.
  • 5594: one blocking git show per memory file freezes the server.
  • 5747: control characters in a tool result break compaction with a 400 error for good.
  • 5816: each headless letta -p loads every conversation's prompt file; out of memory on a 4 GB host.
  • 5848: the local App Server grew to about 3 GB within 10 to 60 minutes.
  • 5624: in one Docker report each conversation sync blocked the server for about 3 seconds on slow storage; a restart with 120 conversations froze it for minutes.
  • 3647: the /v1 stream stalls during silent tool work, and Open WebUI times out (reported on 0.30.2).

Diagnose with:

Run in terminalbash
docker compose ps
docker compose logs --tail=100 letta
docker stats --no-stream letta

Updates and backups#

Update. Read the release notes, back up, change the tag in docker-compose.yml, then:

Run in terminalbash
cd ~/docker_volumes/letta
docker compose pull
docker compose up -d
curl http://127.0.0.1:4500/readyz

The image sets DISABLE_AUTOUPDATER=1. On the npm route Letta updates itself unless you set that variable; then use letta update or npm install -g @letta-ai/letta-code@<version>.

Back up. The docs say self-hosted agents are not backed up automatically. Everything lives in the state folder (memory is under state/lc-local-backend/memfs/<agent-id>/memory). Add the token, the Compose file and workspace. Stop the container first so the files are quiet. Old V1 PostgreSQL data cannot be mounted, and no official migration was found.

Run in terminalbash
cd ~/docker_volumes/letta
docker compose stop letta
sudo tar -czf "backups/letta-$(date +%F).tar.gz" state secrets workspace docker-compose.yml
sudo chmod 600 backups/letta-*.tar.gz
docker compose start letta

The container writes as root, so sudo may be needed. Schedule it at 03:00 with crontab -e (Linux, Mac). The archive holds the token: keep it private, or use our restic guide.

Windows (PowerShell)#

Codepowershell
Set-Location "$HOME\docker_volumes\letta"
docker compose stop letta
tar -czf "backups\letta-$(Get-Date -Format yyyy-MM-dd).tar.gz" state secrets workspace docker-compose.yml
docker compose start letta

tar.exe ships with Windows 10 and 11. Run it nightly with Task Scheduler.

Restore test. Unpack into a new empty folder, never over the live one:

Run in terminalbash
mkdir -p /tmp/restore-test && tar -xzf backups/letta-<date>.tar.gz -C /tmp/restore-test
ls /tmp/restore-test/state/lc-local-backend/memfs

You should see your agent folders.

Performance and resources#

There is no official RAM figure. The image is about 312 MB compressed on amd64 and arm64. Measure your setup with docker stats.

WhatMeasured by users (not by us)
First token on a local 8B model60 to 150 seconds with a 15k-token prompt, on a laptop (4650)
Server RAM over timeAbout 3 GB within 10 to 60 minutes (5848)

Tuning the docs support: keep few files at the root of the agent's memory, because only root files load into every prompt. Put reference notes in sub-folders with their own MEMORY.md.

Alternatives#

ToolHow memory worksPick it when
LettaThe agent edits its own Git-tracked MarkdownYou want one agent with a lasting identity and tools
Mem0A memory layer that stores extracted factsYou add memory to your own app (Mem0 guide)
CogneeA knowledge graph built from documentsYou need relations across many files (Cognee guide)

FAQ#

Is Letta still MemGPT? The name changed. The old MemGPT server is retired; Letta Code is the maintained project.

Can I run it without an OpenAI or Anthropic account? Yes. Use --backend local and a local model server. No Letta account is needed either.

Why does my agent forget everything? Check that you resumed the same agent, not a new one. If it denies its own name, the served context is probably too small.

Can I use chat.letta.com with local agents? No. It works only with Letta Cloud agents. Use Open WebUI or LibreChat through --openai-api.

Do I need PostgreSQL or a vector database? No. MemFS is Git-tracked Markdown with no vector index by default. Optional search is a separate add-on.

Sources#

Checked against the official docs on 2026-11-25.