{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicqtnbmmm3i5nnxoavx6gidee6inyepjisdrekfjuu7lq2vewrlfm",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mkhzcpujvld2"
  },
  "path": "/t/how-do-you-design-memory-systems-for-long-running-ai-agents/175584#post_2",
  "publishedAt": "2026-04-27T10:21:52.000Z",
  "site": "https://discuss.huggingface.co",
  "textContent": "For long running AI agents, the simplest rule is:\n\nDo not make the prompt the memory system.\n\nStore memory outside the model, then only give the model the parts it needs for the current step.\n\nA practical setup is:\n\n  1. Store the full history, files, tool results, user preferences, decisions, and task state in a database.\n\n  2. Before each model call, retrieve only the relevant facts and current working context.\n\n  3. Let the model act on that small active context.\n\n  4. After the model responds or uses a tool, write the important changes back into memory.\n\n  5. Keep logs of what happened so the agent can recover, audit, or continue later.\n\n\n\n\nNot every output should become memory. Some things should be verified first, some should be marked uncertain, and some should be ignored.\n\nThe model should be treated as the reasoning engine. The runtime should be the memory and state owner.",
  "title": "How do you design memory systems for long-running AI agents?"
}