1. Why state is hard

2. The taxonomy — five state types, by name

"Agent state has five flavors: working memory for the current task trajectory, conversational memory for multi-turn dialog, long-term episodic memory for past interactions, long-term semantic memory for stable knowledge, and procedural memory for reusable skills. Each has different storage, lifespan, and retrieval patterns.”

3. The token budget problem (the central engineering challenge)

4. State persistence — surviving process boundaries

The token budget problem is in-memory state management. Persistence is the orthogonal problem: what happens when the request handler dies mid-task?

The pattern is checkpointing — after each meaningful step (each tool call, each turn), persist the agent's state to durable storage. On a new request, load the checkpoint and resume.