mjdeving
← concepts

Agents

Agent Wiring

Two ways to build an agent: a definition file a host runs, or code written against a framework. The cut is who owns the loop.

Agent wiring is the choice between two ways to build an agent, and the cut is who owns the loop. In the first, you write a definition: instructions, a tool list, maybe a schedule, in a file a host reads and runs. The host owns the loop, the retries, the context handling; you own what the agent knows and may do. In the second, you write code against a framework: the loop is yours, the framework hands you the model calls and the primitives, and every behavior is yours to implement.

A real definition is small: one markdown file, a frontmatter block with the description that triggers it and the tools it may use, and the instructions as the prose below. A definition inherits the host’s loop, context handling, retries, and recovery, so when the host ships a better loop your agent improves without you touching it. The price is the host’s opinions: you shape behavior through instructions and tools, and where the host draws a boundary, your agent’s behavior ends.

The code route buys control. You can build a loop no host offers, test it like the software it is, and know what happens at each step. The price is that the loop is now your code: every improvement the hosts ship, you re-implement yourself, and every subtle loop-design bug, the kind hosts have spent years finding, is yours to find again.

Wire as a definition first and switch to code only where the host’s boundary blocks the job, because most jobs never reach it.