liveBook · Manning

State persistence

As explained in Introduction to Generative AI, Second Edition

Persistent state is information about an application or agent that remains available across operations or interactions.

State persistence is the ability of an application or agent to retain records of past actions, goals, or context across sessions. For agents, this continuity supports long-term planning and coordination, distinguishing them from systems that react only to the current prompt or session. section 8.19 section 8.17

Persistence also changes the system’s risk profile:

  • Corrupted or malicious memories can shape later decisions, including actions that appear legitimate to the agent but violate the user’s intent. section 8.19
  • Sensitive information, including identifiers, credentials, and preferences, may resurface through unintended generation or manipulation. section 8.19
  • Prompt injection becomes more consequential when hidden instructions enter through files, images, web pages, or other external content and persist across sessions. section 8.22

Responsible persistence therefore requires deciding what to retain, discard, or expose, while combining input filtering, logging, and cryptographic verification. Without safeguards, memory can become a long-term liability rather than an asset. section 8.19 section 8.22

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Explains the mechanism and major risks, then names safeguards without detailing their implementation.
Examples
Uses poisoned Discord inputs, fraudulent transfers, hidden document instructions, and zero-click image or file exploits as examples.
What it assumes
Assumes basic awareness of language models and agents while contrasting persistent state with ephemeral prompt-based interaction.
What you can do after
Evaluate how retained state improves continuity while increasing exposure to manipulation, privacy failures, and difficult-to-contain actions.
How it connects
Connects persistent state with agent memory, long-term planning, prompt injection, privacy, tool use, and autonomous operation.

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 Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.