Building effective AI agents: max prompt, min code.
How we build effective AI agents around a model you cannot fully trust, and the science behind each choice. A vendor-neutral method, distilled from running agents in production.
The core bet
Maximize the prompt, minimize the code. Put behavior in language and let the model decide; reserve code for the small set of guarantees the model must not be trusted with.
Maximizing the prompt is an engineering conclusion rather than a slogan, because it follows from three measurable properties of capable models. The first is that general methods which scale with computation beat handcrafted ones by a large margin, which is the practitioner reading of Sutton's Bitter Lesson, so a prompt is a general control surface that improves on its own as the model improves while hardcoded logic is handcrafted knowledge the next model outgrows. The second is that in a non-deterministic system code is the high-variance control surface, since minor changes to code cascade into large behavioral changes, whereas prose is the comparatively low-variance and inspectable surface where a behavior change is a paragraph you can read and diff. The third is that attention is a finite budget, so you are allocating the smallest set of high-signal tokens that produce the outcome you want rather than simply writing instructions.
Maximizing the prompt is not granting free will
The common misreading is that maximizing the prompt means letting the model do whatever it wants, and the second half of the bet, minimizing the code, is exactly what prevents it. You partition every decision the system makes by a single question, which is how much variance the outcome can tolerate, so that outcomes which can tolerate none, the ones that are irreversible, financial, cross-tenant, or able to fabricate trust, are guaranteed in code and fail closed, while everything recoverable is delegated to the model. This is bounded autonomy rather than free will.
This boundary is the whole framework, because every pattern in the full guide, the harness, the tools, retrieval, memory, approvals, evaluation, and release, is one more application of this single partition.
Inside the guide
The complete field guide works through thirteen patterns, each with its mental model, the concrete production pattern, and the tradeoff. The short version:
The whitepaper carries the full treatment of each, the flow diagrams, a complete reference architecture, and formal citations.
Get the guide
Building Effective AI Agents, the complete field guide
The full method, every pattern and its tradeoff, the flow diagrams, the reference architecture, and the references, in X-Arc's research-paper format.
Contact
This guide is published by X-Arc, an applied AI research lab. Every pattern has been run in production, and none of the specifics are proprietary. If you are building an agent product and something here is relevant to work you are running, write to us, the form is on the landing page and we come back within two working days.
Book a discovery call →