Skip to main content

Letta

Letta is an open-source stateful agent framework where the agent itself manages its memory via tool calls. It originated in the MemGPT paper from Berkeley (2023) and was rebranded as Letta as the framework matured. It is built around an OS-inspired memory hierarchy: main context (working memory the model sees every turn), recall storage (recent message history searchable on demand), and archival storage (long-term searchable knowledge). The agent edits memory blocks via tools like `core_memory_append`, `core_memory_replace`, `archival_memory_insert`, and `archival_memory_search`. Persistence is on by default — agent state survives across runs.

Example

A long-running personal-assistant agent built on Letta starts a conversation with "Hi Maria, last time we talked about your team's hiring plan." The greeting is possible because Letta's agent had previously called `core_memory_replace` on the `human` block to record Maria's name, role, and hiring-plan context — making that information available in main context on every subsequent turn without re-retrieval.

Put this into practice

Build polished, copy-ready prompts in under 60 seconds with SurePrompts.

Try SurePrompts