Skip to main content

Autobench

Autobench turns one-off benchmark scripts into semantic, replayable experiment evidence.

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

Install

uv add autobench

For native SDK instrumentation:

uv add 'autobench[instrumentation]'

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/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
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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autobench-0.2.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autobench-0.2.0-py3-none-any.whl (212.1 kB view details)

Uploaded Python 3

File details

Details for the file autobench-0.2.0.tar.gz.

File metadata

  • Download URL: autobench-0.2.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for autobench-0.2.0.tar.gz
Algorithm Hash digest
SHA256 af75c22f8fea5f050f3efe7fc4804267eb277f82487178d1aa654dda27f917fa
MD5 7706401bb310d4552a079a99e7d563c7
BLAKE2b-256 0148544fa1cb0af2369df819ae8cf0538f327b15450947334a91fa9f2f55a411

See more details on using hashes here.

File details

Details for the file autobench-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: autobench-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 212.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for autobench-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 408ee0556830b5d2d6c18413e47df98a9ef41a25af75bb00f51cc10acb46b895
MD5 bf45250fe177477927b220cf374f85a5
BLAKE2b-256 1b3930ba5230e81329009ea5b99c47b2f0372d46a29651b62605b534265d3e8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page