Planning Loops and State Graphs
Planning Loops and State Graphs
Key jargon
| Term | Plain-language meaning |
|---|---|
| Plan | A proposed sequence or dependency structure for reaching a goal. |
| State graph | Nodes and transitions representing allowed workflow states. |
| Transition | A validated move from one state to another. |
| Stopping condition | A rule that ends or escalates a loop. |
Key concepts
- A plan is a hypothesis that must adapt to observations; it is not proof that steps will succeed.
- State graphs make legal transitions, retries, approvals, and terminal states explicit.
Concept map
flowchart LR
A["Create bounded plan"] --> B["Execute current node"]
B --> C["Observe and update state"]
C --> D["Stop revise or escalate"]A loop repeats “observe → decide → act → evaluate.” A graph makes allowed states and transitions explicit. The loop is behavior; the graph is control and memory.
Minimum bounded loop
goal → plan → execute one bounded step → observe → verify
├── done
├── revise within budget
├── request approval/input
└── stop safely
Required brakes
- Maximum steps, time, tokens, cost, and tool effects.
- No-progress and repeated-failure detection.
- Explicit done/blocked assertions.
- Checkpoint and resume contract.
- Human gate before scope expansion or consequential effect.
- Evidence required before a success claim.
Exercise
Create states for a research agent: intake, search, source review, draft, fact check, revision, complete, and blocked. List allowed transitions and a stop condition for each active state.
Research boundary
Planning methods such as tree search, reflection, and test-time scaling can improve some tasks but add inference cost and do not guarantee truth or safe action.