A minimal starter for Letta (formerly MemGPT), built for developers who want to create stateful agents that keep useful memory across sessions. Instead of sending every prompt to a stateless chat endpoint, this project runs a Letta agent with persistent human and persona memory blocks. The agent can update those blocks as it learns about the user, then remember them when the CLI restarts.
Live website: https://tirth1263.github.io/letta-starter/
The default inference path is Nebius Token Factory through an OpenAI-compatible endpoint, using Qwen/Qwen3-30B-A3B.
Most starter agents feel impressive until you restart them. Letta Starter is designed to show the missing piece: durable agent memory. You can tell the agent your name, preferences, goals, or favorite project style, close the CLI, run it again, and ask what it remembers.
This makes it a clean foundation for:
- personal assistants that remember user preferences
- prototype support agents with long-lived context
- memory-first demos for AI agent portfolios
- experiments with Letta, MemGPT-style memory, and OpenAI-compatible model providers
- Stateful Letta agent with persistent core memory
- Two editable memory blocks:
humanandpersona - Automatic memory management through Letta memory tools
- Nebius Token Factory inference via OpenAI-compatible configuration
- Interactive Python CLI with readable output
- Docker Compose setup for the Letta server
- Static project website ready for deployment
- GitHub Pages workflow for public website publishing
User terminal
|
v
Python CLI (main.py)
|
v
Letta client SDK
|
v
Local Letta server on Docker
|
v
Nebius Token Factory model endpoint
Letta stores the agent state, message history, and memory blocks on the server side. The CLI only loads or creates the agent, sends user messages, and displays the current memory after each turn.
- Python 3.10+
- Docker
- Nebius API key from Nebius Token Factory
Copy the environment template:
cp .env.example .envAdd your Nebius key to .env:
NEBIUS_API_KEY=your_nebius_token_factory_api_keyStart Letta:
docker compose up -dOr run Docker directly:
docker run -d --name letta -p 8283:8283 \
-e OPENAI_API_KEY=$NEBIUS_API_KEY \
-e OPENAI_API_BASE=https://api.tokenfactory.nebius.com/v1 \
letta/letta:latestPowerShell:
docker run -d --name letta -p 8283:8283 `
-e OPENAI_API_KEY=$env:NEBIUS_API_KEY `
-e OPENAI_API_BASE=https://api.tokenfactory.nebius.com/v1 `
letta/letta:latestThe original reference screenshot used https://api.studio.nebius.ai/v1. Nebius Token Factory currently documents https://api.tokenfactory.nebius.com/v1, so this starter uses the current endpoint by default. You can set NEBIUS_BASE_URL in .env if your account uses a different endpoint.
pip install -r requirements.txt
# or: uv syncThe defaults in .env.example are ready for the local Docker server:
LETTA_BASE_URL=http://localhost:8283
LETTA_AGENT_NAME=letta-starter-agent
LETTA_MODEL=openai/Qwen/Qwen3-30B-A3B
LETTA_EMBEDDING=openai/Qwen/Qwen3-Embedding-8BLeave LETTA_API_KEY blank when using the local Docker server. Set it only if you adapt the starter for Letta Cloud.
python main.pyTry this sequence:
- Say:
Hi, my name is Arindam and I love building AI apps. - Exit the CLI.
- Start it again with
python main.py. - Ask:
What's my name and what do I like to build?
The agent should answer from its persisted human memory block.
.
|-- main.py # Interactive Letta CLI
|-- requirements.txt # pip dependencies
|-- pyproject.toml # uv-compatible project metadata
|-- docker-compose.yml # Letta server container
|-- .env.example # Safe environment template
|-- docs/quickstart.md # Screenshot-style setup walkthrough
|-- site/ # Deployment-ready static website
`-- LICENSE
If the CLI cannot connect, make sure the Letta container is running:
docker ps
docker logs lettaIf the model call fails, check:
NEBIUS_API_KEYis set and validNEBIUS_BASE_URLmatches the endpoint shown in your Nebius dashboardLETTA_MODELmatches an available Nebius model nameLETTA_EMBEDDINGmatches an available embedding model
If Docker says the container name already exists:
docker rm -f letta
docker compose up -dMIT