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.
How it works
Section titled “How it works”- You set your Anthropic base URL to point to the Letta proxy (
https://api.letta.com/v1/anthropic) - Letta captures your requests and prepends a Claude Code-specific agent’s memory blocks to the prompt
- Anthropic processes the request and returns the response
- 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.
Requirements
Section titled “Requirements”- 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:
export ANTHROPIC_BASE_URL=https://api.letta.com/v1/anthropicexport ANTHROPIC_AUTH_TOKEN=<your-letta-api-key>Then start Claude Code:
claudeOr run it all in one line:
ANTHROPIC_BASE_URL=https://api.letta.com/v1/anthropic ANTHROPIC_AUTH_TOKEN=sk-let-... claudeYou should start noticing Claude accumulating memory. Try asking it what memory blocks it has available.
Specifying an agent
Section titled “Specifying an agent”By default, Letta creates and uses a single agent for all your Claude Code sessions. To use a specific agent:
export ANTHROPIC_CUSTOM_HEADERS="X-LETTA-AGENT-ID:agent-xxx"z.ai integration
Section titled “z.ai integration”If you use the z.ai coding plan through Claude Code, set these environment variables instead:
export ANTHROPIC_BASE_URL=https://api.letta.com/v1/zaiexport ANTHROPIC_AUTH_TOKEN=<your-letta-api-key>export ANTHROPIC_API_KEY=<your-zai-api-key>Feedback
Section titled “Feedback”This is a proof of concept and we’re actively improving observability and ease of use. Join our Discord to share feedback.