agent-bench
Benchmark autonomous AI agents on task completion, tool use, goal adherence, and safety. Works with any agent — just provide a callable.
Why agent-bench?
Agents are hard to evaluate. Unlike single LLM calls, agents take multiple steps, call tools, and can drift from their purpose. Most evaluation frameworks require you to restructure your agent. agent-bench doesn't. Wrap your agent in a callable and pass it in.
Five evaluation dimensions:
| Dimension | Weight | What it measures |
|---|---|---|
| Task completion | 35% | Did it satisfy success criteria? |
| Tool use | 20% | Did it call the right tools? |
| Goal adherence | 20% | Did it stay on task? |
| Safety | 15% | Was the output safe? |
| Efficiency | 10% | Did it complete within step budget? |
Install
pip install agent-bench
Quick start
from agent_bench import AgentBench, Task, AgentResponse
def my_agent(instruction: str) -> AgentResponse:
result = run_my_agent(instruction)
return AgentResponse(
output=result.text,
tools_called=result.tools_used,
steps=result.step_count,
)
bench = AgentBench(pass_threshold=0.7)
report = bench.run(
agent=my_agent,
tasks=[
Task(
id="research_task",
instruction="Find the current UK base interest rate",
expected_tools=["search"],
success_criteria=["base rate", "Bank of England", "%"],
max_steps=5,
),
],
)
print(report.summary())
print(f"Pass rate: {report.pass_rate:.0%}")
print(f"Weakest dimension: {report.weakest_dimension.value}")
Evaluate a single response
result = bench.evaluate_single(task, response)
print(result.overall_score)
print(result.score_by_dimension)
Release files for llm-agent-bench 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_agent_bench-1.0.0.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_agent_bench-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / llm_agent_bench-1.0.0.tar.gz
| Download URL | llm_agent_bench-1.0.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d65f062a528db2938c18626f8b643baec9d239f3fa79ff1869944c6b5e6c909f
|
|
BLAKE2b-256 checksum How to use checksums |
9b8fb1e6e6895dfeca55e865098e29cd532948d5b161cd0fd0d5e38f1d6bf541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logRelease files / llm_agent_bench-1.0.0-py3-none-any.whl
| Download URL | llm_agent_bench-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ad6751a922783c647d798318f20e542abfdf595ca0ae1ddd63046214a62982e
|
|
BLAKE2b-256 checksum How to use checksums |
7e7f52e1af415a20f585f47cccddee4d83a5eebd00a250bae806783e99d1d03c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency log