Skip to main content

Autobench

When an application changes, you need to know whether the new version is more correct, faster, cheaper, or more reliable. Teams usually answer that question with a custom benchmark script: a small program that runs representative inputs, checks the outputs, collects measurements, and prints a comparison. As the application grows, these scripts are repeatedly rewritten and their results become difficult to reproduce or compare.

We built Autobench to solve that problem. Define the cases, variants, task, scores, and reports once in YAML or Python. Autobench runs the experiment, collects the evidence, records exactly what happened, and lets you replay, report, compare, or export the result without rebuilding that infrastructure for every application.

It is a YAML-first Python framework for AI and non-AI systems:

  • deterministic dataset x variant execution
  • sync and async application tasks
  • semantic observations, checks, measurements, artifacts, and ABP traces
  • built-in and custom scoring, cost derivation, policies, and paired baselines
  • native Pydantic AI, OpenAI, OpenAI Agents, and HTTPX instrumentation
  • explicit and automatic prompt/tool/schema/agent asset lineage
  • immutable YAML records, replay, Rich reports, comparisons, and exports
  • optional immutable-record export to OTLP-compatible telemetry backends

Install

uv add autobench

For native SDK instrumentation:

uv add 'autobench[instrumentation]'

For outbound OTLP HTTP/protobuf export:

uv add 'autobench[otlp]'

First Run

autobench validate examples/minimal/autobench.yaml
autobench run examples/minimal/autobench.yaml --record /tmp/autobench-minimal
autobench replay /tmp/autobench-minimal
autobench report /tmp/autobench-minimal

A task is a normal sync or async callable:

from autobench import Case, RunContext


def run(ctx: RunContext, case: Case) -> Result:
    mode = ctx.factor("mode")
    with ctx.span("subject", kind="workflow") as span:
        result = application(case.input, mode=mode)
        span.set_output(result)
        return result

The YAML spec owns reusable benchmark infrastructure: cases, variants, scoring, derivation, policies, instrumentation, and reports.

Examples

Directory Demonstrates
examples/minimal Inline cases, variants, exact scoring, report and comparison
examples/basic File dataset, spans, checks, artifacts and failure visibility
examples/mid Semantic usage, pricing, cost, policies and distributions
examples/advanced Repeated measurement and paired-baseline speedup
examples/pydantic_ai Live layered instrumentation and automatic asset discovery
examples/automatic_assets Offline Pydantic AI and custom SDK behavioral lineage
examples/abp_* Manual, concurrent, streaming, Agents and replay protocol flows
examples/otlp_export Offline immutable ABP record to OTLP mapping
examples/codemode Migration of a real external benchmark runner

Run the offline release matrix:

make examples

Documentation

Full documentation: vcoderun.github.io/autobench

LLM-readable indexes are available at llms.txt and llms-full.txt.

Development

uv sync --extra dev --extra instrumentation --extra openai-agents --extra otlp
make prod
make pre-commit

The release gate enforces Python 3.11-3.14, strict lint and typing, strict documentation builds, offline examples, and 100% source line and branch coverage.

Metadata

Release files for autobench 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autobench 0.6.0
File Size Uploaded Provenance Actions
autobench-0.6.0.tar.gz 761.3 kB Without provenance Details for autobench-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autobench 0.6.0
File Interpreter ABI Platform Actions
autobench-0.6.0-py3-none-any.whl Python 3 none any Details for autobench-0.6.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / autobench-0.6.0.tar.gz

Download URL autobench-0.6.0.tar.gz
Size 761.3 kB
Tags Source
SHA-256 checksum
How to use checksums
491c7cb4efc518ffd2ca3ee605a49a04a4068c0be9e7b4440fc3a159f7619f98
BLAKE2b-256 checksum
How to use checksums
c15ced6cbb21cdfaa14d014f5d47a97a6cf4943d8656641cb7e7c1a6fd775bad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / autobench-0.6.0-py3-none-any.whl

Download URL autobench-0.6.0-py3-none-any.whl
Size 349.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65e918a2594474fdd7b102e2ea34aaa499ffdd6016e4146fb0225c1fa457b71c
BLAKE2b-256 checksum
How to use checksums
454e93539fec92d42b7c9ac89d95b8be858d127db2be4274ceb37e69aaeb53f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for autobench 0.6.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page