Section650

Writing

TopicAI
Reading12 min

AI Agents Are Easy to Demonstrate. Making Them Reliable in Production Is Hard.

A research-based readiness checklist for AI agents covering retries, recovery, costs, permissions, evaluation and human approval.

By Ka Lun Chan · Cloud & AI · AI / Architecture / Leadership

The afternoon it worked

This is a research guide to the difference between an agent demo and an operational system. The companion job-search agent design is a learning example.

A demo answers whether a model can do a task in one observed run. Production adds a question: how will the system behave at six tomorrow morning with no one watching?

A production agent needs bounded access and cost, a way to recover from missed runs and failed calls, and checks that establish whether the task succeeded.

What production asks that a demo never does

A person watching a demo supplies context, stops risky actions and catches errors. A scheduled system needs durable inputs, explicit permission rules and a way to notify someone when checks fail.

The examples here describe readiness criteria and illustrative designs.

Prototype, MVP and production

It helps to be precise about which question each stage answers. A prototype answers whether a model can do the task at all. It can be a prompt and a script, and it should be cheap enough to throw away. An MVP answers whether anyone wants the result: real users, a narrow scope, a person checking the output, and failures that are annoying rather than harmful. Production answers whether the business can depend on it, and that is where recovery, evaluation, permissions, cost and an owner come in.

The common mistake is treating a successful prototype as evidence for production. It only answered the first question. The same thing happened with software long before AI. The difference now is that the prototype arrives so quickly, and looks so capable, that it is easy to skip the middle stage entirely.

Reliability is distributed systems again

A VoIP call crosses signaling, media, application logic and billing, each with its own failures. An agent can have similar boundaries around its model, tools and scheduler. See distributed systems lessons from VoIP.

The model API will time out, rate-limit you and occasionally return something malformed. Every call needs a timeout and a bounded retry with exponential backoff, and the retries need a ceiling, because an agent that retries forever is an agent that spends forever. Tools will fail too, and the agent needs to know which failures are worth retrying and which mean stop.

Idempotency matters more than people expect. If a run dies halfway and the scheduler starts it again, will it send the report twice, apply the label twice, or, worse, submit the application twice? Every action with a side effect needs a key so a repeat changes nothing, the same discipline that kept a replayed billing event from charging a caller twice.

Schedulers can miss runs. Record what completed so retries can resume, report timing and spend, and verify the result independently of the process exit status.

Measuring whether it is right

Model output varies from run to run. Evaluate it against a repeatable set of known examples:

  • Keep examples with known good answers and rerun them after prompt, tool or model changes. Provider updates can also change behavior.
  • Checks the code can make without a model: the output parses, required fields are filled in, links resolve, and nothing appears in the result that wasn’t in the input.
  • A measured rate instead of an impression, such as how often the agent’s judgment agrees with mine on the test set.
  • A sample of real runs reviewed by a person on a schedule, because the test set drifts away from reality over time.

Measure quality where the user relies on the output. An agent that produces a field without evidence gives the user little basis for trusting it.

Cost is an architecture decision

Each model call has a cost. The job-search design uses deterministic filtering so the model only sees relevant candidates.

Task difficulty matters when choosing a model. An OmniRoute gateway can add provider selection and fallback, with a container and credentials to maintain. FedPath illustrates when deterministic rules can be more useful, especially when a score needs to be explainable.

The scheduler, host, secrets store, logs and evaluation set are recurring expenses. See The Hidden Cost of Software Architecture.

Scope what the agent can touch

An agent with tools is a program that acts with your credentials, takes instructions from text, and reads text from the open internet. That last part should worry anyone who has run production systems, because untrusted input can carry instructions. The defences are the old ones, applied with more care. Least-privilege credentials created for the agent alone, so revoking one breaks nothing else. Secrets in a secrets store, never in a prompt or a skill file. A tool allow-list instead of a shell with root. A human approval in front of anything irreversible: sending, publishing, paying, deleting, applying. And an audit trail of what the agent did, so that “why did it do that?” has an answer.

Use deny-by-default permissions and grant only what the task needs.

Where people stay in the loop

Design approval around what can be undone. A reviewer needs the proposed action, its inputs and the reason. Record approvals and rejections, and narrow the scope when repetitive approvals stop getting attention.

Public-sector application design provides an analogy for audit trails and data boundaries. The document workflow example shows how a reviewer can confirm exceptions before downstream use.

Is an agent the right tool?

Before any of this, an engineering leader should ask whether the problem needs an agent at all. The business question is what the agent replaces, and what it costs to build, run and supervise compared with a script, a vendor product or a person doing the work.

Agentic AI fits when the task needs judgment over unstructured input, the steps vary from case to case, a wrong answer is cheap to catch or reverse, and the volume justifies the build and running cost. It fits poorly when the rules can be written down, when every decision must be explained to a customer or a regulator, when mistakes are expensive and hard to detect, or when the volume is too low to repay the operational work.

Combine deterministic fetching or filtering, a model for the interpretation step, and a person for consequential decisions. The job-search design illustrates that split.

How to decide whether an agent is ready

Before unattended use, ask how the system recovers, who approves its actions and what evidence shows that its results are useful.

Fig. 696-1 Nine questions before an agent runs unattended
QuestionWhat a good answer looks like
Who owns it?A named person who gets the alert, not “the AI”
What does done look like?A measurable result someone checks, beyond the run exiting cleanly
What happens when the model or a tool fails?Timeouts, bounded retries with backoff, and a failed run that says so
How is the output verified?A test set with known answers, rerun on every prompt or model change, plus sampled human review
What if it runs twice?Idempotent writes, keyed so a repeat changes nothing
What if it does not run at all?A missed run is detected, not discovered a week later
What can it touch?Least-privilege credentials and tools; irreversible actions behind approval
What does a run cost?Tokens and dollars logged per run, with a budget that stops it
Would a script do?Deterministic code for everything that does not need judgment

Behind those sit the usual production commitments: a reliability target that someone agreed to, monitoring that pages a person, an incident process that includes “turn the agent off”, and a cost budget reviewed like any other line item.

Short answers

What is the difference between an AI agent demo and a production agent?

A demo shows a model can do the task once with a person watching. A production agent does it every day without one: it survives failed calls and missed schedules, never repeats an irreversible action, stays within a budget, touches only what it is allowed to, and produces results someone can check.

How do you make an AI agent reliable?

Treat it as a distributed system: timeouts and bounded retries with exponential backoff on every model and tool call, idempotent side effects keyed so a repeat changes nothing, detection of missed runs, durable state between runs, and observability of what ran, what it cost and whether the result passed a check.

How should an engineering leader decide whether agentic AI fits a problem?

Agentic AI fits when the task needs judgment over unstructured input, the steps vary, a wrong answer is cheap to catch or reverse, and the volume justifies the build and running cost. It fits poorly when the rules can be written down, decisions must be explained to a customer or regulator, mistakes are expensive and hard to detect, or volume is too low to repay the operational work. Often the best design is deterministic code plus a model for the one step that needs judgment, with a person approving what matters.

When should you not use AI in an agent?

For anything that does not need judgment. Fetching, filtering, de-duplicating and scoring by transparent rules are better as deterministic code you can test. FedPath, for example, scores contracts with visible rules and keeps solicitation documents off outside AI services.

Before an agent runs unattended

Test recovery from a missed run, verify permissions around every tool and check the output against known examples.

Readiness depends on evidence from repeated trials with realistic failures.

See how troubleshooting habits transfer from networks to AI agents for a broader view.

The whole series