Reliable AI agents
Last updated · Published by Trustabl
A reliable AI agent completes its task consistently, stays within its permitted scope, and fails safely when it can't. This guide explains why agents fail in production and lists the open-source tools that help at each stage of the agent reliability lifecycle. Reliable Agents is a vendor-neutral guide published by Trustabl, which builds some of the listed projects.
Models get more capable every quarter, but agents built on them still loop, time out, call the wrong tool, leak data and fail silently. Capability is not turning into reliability:
| Finding | Source |
|---|---|
| Across 15 models, recent capability gains produced only small improvements in reliability | Princeton, Towards a Science of AI Agent Reliability |
| The best agent's retail success dropped to about 25% when the same task had to succeed 8 times in a row (pass^8), roughly 60% below its single-run score | Sierra, τ-bench |
| 97.1% of 856 MCP tool descriptions had at least one quality problem | MCP Tool Descriptions Are Smelly! |
| Over 40% of agentic AI projects will be canceled by the end of 2027 | Gartner |
Many of these failures come from the code, tools and permissions around the model, not the model itself, so reliability has to be engineered at every stage.
The agent reliability lifecycle
Reliability is built in and tested. Containment limits the damage when an agent fails anyway. Observability shows what to fix next.
Four stages, joined by a feedback loop. Each stage answers a different question and has its own open-source tools.
| Stage | Question it answers | Tools |
|---|---|---|
| 1. Code (build) | Is the agent written to be reliable? | Code tools |
| 2. Test (evaluate) | Does the code have gaps, and does the agent behave correctly every time? | Test tools |
| 3. Contain (deploy safely) | If it goes wrong, how much damage can it do? | Contain tools |
| 4. Observe (monitor) | What did it do, why, and under whose authority? | Observe tools |
| ↻ Learn | How does production make the next version more reliable? | The feedback loop |
Where to start: highest value, least effort
Most reliability gaps are written into the agent's code. So the highest value for the least effort is at the start: stop gaps being written, then catch the ones that slip through.
- New agents: build reliable agents with Forge, so coding agents write reliability in from the first line.
- Existing agents: make your agents reliable with the Agent Reliability Analyzer, which finds the gaps already in the code.
| Stage | What to do | Value | Effort | Value for effort | Tools |
|---|---|---|---|---|---|
| Code | Add reliability skills to your coding agent (Claude Code, Cursor, Codex) | High: prevents gaps in all new code. Best for new agents | Lowest: minutes, no CI changes | ★★★★★ | Code tools |
| Test: scan | Run deterministic static analysis on every commit | High: finds gaps in existing and new code. Best for existing agents | Low: CLI or GitHub Action, then triage findings | ★★★★★ | Static analysis tools |
| Test: evals | Run each test task 5 to 8 times and count only tasks that pass every time (pass^k) | High: measures behavior code analysis can't see | High: write and maintain test tasks and graders | ★★★ | Eval tools |
| Contain | Sandbox with least privilege | Medium to high: limits damage | Medium: environment and policies | ★★★ | Contain tools |
| Observe | Trace with OpenTelemetry | Medium: finds failures after the fact | Medium: instrumentation and a platform | ★★ | Observe tools |
Explore the guide
| If you want to… | Read |
|---|---|
| Understand what "reliable" means for an agent | What is a reliable agent? |
| Find out why your agent fails | Why AI agents fail in production |
| See how the four stages fit together | The agent reliability lifecycle |
| Pick tools for a specific stage | Agent reliability tools |
| Check an agent before it ships | Agent reliability checklist |
| Sort out reliability vs observability vs evals | Reliability vs observability |
New to the topic? Read what makes an agent reliable, then the eight common failure modes.