Letta

L4 — Intelligent Retrieval Agent Memory Free (OSS) / Letta Cloud Apache-2.0 · OSS

OSS framework for stateful agents with persistent memory hierarchies (formerly MemGPT). Apache-2.0. Manages core/recall/archival memory across conversations. Backed by Postgres and vector stores.

AI Analysis

Letta is an OSS framework for stateful agents with persistent memory hierarchies — the production evolution of MemGPT (the academic paper from UC Berkeley that introduced operating-system-style memory management for LLM context). Apache-2.0 license, with Letta Cloud as the managed offering. Pick Letta when your agent needs memory beyond the LLM's context window — long-running conversations, user preferences over months, knowledge accumulation across sessions. Distinct from RAG: RAG retrieves from external corpora at query time; Letta manages the agent's own state evolution. The category-defining tool for L4 Agent Memory.

Trust Before Intelligence

Letta encodes a specific architectural decision about agent state: it's not just retrieval, it's first-class memory that the agent can read AND write. From a Trust Before Intelligence lens, that's a meaningful trust expansion — the agent now has persistent identity-shaping state, not just transient session state. This raises questions traditional RAG architectures don't: how do you audit what the agent has learned? How do you delete a user's memory on GDPR request? How do you prevent prompt-injection from corrupting the persistent memory? Letta provides the primitives (memory hierarchy with explicit read/write boundaries, archival memory in Postgres or vector DB) but the operator must use them deliberately. Treating Letta's memory layer as 'just a database' misses the trust implications of agent-controlled writes.

INPACT Score

25/36
I — Instant
4/6

Memory retrieval depends on storage backend (Postgres + vector DB typically). Sub-100ms for hot memory + recall queries; archival lookups depend on vector DB latency. Cap rule N/A.

N — Natural
4/6

Programming framework with explicit memory operations as first-class primitives. core_memory_replace, archival_memory_insert, recall_memory_search are the agent's tools for managing its own state. Cap rule N/A.

P — Permitted
3/6

Per-agent state isolation via agent_id; deployment-driven authentication via API key or SSO in Letta Cloud. RBAC at the API level. Cap rule applied: P-low for agent frameworks without engine-level ABAC.

A — Adaptive
5/6

Pluggable storage backends (Postgres, SQLite, vector DBs). Multi-cloud via Letta Cloud or self-host. Strong portability.

C — Contextual
5/6

Memory hierarchy is explicit context: core memory (always in prompt), recall memory (recent message history), archival memory (long-term searchable). Plus tool-call traces, state changes. Strong C dimension — context IS what Letta manages.

T — Transparent
4/6

Memory operation logs, agent state inspection, message history with full trace. Per-session cost not native (depends on LLM provider). Cap rule N/A.

GOALS Score

18/25
G — Governance
3/6

G1=N (no engine-level ABAC), G2=Y (memory operation logs), G3=N, G4=Y (memory versioning via history), G5=N, G6=N. 2/6 -> 2; bumped to 3 for memory-as-audit-trail.

O — Observability
3/6

O1=Y (Letta Cloud has dashboards; OSS exposes basic metrics), O2=N, O3=N (no per-operation cost — depends on LLM provider), O4=Y (memory health monitorable), O5=N, O6=N. 2/6 -> 3 lenient.

A — Availability
3/6

A1=Y (sub-100ms hot memory), A2=Y (memory writes immediately available), A3=N (no integral cache beyond Postgres page cache), A4=N (single-instance OSS; multi-instance requires careful deployment), A5=N (memory backends scale but framework newer), A6=N (sequential memory ops typical). 2/6 -> 3.

L — Lexicon
5/6

