What ‘state’ should include when an AI agent restarts after failure
For an AI agent, state can mean much more than . When an agent uses tools or changes outside systems, state may include the current plan, tool inputs, , external actions already completed, , policy context, approvals, human edits, handoff notes, and retry or replay choices. If a run stops halfway, logs may not be enough.
The system needs to know what can be safely run again, what needs a fix-up action, and what needs . This makes the design choice important: state could be handled as an app-level object, event log, , trace, or another structure.
Key points
- AI agent state can include plans, tool results, approvals, human edits, and completed outside actions.
- A simple log may not show what is safe to run again after a crash.
- The system needs to separate safe replay from fix-up work or .
- Possible designs include an app-level object, event log, , or trace.
- Structured state can help recovery and reduce token use.