liveBook · Manning

State persistence

As explained in AI Agents in Action, Second Edition

Persistence is the continuation of a system's goal-directed operation across multiple steps or interactions.

State persistence keeps a system’s goal-directed operation coherent across multiple steps or interactions. It separates an active agent from a reactive assistant that answers once and stops. In an agentic system, the plan and state may be short-lived inside one loop or stored externally so work can continue across longer horizons. section 1.1 section 9.1.2

A practical persistence design makes the following elements explicit:

  • Goal: the outcome that coordinates multiple short-horizon tasks. section 9.1.2
  • Plan: the ordered or revisable outline that the agent rereads while working. section 5.1.3
  • State: progress, intermediate results, observations, and other information needed for the next decision. section 9.1.2 section 5.1.3
  • Decision and tool: programmatic mechanisms that determine the next action and invoke the agent or another capability. section 9.1.2

Revising a plan after new information

An itinerary first schedules an Exploratorium visit and startup tours. After learning that the museum is closed and no startups are available, the plan is revised rather than restarted from the original goal. The updated itinerary demonstrates why observations, progress, and planned actions must remain available to later steps. section 5.1.3

Figure 9.2 Comparison of short- and long-horizon goals. You can see how this process requires promoting the single-agent internal loop to the level-2 external task-based agentic loop.

Use the comparison of short- and long-horizon goals to see when an internal agent loop must become an external task-based loop. section 9.1.2

Persistence is also a storage concern. Learning examples may keep memories in process memory or local stores that disappear when the process stops; production systems require durable storage alongside access control, observability, eviction policies, and retrieval evaluation. Hybrid memory can combine semantic search with graph search, but the storage backend, memory extraction, and retrieval logic remain separate engineering responsibilities. section 6.4.3

How AI Agents in Action, Second Edition covers it

How deep it goes
Explains external plans and state, deterministic loop mechanisms, and production concerns, but stops short of a complete persistence implementation.
Examples
Uses revised travel itineraries, hybrid semantic-and-graph memory, process memory, local stores, and databases as concrete illustrations.
What it assumes
Assumes basic awareness of agents and introduces persistence by contrasting them with reactive assistants and short-lived internal loops.
What you can do after
Apply via an external task loop that stores plans and state for continued execution across short-horizon steps.
How it connects
Connects agentic loops, planning, memory systems, semantic search, graph search, databases, and large language models.

Also explained in

Compare how 7 books explain state persistence →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.