Building reliable AI agents - why boring beats brilliant

In a December 2024 simulated-workplace benchmark, a GPT-4o agent failed to fully complete 91.4 percent of tasks. Reliable AI agents need recovery, verification and monitoring as well as model capability.

On this page
  1. Why do businesses need predictable over impressive?
  2. The engineering discipline AI agents actually need
  3. Production patterns that contain failures
  4. Monitoring what actually matters
  5. Building for the long term

Key takeaways

  • Task completion needs testing - Historical agent benchmarks show why model scores alone cannot establish reliability across a full workflow

  • Reliability requires engineering discipline - Building dependable agents means implementing error handling, monitoring, and graceful degradation from day one

  • Production patterns contain failures - Bounded retries, circuit breakers, and input validation help agents recover or stop safely

  • Measure what matters - Track success rates, latency, and error budgets instead of just model accuracy and impressive demos

An AI agent can be brilliant. But if it fails 15% of the time, users need a dependable way to detect and handle those failures.

The December 2024 TheAgentCompany benchmark tested agents on 175 tasks in a simulated software company. With the OpenHands CodeAct harness, GPT-4o failed to fully complete 91.4% of tasks, Llama-3.1-405b failed to fully complete 92.6%, and Amazon Nova Pro v1 failed to fully complete 98.3%. These were results for that setup, not failure rates for office work in general.

The problem isn’t capability. These are complex systems built by excellent teams.

The problem is reliability.

Why do businesses need predictable over impressive?

A company can get excited about an AI demo, then lose confidence when it works only 85% of the time in production. That missing 15% matters when you’re processing customer orders, managing support tickets, or handling financial data.

Worth pulling apart. An agent that correctly completes 60% of tasks and safely hands off the rest can be more useful than one that gets 95% right but fails unpredictably on the other 5%. The difference? Predictability. You can build workflows around known limitations. You can’t build workflows around random failures. After 10+ years in workflow automation, I keep watching this same trade-off play out the same way.

The risk across a long chain is easy to illustrate. If every step must succeed and each has a 95% chance of success given the previous steps succeeded, a 20-step workflow succeeds about 36% of the time. At 99% per step, it succeeds about 82% of the time. Those assumptions matter: retries, dependencies and recovery change the result.

Cost, complexity, and risk can become clearer once a prototype meets real workloads. I examine that operational cost in the managed-agent cost crossover: include the human time needed to keep an agent patched, credentialed, and running alongside the compute bill.

Teams focus on improving model performance when they should be building patterns that handle failure gracefully. Some failures have familiar responses: authentication fails, you show a login screen; the database fails, you queue the request; a transient network failure may call for a safe retry with backoff. AI agents can also return something wrong that looks right. That needs an output check.

The engineering discipline AI agents actually need

Building reliable agents means treating them like the distributed systems they are. Not like magic black boxes. Will better models solve this? No. I’m skeptical that even GPT-7 changes the underlying answer here, because the failure modes are about coupling, state, and recovery, not about raw model intelligence.

Since I wrote this, Anthropic has reported progress in detecting and disclosing mistakes. In its May 2026 announcement, it said Claude Opus 4.8 was around four times less likely than Opus 4.7 to leave flaws in its own code unremarked in its evaluations. That is a narrower claim than general task reliability, and it doesn’t design your fallbacks. The argument stands.

Reliable AI agent architecture with retry backoff, circuit breakers, input validation, and graceful degradation

The retry path applies to transient failures that are safe to repeat. Check the output before marking the task complete; send other failures to a stop or fallback path.

Start with error handling. Every tool your agent uses can fail. Production AI deployments need retry logic with exponential backoff. When your agent calls an API, that call needs to handle timeouts, rate limits, and service outages.

Retry transient failures only when the operation is safe to repeat, using idempotency keys where supported. Use bounded exponential backoff with jitter. Set attempt and total-time limits, respect rate-limit guidance, and log attempts. Do not blindly retry invalid input or a side effect that may already have happened.

