Install & Compatibility
Where this runs
tested against v0.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
880MB installed
● package 880MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Letta
✓ from letta_client import Letta
✗ from memgpt import create_client
memgpt package is abandoned. All imports from memgpt.* will fail.
Letta (server)
✓ from letta import create_client
✗ import memgpt
Only use letta (not letta_client) if you are running the full server runtime locally.
Create a stateful Letta agent via the API client. Requires a running Letta server or Letta Cloud API key.
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)
letta --version
Debug
Known issues
breakingpip install memgpt is abandoned. Package renamed to letta in September 2024. All memgpt.* imports fail.fixpip install letta-client and update all imports to from letta_client import Letta
affects: memgpt < 0.4.0
breakingLetta agents are server-side resources, not in-process Python objects. You cannot instantiate an agent locally without a running Letta server.fixStart the server via Docker (letta/letta:latest) or use Letta Cloud before making any client calls.
affects: all
breakingOld memgpt API patterns (create_client(), Agent(), memgpt.run()) do not exist in the letta package. Architecture changed completely.fixUse letta-client SDK with client.agents.create() and client.agents.messages.create().
affects: memgpt all versions
breakingThe `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.fixIf 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.
affects: letta all versions
gotchaMemGPT 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.fixIgnore any tutorial using memgpt package or memgpt.* imports. Use letta-client docs at docs.letta.com.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'memgpt'
The Python package 'memgpt' has been renamed to 'letta' and is no longer available under its old name on PyPI.
fixUninstall 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`.
memgpt command not found
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.
fixInstall the `letta` package using `pip install letta` to get the new CLI, and then use the `letta` command instead of `memgpt`.
ModuleNotFoundError: No module named 'letta.server'
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.
fixIf 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`.
letta connection refused
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.
fixEnsure 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.
AttributeError: 'Client' object has no attribute 'create_agent'
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.
fixAccess agent-related operations through the `agents` property of the client, for example, `client.agents.create(...)` to create a new agent on the server.
Upgrade
Version history
0.16.8latest on PyPI · released May 14, 2026
Audit
Dependencies
openairequiredDefault LLM backend. Required unless configured to use another provider.
postgresqloptionalRequired by letta server for agent persistence. Docker image bundles it.