Your AI agent works in the demo and breaks in production.
If your agent crashes partway through a job, gives worse answers after a model update, acts on stale data, takes an action nobody approved, or costs more than it should, it's usually one of a short list of causes. We find which one, rank what to fix first, and fix it.
Xillentech engineered specialized Autonomous Agents including Voice Command AI to automate our workflows end-to-end. They transformed complex requirements into predictable, scalable outcomes.
Why do AI agents fail in production?
AI agents usually fail in production for one of five reasons: they crash mid-job and lose their work, a model update quietly changes their answers, they act on stale or wrong data, they take an action nobody approved, or their cost per run climbs. All five stay hidden in a demo and show up under real traffic.
A demo runs the happy path once, at your pace, with clean inputs. Production runs the same workflow thousands of times, against messy inputs, dependencies that change under you, and traffic nobody staged for.
Small error rates compound. A step that succeeds 99% of the time, chained across 100 sequential steps, completes end to end only about 37% of the time. Anthropic's own guidance on agents names the trade-off directly: autonomy brings higher costs and the potential for compounding errors.
The problem is common. In LangChain's State of Agent Engineering survey of 1,340 practitioners, one third named quality as their primary blocker to production.
Which failure is yours?
Match what you're seeing to a row. Each one points at a likely cause and something you can check yourself today, before calling anyone.
| What you're seeing | What it usually means | What to check first |
|---|---|---|
| A long job fails partway, and the retry repeats work (and API charges) it had already done | Crash mid-job. Nothing records which steps finished, so recovery means starting over. | Kill the worker mid-run in staging. Does the job resume at the failed step or restart from zero? |
| Answers got worse, but nothing changed in your code | Silent drift. A model, API, prompt, or retrieval source changed behind you. Research on GPT-3.5 and GPT-4 found their behaviour can vary greatly over time. | Run a fixed set of test cases against today's version and compare the scores with launch. |
| Confident, wrong answers about customers, orders, or records | Stale or wrong data. The agent reads a cached copy, a duplicate record, or a conflicting document. | For one bad answer, compare what the agent read with the live record. |
| The monthly bill doesn't match the average cost per run | Runaway cost. A small share of inputs sends the agent into retries or very long reasoning chains. Sapota describes a pattern where often 1–5% of users drive 30–60% of cost. | Sort cost per run from worst to best instead of averaging, and look at what the worst runs share. |
| The agent did something nobody approved | An approval gate isn't firing. The gate exists, but its condition is too narrow or was never tested. OWASP's guidance is to require a person to approve high-impact actions. | Try to trigger the exact action the gate is meant to stop, and check whether it stops. |
The first four are the same failure modes a Reliability Audit tests for. If more than one row fits, or none clearly does, that's what the audit is for.
What breaking our own system on purpose showed
Before we diagnose anyone else's agent, we forced these failures on Crawlify, the data-extraction system we build and run ourselves: we killed the worker process mid-run, with no clean shutdown and no warning.
60 of 62
workflows resumed on their own from the step they were killed at
$0.0041
to re-run 14 of 41 nodes in a targeted repair, instead of the whole job
Do you need an audit, or straight to a fix?
Either path stops the failure you're seeing. The difference is how sure you already are about the cause.
Start with a Reliability Audit
- You're not sure which row above is yours, or more than one fits
- You want a ranked, written list of everything that's broken, beyond the symptom you noticed
- You need a documented case before a budget conversation
Go straight to Production Hardening
- You already know which failure this is
- The fix needs real engineering: durable execution, approval gates, cost ceilings, eval-gated deploys
- You want it fixed and tested, not documented
If nothing running today is worth keeping, building a new agent right the first time may be faster. And if you want the checking to carry on after the fix, as models and traffic change, that's what the AgentOps Retainer does.
How much does it cost to fix a broken AI agent?
It depends on which failure it is and how deep the fix needs to go. An approval gate that isn't firing can sometimes be corrected in days once it's found. Drift traced to a retrieval pipeline, or a dependency change that touches several workflows, usually needs a full Production Hardening engagement. We scope it in a working session and give you a fixed fee before anything starts. There's no published price, because a one-agent chatbot and a twelve-agent pipeline take very different amounts of work to fix properly.
Frequently asked questions
Something around it changed. An agent depends on things you don't control: the model behind an API, the libraries and services it calls, the data it retrieves, and the traffic it receives. Any of those can shift without a change in your code, and the agent has no way to notice. The quickest way in is to check, in order, whether a model or dependency version changed recently, whether the data it reads still matches the live records, and whether cost or quality dropped for every request or only some. That usually narrows it to one of the rows in the table above.
Testing usually covers the happy path with clean inputs, one run at a time. Real users bring messy inputs, long sessions, retries, and edge cases nobody wrote a test for, at a volume where small error rates add up. A step that works 99% of the time fails often once it runs thousands of times a day or sits inside a long chain of steps. The fix is to test the failure paths on purpose: kill a worker mid-job, feed it the ambiguous and adversarial inputs, and gate deploys on tests built from real failures.
Averages hide the expensive tail. A small share of inputs, such as unusually long documents, malformed queries, or prompts that send the agent into a retry loop, can account for a large share of the bill. Sort cost per run from most to least expensive and look at what the top runs have in common. The fix is usually a cost ceiling per run and per user, an iteration cap so a stuck agent stops instead of looping, and an input limit, so no single request can run up an unbounded bill.
Yes. Research comparing versions of GPT-3.5 and GPT-4 over time found that their behaviour can vary greatly, which is why the researchers called for continuous monitoring. If your agent calls a hosted model, the provider can change it behind the same API name. The defence is a fixed set of test cases, run against every model or prompt change and on a schedule, so a drop in quality shows up as a number on your side before it shows up as a customer complaint.
Yes. We don't need to have built it to diagnose it: the failure modes above show up regardless of who wrote the code or which framework it uses. We start by reading the code and running the system until it fails the way it failed for you, then rank what to fix by what it costs you if it keeps happening. If your team is keeping the agent, we write the fixes into your codebase and leave runbooks behind, so the people who own it can run it afterwards.
If you're not sure which failure you're looking at, or you want a ranked, written record before committing budget, start with the Reliability Audit. It takes one to two weeks and ends with a prioritised fix-it plan. If you already know exactly what's broken and need it engineered, Production Hardening is faster, because it skips a diagnostic step you don't need. Either way, the work is scoped in a working session first, with a fixed fee agreed before anything starts.
It depends on which failure it is. An approval gate that isn't firing can sometimes be corrected within days once it's found. Silent drift traced to a retrieval pipeline, or a dependency change that touches several workflows at once, usually needs a Production Hardening engagement of four to twelve weeks; an agent that loses its work when it crashes often needs durable execution on Temporal. A Reliability Audit, one to two weeks, is what tells you which situation you're in before you commit to either timeline, so you're not paying for a long engagement to fix a short problem.
Find out which one it is.
Tell us what your agent does and what you're seeing. We'll tell you whether a short audit or a full fix is the honest answer.
Tell us what's breaking
Describe what the agent does, what you're seeing, and when it started. We'll come back with which failure it most likely is and what it would take to fix, in a working session with no commitment beyond that conversation.
