Letta
ActiveDescription
Letta (formerly MemGPT) is an open-source framework for building stateful AI agents with advanced reasoning and transparent long-term memory. It allows you to visually test, debug, and observe agents.
Key Features
- Persistent long-term memory — agents remember user preferences, context, and history across sessions
- Memory block management — structured state via configurable memory blocks (human, persona)
- CLI interface — run memory-powered agents directly in terminal via Letta Code CLI
- REST API integration — Python/TypeScript SDK to embed stateful agents into your apps
- Skills and subagent support — built-in skill system and subagent orchestration
- Model-agnostic architecture — works with any LLM backend, freely switchable
Use Cases
Tags
Categories
Quick Start
npm install @letta-ai/letta-client
import Letta from "@letta-ai/letta-client";
const client = new Letta({ apiKey: process.env.LETTA_API_KEY });
const agentState = await client.agents.create({
model: "openai/gpt-5.2",
memory_blocks: [
{ label: "human", value: "Name: Alice. Role: developer." },
{ label: "persona", value: "I am a helpful coding assistant." }
],
tools: ["web_search", "fetch_webpage"],
});
const response = await client.agents.messages.create(agentState.id, {
input: "What do you know about me?",
});
for (const message of response.messages) {
console.log(message);
}