{"slug": "llms-are-stateless-here-is-what-that-actually-means-for-agent-memory", "title": "LLMs Are Stateless. Here Is What That Actually Means for Agent Memory.", "summary": "A developer explains that LLMs are stateless and that the intelligence of a long-running agent lives entirely in the harness that manages memory injection. The post introduces Smriti, an open-source temporal memory engine built as a reliable harness for stateless LLMs, and highlights research like MemGPT, StateFlow, and ClawVM that formalize this design principle.", "body_md": "There is a sentence that most AI agent tutorials skip over, and it explains\n\nwhy building reliable long-running agents is so hard:\n\n**Between API calls, the model knows nothing.**\n\nEvery \"memory feature\" you have ever seen — ChatGPT's memory, Claude's Projects,\n\nLangMem, Mem0 — is a human-written system that prepares text and injects it into\n\nthe context window before calling the model. The model itself has no persistent state.\n\nIf the LLM is stateless, then the *intelligence* of a long-running agent lives entirely\n\nin the harness that manages what gets injected and what gets discarded.\n\nThis is not a limitation. It is a design principle.\n\nThe research community has started treating it explicitly this way:\n\n**MemGPT (2023)** introduced the \"LLM as OS\" analogy: the model is a CPU,\n\nexternal memory is disk, and the harness manages what pages are in RAM at query time.\n\n**StateFlow (2024)** goes further: the agent is a Finite State Machine.\n\nThe LLM is only invoked at state transitions, not held responsible for state itself.\n\n**ClawVM (2026)** formalises this as a virtual memory layer: the harness enforces\n\ndeterministic, validated writebacks at every lifecycle boundary.\n\nThe LLM outputs raw thoughts; the harness decides what is committed.\n\nIf the LLM is purely a processing unit, then the quality of your agent's memory\n\nis entirely the quality of your *harness* — the system that decides what facts to\n\nstore, how long they are valid, and when they should be superseded.\n\nA harness that stores flat embeddings and retrieves by similarity gives you a\n\nmediocre agent. A harness that stores temporal assertions and resolves conflicts\n\ndeterministically gives you a reliable one.\n\nA temporal assertion is a fact with a lifespan:\n\n```\nsubject:   user_project\npredicate: uses_language  \nobject:    Python\nvalid_from: 2025-01-10\nvalid_to:   2025-06-15   ← closed when user switched to TypeScript\n```\n\nThe harness stores this, not the LLM. The LLM never sees the old fact again\n\nonce `valid_to`\n\nis set. Active state is `WHERE valid_to IS NULL`\n\n.\n\nThis is the model behind [Smriti](https://smriti-kaal.vercel.app/) — an open-source\n\ntemporal memory engine built precisely to be a reliable harness for stateless LLMs.\n\nThe LLM is not the agent. The harness is the agent. Build the harness well.\n\n*MIT license. PostgreSQL-backed. Open source.*", "url": "https://wpnews.pro/news/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory", "canonical_source": "https://dev.to/shiv_s_hankar/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory-3p9", "published_at": "2026-07-30 13:08:59+00:00", "updated_at": "2026-07-30 13:32:49.011969+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-research", "developer-tools"], "entities": ["Smriti", "MemGPT", "StateFlow", "ClawVM", "LangMem", "Mem0"], "alternates": {"html": "https://wpnews.pro/news/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory", "markdown": "https://wpnews.pro/news/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory.md", "text": "https://wpnews.pro/news/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory.txt", "jsonld": "https://wpnews.pro/news/llms-are-stateless-here-is-what-that-actually-means-for-agent-memory.jsonld"}}