Agentic Systems: The Smallest Working Loop
A real-world task has a goal you can check, constraints that shape what counts as acceptable, and external state that can change while the system runs. A goal without a check becomes a chat that never ends, because nothing in the system can prove it is done.
Scope is limited to the smallest loop that can act, verify, and stop.
What a real-world task contains
A goal becomes operational only when it has a completion signal that a program can evaluate, such as a file written, a status updated, or a set of fields filled in. Constraints narrow the space of acceptable outputs, such as a deadline, a budget in API calls, a required format, or a policy that blocks certain actions.
External state is any dependency outside the model call, such as a database row, a ticket queue, a web page, or a calendar event. When external state changes, a previously correct plan can become wrong without any code failing.
Rule
If you cannot write a deterministic check for done, treat the task as open-ended and add a stop budget plus a human review step.
The smallest loop that can act
The minimal architecture is a loop that moves data through fixed stages and records what changed at each stage. The loop starts from an input, reads and updates state, calls a model to propose the next action, executes tool calls that affect external state, then evaluates a stop condition before repeating.
Interact with the pipeline diagram and track what data flows into each step and what the step returns.
Once the loop exists, every failure becomes located. A retrieval miss shows up as missing inputs to the model call, a tool error shows up as an exception or a non-200 response, and a stop condition bug shows up as repeated iterations with no state progress.
Two anchor tasks with different checks
A research report task usually ends when a document meets a format and citation requirement and passes a verification check, such as every claim having a source URL in the notes file. Tooling often includes search, document parsing, and file writing, and cost control typically focuses on limiting browsing and context growth.
A ticket triage task ends when each ticket is labeled, routed, and commented with a short rationale, and the ticket system confirms the update. Tooling often includes a ticket API, a policy checker, and sometimes an internal knowledge base lookup, and reliability focuses on avoiding wrong updates.
Compare the two tasks by selecting constraints, tools, and completion signals and notice how the stop condition changes.
Sign up for free
Generate custom courses on any topic — with hands-on practice, AI guidance, and visuals built in.
Already have an account?