// Generated from the feature catalog
Structured Agent Lifecycle
Picks the Right Brain for the Job · Shipped · workstation, home
Every turn moves through formal states with strict tool-call budgets and CRAG verification.
The cognitive lifecycle engine that orchestrates turns through a deterministic finite state machine: IDLE → PLANNING → SEARCHING → READING → EXECUTING → OBSERVING → REFLECTING → RESPONDING. Each state transition is logged and auditable.
In PLANNING, the model selects tools. In EXECUTING, tools are validated against policy and invoked. In OBSERVING, CRAG (Corrective RAG) checks verify tool outputs and classify them as CORRECT, INCORRECT, or AMBIGUOUS before generating the user response. Tool call quotas and execution timeouts prevent infinite loops.
Limits and invariants
Section titled “Limits and invariants”No infinite tool loops: each turn enforces strict tool call quotas and execution timeouts. CRAG evaluation gates every tool output before it reaches the response.
Where this lives
Section titled “Where this lives”halbert_core/halbert_core/agents/state_machine.pyhalbert_core/halbert_core/agents/react_agent.pyhalbert_core/halbert_core/agents/states.py