The agent stack / Layer 8 of 11

Memory & state

How does an agent remember across conversations?

What this layer is for

Models are stateless: anything an agent "remembers" has to be stored and put back into its context window. Memory systems decide what to keep (facts, preferences, past episodes), where to store it and how to bring it back, so an agent can improve over time without overflowing its context.

Side by side

ToolBest atLanguagesLicenseBy
LettaPlatform for stateful agents that remember and improve over time, from the creators of MemGPT; now built around the Letta Code harness.TypeScriptApache-2.0Letta
LangGraphLow-level framework and runtime for building long-running, stateful agents as graphs of state, nodes and edges.Python, TypeScriptMITLangChain
RestateLightweight durable execution runtime (a single Rust binary) that makes agents, workflows and services crash-proof.TypeScript, Java, Kotlin, Python, Go, Rust, RubyBUSL-1.1 (server, converts to Apache-2.0 after 4 years), MIT (SDKs)Restate

Tools in this layer