Skip to content
Back to full roadmap
topiccore

State Management

Agent state = messages + scratchpad + tool results + memory. Persistent and versionable.

3 hours2 resources1 prereqs

Every agent loop step has state:

  • messages: conversation history
  • scratchpad: model's intermediate thoughts (optional)
  • tool_results: this turn's tool outputs
  • memory: long-term episodic/semantic memory
  • metadata: user_id, session_id, trace_id, budget remaining

LangGraph approach: state = TypedDict, each node updates a subset. For resume, serialize state to Postgres / Redis.

Durable workflow: with Temporal / Restate / Inngest the state survives — server crash → restart → resume where left off. Gold for long-running agents.

Prerequisites

Resources(2)