Test: check code and behavior before release
Last updated · Published by Trustabl
Question this stage answers: does the agent's code have reliability gaps, and does it behave correctly every time?
Testing an agent has two halves. Static analysis reads the code and finds gaps before the agent runs; deterministic analyzers give the same result on every run. Evals and scenario tests run the agent, many times, to check behavior. Both belong in CI on every change. For agents already in production, static analysis is the quickest way to make existing agents reliable.
Deterministic static analysis
| Tool | What it does for reliability | Repo |
|---|---|---|
| Agent Reliability Analyzer | Trustabl's deterministic static analyzer for agents: 350+ rules across nine agent SDKs find reliability gaps such as missing timeouts, unhandled tool errors and unbounded loops. Runs locally with no LLM, no account and no code upload, in CI or GitHub Actions, and proposes fixes. | agent-reliability-analyzer |
| Agent Reliability Rules | Trustabl's open, deterministic rule packs applied at scan time, covering MCP, LangGraph, LangChain, Claude and other SDKs | agent-reliability-rules |
Evals and scenario tests
| Tool | What it does for reliability | Repo |
|---|---|---|
| AgentEvals | LangChain's open-source evaluators for agent trajectories: whether the agent took the right steps and made the right tool calls | agentevals |
| DeepEval | Pytest-style evaluation framework with agent, tool-use and task-completion metrics | deepeval |
| Giskard | Open-source testing library that scans LLM apps and agents for quality, robustness and security issues | giskard-oss |
| Inspect | Evaluation framework from the UK AI Security Institute for agentic and tool-using tasks | inspect_ai |
| LangWatch Scenario | Simulation-based agent testing: an agent tests your agent across multi-turn scenarios in CI | scenario |
| OpenEvals | LangChain's open-source library of ready-made evaluators for LLM apps | openevals |
| promptfoo | Test and red-team prompts, agents and RAG pipelines with declarative test cases | promptfoo |
| Ragas | Evaluation toolkit for LLM applications, including retrieval-augmented generation and agent metrics | ragas |
Agent benchmarks
| Tool | What it does for reliability | Repo |
|---|---|---|
| AgentBench | Benchmark suite for evaluating LLM-based agents across interactive environments | AgentBench |
| BrowserGym | Benchmark and environment framework for evaluating web-browsing agents | BrowserGym |
| OSWorld | Benchmark environment for evaluating agents on realistic computer-use tasks | OSWorld |
| τ-bench | Benchmark measuring agent consistency over repeated runs (pass^k) in tool-use domains | tau-bench |
What to measure
| Dimension | Metric |
|---|---|
| Consistency | pass^k: run each task 5 to 8 times and count tasks that succeed every time |
| Robustness | Success when task wording changes, and under injected faults (timeouts, rate limits, schema drift) |
| Predictability | Calibration: does the agent's "done" signal match what actually happened? |
| Safety | Error severity: cosmetic, recoverable or irreversible |
| Efficiency | Cost per completed task |
These dimensions are defined on What is a reliable agent?. Failures found in production become new tests through the Learn loop.
Further reading
- Towards a Science of AI Agent Reliability (Princeton)
- What Metrics Best Measure Agent Reliability? (Trustabl)
- Reliable Agents Start Before Runtime (Trustabl)
- How Static Analysis Reduces Token Usage in AI Agents (Trustabl)
Next stage: Contain