Design a Single-Loop Agent
Build the core agent loop the leading coding agents use: one model, one loop, tools in, results folded back into context.
The Route
0/5 verifiedDefine the loop contract
Write down exactly what one turn of the loop does before coding it.
Build the tool registry
Tools are the agent's hands - define them with strict schemas.
Implement the loop with result folding
The loop's job is bookkeeping: order, roles, and IDs must be exact.
Harden termination and error paths
An agent that cannot stop is worse than one that cannot start.
Prove it with a transcript review
Judge the loop the way harness engineers do: by reading transcripts.
Context Pack
Paste this first. It briefs the AI on requirements, constraints, and the Definition of Done before your first build prompt.
Paste this into your AI builder first. It teaches the AI what you want before you give it the build prompt.
Related routes
More Agent Architecture flows that share ground with this one.
Add a Plan/Todo System to Your Agent
Give your agent the planning discipline of the leading harnesses: an explicit, model-visible todo list that survives long tasks.
+1 more steps to Done
Best forbuilders who have shipped a basic app before
Assemble a System Prompt Like the Pros
Structure your agent's system prompt the way leading harnesses do: layered sections, dynamic context, and enforceable rules.
+1 more steps to Done
Best forbuilders who have shipped a basic app before
Sub-Agent Delegation with Context Isolation
Delegate bounded work to sub-agents that run in fresh context and return only distilled results - the pattern behind scalable long tasks.
+1 more steps to Done
Best forproduction-grade builds with strict verification