Five Questions to Answer Before Putting Agents into Production
Cost and risk, who holds control, how delivery is verified, which layer owns model calls, and how it is evaluated after launch: answer these in order before writing Agent code.
On this page · 11 sections
Building an Agent that demos well is easy: connect a model, register a few tools, write a loop. Running it inside an enterprise for the long haul is a different job. A demo only has to succeed once. Production has to return a result someone can stand behind on the thousandth call, for the third tenant, when a downstream times out, and when a web page arrives with injected content.
This series records how I understand “landing enterprise Agents.” It comes from two sources: the notes I took while working systematically through a course on enterprise Agent engineering architecture, and the mistakes I made building an AI workflow Harness, an evidence-first RAG, and a real-time risk platform. The first gave me a complete map. The second taught me which places on that map you can actually fall into.
The Conclusion First
Landing an Agent is not a model problem. It is five engineering questions answered in order. The order matters: without an answer to one question, the answer to the next has nothing to stand on.
Each row of the table is one question; the right-hand column is the first symptom you see when you cannot answer it, so you can check it against your own project.
| Order | Question to answer | Typical symptom when you cannot answer it |
|---|---|---|
| 1 | What did this inference actually cost, and where can it go wrong? | Costs run away; hallucinations are treated as occasional bugs |
| 2 | Who decides the next step: the program, the model, or a division of labor between them? | Trial and error where things should be deterministic; hard-coding where things should be exploratory |
| 3 | How do you turn probabilistic generation into delivery you can be accountable for? | It works once every time, but nobody dares to promise the next run |
| 4 | Which layer owns model calls end to end? | Rate limiting, retries, and routing are scattered across every business service |
| 5 | After launch, how do you know it is still right? | Only “it feels worse,” with no evidence |
The Roadmap
The main path runs top to bottom:
- the business problem sets the boundary first;
- model literacy sets the floor for cost and risk;
- architecture selection allocates control;
- engineering delivery turns those decisions into artifacts that can be re-verified;
- finally the Agent Harness (that is, the program layer that owns the loop, tools, and state) and the LLM Runtime carry the execution.
The two dashed lines are what keep the system healthy over time: safety gates constrain side effects, and evaluation evidence feeds back to correct the architecture choice.
Step One: Write the Business Problem as Something You Can Accept
Most Agent projects plant their failure at kickoff. A common project statement is “build an intelligent data analysis assistant,” which leaves three things unanswered:
- Who uses it to make which decision? “Let the owner judge which operational anomalies need action” is a goal you can accept against. “Improve analysis efficiency” is not.
- What happens when it is wrong? A skewed chart and an issued refund differ in cost of error by orders of magnitude, and the strength of verification should differ accordingly.
- If you take the AI away, does the work still hold together? If it does, you are using AI to optimize an existing process. If it does not, you are genuinely redesigning the work around “delegable intelligence.” Both are legitimate, but the budget, timeline, and acceptance method are completely different.
What I learned on the risk platform applies here as well: write the contract first, then draw the architecture. For an Agent project, that contract includes at least the goal, the acceptance evidence, the permitted side effects, the cost and latency budgets, and the stop conditions when evidence is insufficient.
Step Two: Build Model Literacy, Not Model Faith
Engineers do not need to know how to train a model, but they must know where the cost and risk of a single call come from:
- Output Tokens (that is, the text units a model processes and bills by) cost more than input.
- A stable prefix can be cached.
- Higher reasoning effort means higher latency and spend.
- Hallucination comes from the generation mechanism itself; it can only be governed by tiering task risk, and you cannot count on “switching to a better model” to eliminate it in one move.
These facts directly shape every architectural trade-off that follows. See Part 2: Model Literacy and Cost.
Step Three: Decide Control First, Then Choose a Framework
The difference between Workflow, Autonomous, and Hybrid is not which framework you used. It is who decides the next step:
- Tasks with stable paths and known exits go to the program.
- Tasks whose path changes with feedback go to the model.
- The vast majority of enterprise scenarios are a mix of the two, and the only difference is who sits at the top.
The trend is clear: the autonomous Agent is becoming the main brain, and Workflow is sinking down into a capability it calls on demand. See Part 3: Architecture Selection.
Step Four: Turn “It Runs” into “I Can Answer for It”
Three words separate an individual writing code with AI from enterprise-grade delivery: reliable, efficient, sustained. That takes four things:
- a specification (Spec) that says what done means;
- context engineering so the model gets the right information at the right moment;
- an independent Verifier to prove the result;
- a way to turn one success into an asset the team can call directly next time.
See Part 4: Engineering Delivery.
Step Five: Give Model Calls One Execution Boundary
Once the second business line, the second model vendor, and the second tenant show up, “just call the SDK” stops being enough. Rate limiting, retries, routing, stream interruption, cancellation, and usage accounting need one execution layer that owns them. Otherwise they end up scattered across every business service, each handled a little differently. See Part 5: LLM Runtime.
Three Lines That Run Through Everything
Whatever architecture you choose, the following three lines cannot be skipped. They are also themes I keep returning to in my other series:
- The authorization line. Being able to call a tool is not the same as being authorized to cause its side effect. Production, persistent data, cost, and irreversible actions require explicit authorization. See the four top-level hard rules.
- The evidence line. “The model said it finished” is not evidence. Every conclusion must trace back to a source, a version, and a readback result.
- The evolution line. Every rule in a Harness carries an implicit assumption about model capability. After a model upgrade, those assumptions have to be re-verified, or the scaffolding turns into a burden. See From Workflow Harness to Lightweight Prompts.
A Landing Self-Check
Before the first line of Agent code is written, I expect the team to be able to answer these questions:
- Can the acceptance criteria be checked by a program or an independent person, rather than declared by the Agent itself?
- Which actions have real consequences? What are their authorization, preview, and rollback paths?
- What are the Token budget and latency budget for one complete task? How does it stop when they are exceeded?
- Does top-level control sit with the program or with the model? Why?
- When evidence is insufficient, does the system stop and state the gap, or keep generating?
- After launch, which fixed question set tells you it has not gotten worse?
If half of these go unanswered, the problem is not the model. It is the project definition.
Series Map
- The landing roadmap (this article)
- Model Literacy and Cost: What One Inference Actually Costs
- Architecture Selection: Who Should Hold Control
- Engineering Delivery: Turning Probabilistic Generation into Deterministic Delivery
- LLM Runtime: Which Layer Should Own Rate Limits, Retries, and Routing
Note
This series is my notes and second-pass thinking from studying an enterprise Agent engineering architecture course (“企业级 Agent 工程架构实战营”). The structure, examples, and diagrams have all been rewritten and combined with my own project experience. The judgments here are mine and do not represent the course’s original wording. The section on architectural paradigms also draws on Anthropic’s Building effective agents.
Related notes
Agent Architecture: Should the Program or the Model Decide the Next Step
The difference between Workflow, Autonomous, and Hybrid is not the framework but who decides the next step. This article covers when each pattern fits, how each one fails, and a selection method that starts from task conditions.
Making Agent Output Verifiable: Specs, Context, and Checks
Three words separate one person writing code with AI from enterprise-grade delivery: reliable, efficient, sustainable. This piece covers spec-driven development, context engineering, verifiers, and Skill assets, and how the engineering center of gravity has moved from Prompt to Harness.
Working on something similar?
I'm always happy to compare notes on distributed systems, delivery, and applied AI.
[email protected]