Submit a Story

Glossary term

Agent State

Updated Oct 17, 2026

In short

The structured information an AI agent keeps about the current task, completed actions, intermediate results and next steps.

Agent state records what has happened during a task and what the agent needs to continue. It may include the goal, current step, tool results, retry counts, pending approvals and completion status. State can live in memory for a single run or be persisted so a workflow can resume after interruption.

In a customer onboarding agent, state could include which documents have been received, whether identity checks passed and whether a human approval is pending. Storing it in a database rather than only in the prompt lets a run resume after a crash and lets you inspect what happened. Version the state shape so older saved runs still load after code changes, and design updates to be idempotent.

Keep state explicit and minimal. Avoid storing unnecessary sensitive information, define how stale values are refreshed, and make updates safe to repeat when workflows retry. Related: Agent Loop, State Machine.