MemGPT / Letta
raw JSON → 0.16.4 verified Tue May 12 auth: yes python install: verified quickstart: verified renamed
Stateful agent framework formerly known as MemGPT. Renamed to Letta in September 2024. PyPI package moved from memgpt to letta. Two packages: letta (full server runtime) and letta-client (API client only). Agents are server-side persistent resources, not in-process Python objects.
pip install letta-client Common errors
error ModuleNotFoundError: No module named 'memgpt' ↓
cause The Python package 'memgpt' has been renamed to 'letta' and is no longer available under its old name on PyPI.
fix
Uninstall the old package (if present) with
pip uninstall memgpt and install the new package using pip install letta (for server and client) or pip install letta-client (for client only). Then update your Python imports from memgpt to letta.client. error memgpt command not found ↓
cause The command-line interface executable for MemGPT has been renamed to `letta` and is not found in your system's PATH under the old name.
fix
Install the
letta package using pip install letta to get the new CLI, and then use the letta command instead of memgpt. error ModuleNotFoundError: No module named 'letta.server' ↓
cause You have installed `letta-client`, which only provides the API client components, but are attempting to import server-side modules that are exclusive to the full `letta` server package.
fix
If you intend to run the Letta server or access its internal modules, you must install the complete
letta package using pip install letta instead of letta-client. error letta connection refused ↓
cause The `letta` server, which your client application is attempting to connect to, is either not running or is inaccessible at the default (or specified) network address and port.
fix
Ensure the
letta server is running (e.g., by executing letta run in a separate terminal) and that your client application is configured to connect to the correct host and port. error AttributeError: 'Client' object has no attribute 'create_agent' ↓
cause You are attempting to call an agent creation method directly on the `Client` object, but agent management operations are typically accessed via the `client.agents` interface.
fix
Access agent-related operations through the
agents property of the client, for example, client.agents.create(...) to create a new agent on the server. Warnings
breaking pip install memgpt is abandoned. Package renamed to letta in September 2024. All memgpt.* imports fail. ↓
fix pip install letta-client and update all imports to from letta_client import Letta
breaking Letta agents are server-side resources, not in-process Python objects. You cannot instantiate an agent locally without a running Letta server. ↓
fix Start the server via Docker (letta/letta:latest) or use Letta Cloud before making any client calls.
breaking Old memgpt API patterns (create_client(), Agent(), memgpt.run()) do not exist in the letta package. Architecture changed completely. ↓
fix Use letta-client SDK with client.agents.create() and client.agents.messages.create().
breaking The `letta` package (full server runtime) is distinct from `letta-client`. While most applications only need `letta-client`, attempting to install `letta` (the server) directly requires Python >= 3.10. ↓
fix If you only need the client, use `pip install letta-client`. If you intend to install the full `letta` server package, ensure your Python environment is 3.10 or higher (e.g., use a `python:3.10-slim` or newer Docker image) or run the server via Docker directly.
gotcha MemGPT as a term now refers only to the research paper's agent design pattern, not the framework. Searching 'MemGPT Python' returns a mix of abandoned pymemgpt, transition-era letta 0.x, and current letta-client code — all incompatible. ↓
fix Ignore any tutorial using memgpt package or memgpt.* imports. Use letta-client docs at docs.letta.com.
Install
pip install letta docker run -v ~/.letta/.persist/pgdata:/var/lib/postgresql/data -p 8283:8283 -e OPENAI_API_KEY=your_key letta/letta:latest Install compatibility verified last tested: 2026-05-12
python os / libc variant status wheel install import disk
3.10 alpine (musl) letta - - 2.63s 564.1M
3.10 alpine (musl) letta-client - - 1.10s 90.6M
3.10 slim (glibc) letta - - 2.03s 578M
3.10 slim (glibc) letta-client - - 0.80s 161M
3.11 alpine (musl) letta - - 3.32s 621.6M
3.11 alpine (musl) letta-client - - 1.57s 98.8M
3.11 slim (glibc) letta - - 2.35s 636M
3.11 slim (glibc) letta-client - - 1.30s 169M
3.12 alpine (musl) letta - - 2.88s 603.8M
3.12 alpine (musl) letta-client - - 1.60s 89.5M
3.12 slim (glibc) letta - - 2.41s 618M
3.12 slim (glibc) letta-client - - 1.58s 160M
3.13 alpine (musl) letta - - - -
3.13 alpine (musl) letta-client - - 1.46s 86.0M
3.13 slim (glibc) letta - - 1.84s 927M
3.13 slim (glibc) letta-client - - 1.43s 158M
3.9 alpine (musl) letta - - - -
3.9 alpine (musl) letta-client - - 1.07s 89.6M
3.9 slim (glibc) letta - - - -
3.9 slim (glibc) letta-client - - 0.92s 160M
Imports
- Letta wrong
from memgpt import create_clientcorrectfrom letta_client import Letta - Letta (server) wrong
import memgptcorrectfrom letta import create_client
Quickstart verified last tested: 2026-05-12
from letta_client import Letta
import os
client = Letta(api_key=os.getenv("LETTA_API_KEY"))
agent = client.agents.create(
model="openai/gpt-4o",
memory_blocks=[
{"label": "human", "value": "Name: Alice"},
{"label": "persona", "value": "I am a helpful assistant."}
]
)
response = client.agents.messages.create(
agent.id,
input="Hello, remember my name."
)
print(response.messages[0].content)