Expand description
Agent state management.
This module manages the runtime state of the Agent, including:
- Message history
- Token usage tracking
- Pending inputs
- Todo reminders
- Read history
- Tool error history (for repeat error detection)
By extracting state into a dedicated struct, we enable:
- Clear separation between state and configuration
- Easier testing of state transitions
- Better encapsulation of mutable state
Structs§
- Agent
State - Agent runtime state.
- Tool
Error Entry - A tool error entry for tracking repeated errors.
Constants§
- MAX_
SAME_ ERROR_ COUNT - Maximum number of same errors before triggering intervention