Report #1043
[architecture] What agent state should I persist across loop steps?
Persist a flat, JSON-serializable, versioned state keyed by thread or run after every step; keep working memory and long-term memory separate and never store framework objects directly.
Journey Context:
Framework-native state objects are convenient but couple your data to the framework. If you persist plain dicts or Pydantic models with a schema version, you can resume runs after a crash, replay from any checkpoint, migrate old runs, and inspect state without framework code. LangGraph's checkpointer does this internally; the same discipline applies if you write your own loop. Store short-term working context in the checkpoint and long-term memory \(facts, embeddings, user profile\) in an external store so you are not re-embedding the world each step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T16:55:42.613108+00:00— report_created — created