What it is
An agentic system is not a prompt — it is a loop. The loop determines what the agent can perceive (which tools and context it has access to), what decisions it makes (which action to take next), what effects it produces (what tools it calls and what state it changes), and how it verifies before proceeding. Designing the loop well means making each of these four elements explicit before writing any code. A poorly designed loop fails in predictable ways: the agent cannot see what it needs to decide correctly, has no mechanism to detect that a decision was wrong, and cannot recover gracefully when an action produces an unexpected result. Most agentic failures are loop failures — the wrong information at the perception stage, a missing verification step, or no recovery path when something goes wrong. Designing the loop explicitly, before implementation, is the skill that separates reliable agentic systems from ones that succeed only on the happy path. The verification step is the most commonly omitted — loops without it produce agents that confidently proceed on unverified assumptions until they have accumulated enough errors to fail visibly.
When to reach for it
- Before implementing any agentic system — design the perception, decision, action, and verification stages as a diagram or written spec before writing code. What information does the agent have at each decision point? What does the agent do when a verification fails?
- When debugging a failing agentic workflow — map the loop explicitly and identify which stage is producing the failure. Most failures localize to a single stage once the loop is drawn.
- When adding a new capability to an existing agent — identify which stage the new capability belongs to and how it interacts with the verification stage. Don't add tools or actions without updating the loop design.
- When an agent is working well on simple cases but failing on complex ones — the loop is missing a stage or a verification that matters only when inputs are non-trivial.
- When handing off a system to a new team — a loop diagram is the most useful documentation artifact because it captures what the system actually does rather than what it was intended to do.
When NOT to
- Simple, single-turn completions where there is no loop — a prompt that produces a response and terminates has no loop to design.
- Exploratory prototypes where the goal is to discover what loop is needed — run a few turns first, then formalize the loop design once you have observed what stages are actually required.
- Systems where the loop is provided by a framework and is not configurable — in that case, design the individual stages (perception configuration, action set, verification logic) rather than the loop as a whole.
Exemplars
- Anthropic — https://www.anthropic.com/research/building-effective-agents — Building Effective Agents: describes agents as LLMs dynamically directing their own processes, gaining 'ground truth' from the environment at each step, with explicit stopping conditions to maintain control — perception, action, verification, and termination as designable elements of the loop
- Anthropic — https://www.anthropic.com/news/developing-computer-use — Developing a computer use model: describes the perceive-decide-act loop concretely — Claude looks at a screenshot, computes the cursor movement, acts, and views the next screenshot, a "flipbook" view of the screen assembled one frame per action