Theory: Single Agent Workflows¶
Overview¶
Planner-executor loops formalize how an agent thinks and acts over multiple steps. Instead of one-shot completion, the agent forms a plan, executes a bounded action, observes results, and decides the next move.
This loop improves reliability because final answers are backed by evidence gathered during execution. It also makes failure modes visible: weak plans, repeated actions, and low-information steps.
Learning Ladder¶
| Level | Focus | Outcome |
|---|---|---|
| Beginner | Plan-act-observe cycle | Understand loop structure |
| Intermediate | Stop criteria and evidence checks | Avoid weak or premature answers |
| Advanced | Adaptive progress heuristics | Better efficiency under uncertainty |
Core Concepts¶
Beginner Foundation¶
- Separate planning, execution, and observation into explicit phases.
- Record evidence after each step before choosing next action.
- Bound maximum steps and retries to avoid runaway loops.
- Preserve a concise trace so decisions are reviewable.
Intermediate Mechanics¶
- Add evidence sufficiency checks before finalizing outputs.
- Detect repeated or low-yield actions and trigger fallback.
- Include uncertainty notes when evidence is incomplete.
- Use stop criteria based on both quality and cost budgets.
Advanced Production Patterns¶
- Score per-step information gain to prioritize next actions.
- Stop early when expected gain drops below threshold.
- Escalate uncertain outcomes to optional review workflows.
- Compare loop strategies with eval suites before production rollout.
Key Takeaways¶
- Effective loops optimize for evidence quality, not step count.
- Explicit stop criteria prevent both under-solving and over-computing.
- Confidence-aware escalation reduces risk in ambiguous cases.