L1=Y (memory entities have stable identity), L2=N, L4=Y (continuous learning IS what memory does), L5=Y (memory section names, agent persona, tool registry), L6=N. 3/6 -> 5 lenient (memory-management is a specialized lexicon discipline; this is Letta's strongest dimension).

S — Solid
4/6

S1=Y (memory writes are deterministic given inputs), S2=Y (typed memory blocks), S3=Y (single-source-of-truth per agent), S4=Y (typed schemas for memory blocks), S5=N (no built-in content quality validation on memory writes — this is a real risk), S6=Y (memory operation logs flag anomalies). 5/6 -> 4.

AI-Identified Strengths

  • + Memory hierarchy is first-class: core (always in prompt), recall (message history), archival (searchable long-term). Explicit boundaries help reason about what the agent knows.
  • + Apache-2.0 license; built by the MemGPT paper authors. Active research-driven trajectory.
  • + Storage-backend-pluggable: Postgres, SQLite, vector DB. Self-host or Letta Cloud.
  • + Agent-controlled memory writes — the agent CAN evolve its own state, not just read from external retrieval
  • + Compatible with multiple LLM providers (OpenAI, Anthropic, Mistral, self-hosted vLLM via OpenAI-compatible API)
  • + Tool-use ergonomics work alongside memory primitives — agent can call tools AND manage memory in the same conversation
  • + Letta Cloud provides managed BAA-signing path (separate from OSS posture)

AI-Identified Limitations

  • - Memory writes are an attack surface for prompt injection. An attacker who shapes a prompt can in principle shape persistent memory.
  • - Single-instance OSS without obvious horizontal scaling story for the framework itself (though storage backends scale)
  • - No native compliance attestation; depends on Letta Cloud or your substrate
  • - Memory model decisions are opinionated — works well for conversational agents, less well for transactional agents that don't need persistent state
  • - Newer framework; smaller production track record than e.g. LangChain or LlamaIndex (though those don't solve the same problem)
  • - GDPR / right-to-be-forgotten implementation requires explicit memory-deletion APIs that you must wire correctly
  • - Cost attribution per-agent is operator's responsibility; not surfaced as a first-class metric

Industry Fit

Best suited for

Conversational agents with multi-session continuity (customer support, personal assistant, tutoring)Long-running agent workflows (multi-day project planning, research assistants)Personalization-heavy applications where the agent learns user preferences across sessionsResearch deployments using MemGPT's academic primitives in production formWorkloads on Letta Cloud needing managed BAA-signing path (healthcare conversational agents)Multi-agent stacks where each agent has distinct persistent state

Compliance certifications

Letta (OSS) holds no compliance certifications. Letta Cloud (managed) advertises BAA availability and SOC 2 path — verify with sales for current attestation status. Self-hosted Letta inherits substrate compliance only. GDPR right-to-be-forgotten is operator responsibility — ensure memory deletion APIs are wired and tested.

Use with caution for

Transactional agents that don't need persistent state — overhead isn't justifiedCompliance workloads without GDPR right-to-be-forgotten planHigh-trust scenarios without prompt-injection guardrails (memory writes are an attack surface)Production stacks needing horizontal-scale-out of the framework itself — newer; ops story still maturingWorkloads needing the broadest framework integration (LangChain ecosystem) — Mem0 may fit better there

AI-Suggested Alternatives

Mem0

Mem0 is the most direct alternative — Apache-2.0 OSS, similar memory-layer-for-agents framing. Letta wins on memory hierarchy first-class (core/recall/archival); Mem0 wins on framework integration breadth (LangChain/LlamaIndex/CrewAI plugins are smoother). Both are emerging; pick on integration ergonomics.

View analysis →
LangChain

LangChain provides ConversationBufferMemory + ConversationSummaryMemory primitives but they're simpler than Letta's hierarchy. Use Letta when memory-as-OS is the architecture; use LangChain memory primitives for simpler conversational state.

View analysis →
Redis

Redis is a primitive (in-memory KV); Letta is a framework that uses Redis-like backends. Use Redis directly for transient session state; use Letta for persistent agent memory with hierarchy + write-side semantics.

View analysis →

Integration in 7-Layer Architecture

Role: L4 Agent Memory framework. Manages persistent agent state (core/recall/archival hierarchy) backed by Postgres + vector DB. Used inside L7 agent runtimes that need cross-session continuity.

Upstream: Receives memory operations from L7 agent runtime (read/write API). Receives raw model completions from L4 LLM providers (OpenAI, Anthropic, Mistral, vLLM). Memory writes come from agent tool calls.

Downstream: Returns memory contents to the agent's prompt context. Persists state changes to L1 storage (Postgres + vector DB). Memory operation logs feed L6 observability + L5 audit.

⚡ Trust Risks

high Prompt injection corrupts persistent memory. An attacker engineers a conversation that causes the agent to write poisoned content to archival memory.

Mitigation: Validate all memory writes against safety guardrails (NeMo Guardrails, Promptfoo policies). Implement write-time review for sensitive memory blocks. Periodic audits of archival memory for anomalies. Don't let untrusted users influence memory writes that affect other users.

high GDPR / right-to-be-forgotten request can't be fulfilled because memory is scattered across storage backends without identity tagging

Mitigation: Tag every memory write with user_id (or agent_owner). Implement explicit deletion API that traverses all storage backends. Test the deletion flow regularly (automated GDPR-fire-drill).

high Memory hierarchy treated as 'just a database' without understanding the trust implications of agent-controlled writes

Mitigation: Define explicit policies for what the agent can write to which memory tier. Core memory (always in prompt) needs strict gating. Archival memory (searchable) needs review for sensitive data (PII, credentials) before insertion.

high Cross-tenant memory leakage. Agents serving multiple users accidentally include user A's archival memory in user B's recall results

Mitigation: Strict per-agent (per-user) isolation. Validate with multi-tenant tests. Use storage-backend filters that enforce agent_id at query time.

medium Memory grows unbounded; archival memory hits storage limits; inference latency degrades as recall hits massive corpus

Mitigation: Implement memory-decay or summarization strategies. Cap archival memory size per agent. Monitor memory growth + retrieval latency.

Use Case Scenarios

strong Healthcare patient-engagement agent with multi-month continuity on Letta Cloud

Letta Cloud signs the BAA. Per-patient agent_id isolates memory. Core memory holds care plan summary; archival memory holds historical interactions. GDPR-equivalent (HIPAA Right of Access) implementable via memory query + export.

strong Research assistant that learns user's project context over weeks

Self-hosted Letta with Postgres + pgvector. Agent updates archival memory after each session; core memory summarizes project state. Cost minimal; sovereignty maximum.

weak High-volume customer-service agent for stateless FAQ queries

Letta's persistent memory overhead isn't justified for stateless query/response. Use a simpler RAG-only setup. Letta shines when memory continuity actually matters.

Stack Impact

L1 Letta uses L1 storage backends (Postgres for structured state, vector DB like pgvector / Pinecone / Qdrant for archival memory). Choice of vector DB affects archival recall latency.
L4 Letta at L4 Agent Memory sits alongside L4 RAG frameworks. RAG retrieves from external corpora at query time; Letta manages agent's own state evolution. Both can coexist — RAG for documents, Letta for agent memory.
L5 L5 governance must enforce per-user memory isolation, memory-write safety policies (NeMo Guardrails), and GDPR deletion. Letta provides the primitives; L5 enforces the policies.
L7 Letta is a building block for L7 agent runtimes. Stateful agents — those that remember across sessions — need Letta or equivalent. Used inside LangGraph / CrewAI / AG2 / smolagents as the memory layer.

⚠ Watch For

2-Week POC Checklist

Explore in Interactive Stack Builder →

Visit Letta website →

This analysis is AI-generated using the INPACT and GOALS frameworks from "Trust Before Intelligence." Scores and assessments are algorithmic and may not reflect the vendor's complete capabilities. Always validate with your own evaluation.