Validate tool inputs before execution: schema, types, ranges, and formats. Then check whether valid-looking arguments make sense for the requested action.

Graceful degradation separates production systems from prototypes. What happens when your agent can’t complete a task? Does it fail silently? Return partial results? Fall back to a simpler approach? Hand off to a human? AI reliability engineering requires answering these questions before deployment, not after the first painful failure at 11 PM on a Friday.

The teams building reliable agents design for failure modes first. They assume the model will hallucinate, tools will time out, and dependencies will go down. Then they build systems that work anyway.

When your firm is wrestling with this, we can talk.

Production patterns that contain failures

The interesting part is circuit breakers. When an external service starts failing, stop calling it. Track the error rate. If it crosses a threshold, open the circuit and use a fallback. Check periodically if the service recovered.

This pattern, popularized by Michael Nygard in his book Release It!, works well for AI agents. When your document processing service starts timing out, switch to a simpler extraction method instead of queueing thousands of failed requests. Simple idea. Profound impact.

State persistence lets an agent recover from saved checkpoints. In LangGraph, configure a persistent checkpointer and a thread ID, and choose a durability mode that fits your failure tolerance. A restarted workflow resumes from saved state, so operations that may run again must be safe to repeat. An in-memory checkpointer will not survive a process restart.

Persistence is one part of recovery. It still needs testing against interruptions and duplicate side effects.

Resource limits can contain runaway agents. Set limits on API calls, token usage, execution time, and memory consumption. Add a no-progress check and a clear stop or handoff path when the agent reaches a limit.

Before the patterns above can save you, you need to know which failure you are actually looking at. Agent failures look superficially similar in logs - “the agent did the wrong thing” - but the underlying cause varies wildly. The diagnostic table below gives possible causes to investigate and patterns to test.

Agent failure you observe

Possible cause to investigate

Reliability pattern to test

Agent picks the wrong tool from its toolboxTool descriptions overlap or are too vagueTighten tool docstrings; add few-shot examples for tool selection
Agent invents tool arguments that do not existParameter constraints missing from the schemaStrict JSON schema validation; reject hallucinated args before execution
Agent loops on the same tool call indefinitelyNo max-step bound; no progress check between iterationsHard step limits; resource-protection circuit; explicit “give up” path
Agent loses thread in long tool chainsContext window saturating; lost-in-the-middle on tool outputs

Summarize intermediate state; persist via durable execution (e.g., LangGraph)

Agent confidently reports success on a failed actionNo verification of tool output; agent trusts its own narrationVerifier step (LLM-as-judge or deterministic check) before “done” state
Agent reliability declines across a long chainAll-step success can fall (0.95^20 = 0.358 under the assumptions above)Decompose the workflow; add verifier gates; test a suitable step limit

The row I would not skip is the one about an agent reporting success on a failed action. For a code-change task, start with a deterministic check: did the expected files change, and do tests demonstrate the requested behavior? Check the probe itself with a known passing and failing case. Then have a fresh reviewer inspect the diff against the task. A valid audit may require no changes, so the check must match the assignment. The second pass costs time and compute, and neither pass guarantees correctness. Together they give you evidence beyond the agent’s own completion message.

None of this is complicated. It’s boring. Beautifully, almost militantly boring. That’s exactly why it works.

Monitoring what actually matters

In LangChain’s public survey of 1,340 respondents conducted in November and December 2025, nearly 89% reported some observability and 52.4% reported offline evaluations. The sample was heavily weighted toward technology companies. That shows a gap between two practices in this sample; it does not show that everyone else ignores correctness.

Tracing what an agent did and evaluating whether its output is correct answer different questions. You need both.

Track success rate first. What percentage of tasks does your agent complete correctly? Not “how accurate is the model” but how often does the whole workflow produce the right outcome?

