Skip to content
Sign up

Claude Code memory proxy

Add persistent Letta memory to your Claude Code sessions

Add persistent Letta memory to your Claude Code instance. Claude becomes a persistent entity across every session, similar to CLAUDE.md but passively managed with a customizable memory architecture.

  1. You set your Anthropic base URL to point to the Letta proxy (https://api.letta.com/v1/anthropic)
  2. Letta captures your requests and prepends a Claude Code-specific agent’s memory blocks to the prompt
  3. Anthropic processes the request and returns the response
  4. A Letta sleeptime agent processes the conversation and performs memory operations in the background

This gives Claude persistent memory that improves over time. You get a single agent across all Claude Code instances, meaning Claude is personalized to you wherever you start it.

  • A Letta Developer Platform account and API key
  • A Claude Code subscription (Max/Pro) or Anthropic API key
  • Letta credits for sleeptime memory operations (free tier includes $5/month)

Set these environment variables before starting Claude Code:

Terminal window
export ANTHROPIC_BASE_URL=https://api.letta.com/v1/anthropic
export ANTHROPIC_AUTH_TOKEN=<your-letta-api-key>

Then start Claude Code:

Terminal window
claude

Or run it all in one line:

Terminal window
ANTHROPIC_BASE_URL=https://api.letta.com/v1/anthropic ANTHROPIC_AUTH_TOKEN=sk-let-... claude

You should start noticing Claude accumulating memory. Try asking it what memory blocks it has available.

By default, Letta creates and uses a single agent for all your Claude Code sessions. To use a specific agent:

Terminal window
export ANTHROPIC_CUSTOM_HEADERS="X-LETTA-AGENT-ID:agent-xxx"

If you use the z.ai coding plan through Claude Code, set these environment variables instead:

Terminal window
export ANTHROPIC_BASE_URL=https://api.letta.com/v1/zai
export ANTHROPIC_AUTH_TOKEN=<your-letta-api-key>
export ANTHROPIC_API_KEY=<your-zai-api-key>

This is a proof of concept and we’re actively improving observability and ease of use. Join our Discord to share feedback.