Track latency at each step and for the whole task. An acceptable average can hide a slow tail. Latency percentiles help show which users are waiting much longer.

Error budgets make a reliability target measurable. A 99.9% uptime SLO allows 43.2 minutes of downtime in a 30-day window. For an agent, you might instead budget unsuccessful tasks. Agree in advance what happens when the budget is exhausted; Google’s example policy pauses ordinary releases while allowing urgent and security fixes. A 99.7% internal task-success target above a 99.5% SLA is one possible buffer, provided both use the same task definition and measurement window.

Configure alerts that actually mean something. “Agent failed” isn’t useful. “Agent failure rate exceeded 5% for 10 minutes” tells you to act.

The monitoring setup worth copying tracks cost per successful task completion: the full economic picture, beyond raw token usage. When an agent starts making more API calls without improving results, that metric can reveal the extra cost, alongside task-quality and failure measures.

Building for the long term

Results can change when the data, model, tools, or workload change. Recheck performance after those changes and against representative production cases. I think that pattern surprises most people who haven’t run these systems in production for a while.

The more I look at it, the clearer one thing gets. I said earlier that “the problem isn’t capability, the problem is reliability.” That undersells what’s actually happening. The fuller truth: capability and reliability trade off against each other in ways teams don’t anticipate. A more capable agent has a larger surface area to fail across. Something I keep noticing across industries is that the most “capable” agents in benchmarks are often the least reliable in production, because the very features that boost benchmark scores (longer chains, more tool calls, more autonomous decisions) compound the error rate. The way out is architectural rather than clever: stop trusting any single chain and run independent verifiers in parallel against its output.

Combat drift with continuous evaluation. Run a test suite against your agent weekly. Compare results to baseline. Catch degradation before your users do.

Testing needs to cover edge cases and unexpected inputs: incomplete inputs, contradictory instructions, rate limits, service outages, malformed responses, languages outside the tested use case. These scenarios reveal whether you built reliable patterns or just got lucky during your demo.

Document every tool your agent uses, every external dependency, every timeout value, every retry policy, every fallback strategy. When something breaks at 2 AM, you’ll need this. Write it now, not during an outage. Agent reliability starts with centralizing the code so IT can actually see and scan it, because you cannot document or monitor what you do not know exists.

The incident response plan matters as much as the architecture. Who gets paged? What’s the rollback procedure? How do you route traffic to a backup? Where are the circuit breakers? AI incident response needs clear ownership as well as technical recovery.

For high-stakes decisions, define where a person must approve an action and how to stop or reverse it. Give that reviewer enough information and time to make a real decision. An agent can propose an action; the workflow still needs a named owner for the outcome.

The gap between impressive demos and production systems is engineering discipline. Error handling. Monitoring. Graceful degradation. Circuit breakers. State persistence. Error budgets.

None of this is new technology. It’s applying proven reliability patterns to a new kind of system.

Your brilliant agent that fails randomly is worth less than a predictable agent that admits its limitations. Build for reliability first. Improve capability second. That is the approach I recommend for moving from prototype to production.

About the Author

Amit Kothari is an experienced consultant, advisor, coach, and educator specializing in AI and operations for executives and their companies. With 20+ years of experience, he is the Co-founder and CEO of Tallyfy® (raised $3.6m, the Workflow Made Easy® platform) and founding partner at Blue Sheen, which helps small and medium-sized companies get their whole team using AI. Originally British and now based in St. Louis, MO, Amit combines deep technical expertise with real-world business understanding. Read Amit's full bio →

Disclaimer: The content in this article represents personal opinions based on extensive research and practical experience. While every effort has been made to ensure accuracy through data analysis and source verification, this should not be considered professional advice. Always consult with qualified professionals for decisions specific to your situation.

Contact meMore about me

Blue Sheen helps small and medium-sized companies get their whole team using AI.

Contact me Follow 10k+