Skip to main content

bench-observe

Python SDK for Bench — observability for AI agents. Zero dependencies.

pip install bench-observe

Usage

import asyncio
from bench import observe

agent = observe(api_key="bk_xxx", agent="my-agent")

async def search(t):
    result = await do_search()
    t.log("found", len(result))
    t.cost(0.004)
    return result

async def main():
    result = await agent.task("search", {"query": "python"}, search)

asyncio.run(main())

Context manager

async with agent.task_ctx("summarize", {"doc": url}) as t:
    summary = await llm.generate(prompt)
    t.log("tokens", 1200)
    t.cost(0.012)

Subtasks

async def pipeline(t):
    await t.subtask("fetch", {"url": url}, fetch_fn)
    await t.subtask("parse", {"html": html}, parse_fn)
    await t.subtask("embed", {"text": text}, embed_fn)

await agent.task("full-pipeline", input, pipeline)

Custom events

agent.event("tool.use", {"tool": "search", "query": q})

After one run you get a live dashboard, public profile, and README badge — no other setup.

Metadata

Release files for bench-observe 0.1.2

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

Source distribution (sdist)

Source distribution for bench-observe 0.1.2
File Size Uploaded Provenance Actions
bench_observe-0.1.2.tar.gz 9.9 kB With provenance Details for bench_observe-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bench-observe 0.1.2
File Interpreter ABI Platform Actions
bench_observe-0.1.2-py3-none-any.whl Python 3 none any Details for bench_observe-0.1.2-py3-none-any.whl

Total release size: 19.5 kB

Release files / bench_observe-0.1.2.tar.gz

Download URL bench_observe-0.1.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
de23bdc8ca2e5d7fbf18d16ee2c19272a5f495de12023772b2ff3505b9db70ba
BLAKE2b-256 checksum
How to use checksums
f1f7bc7b3a097b5d31938e3fe251a3ab56866b660811edf5e2f7c0042dea5dd7
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 Jul 1, 2026.

Transparency log

Release files / bench_observe-0.1.2-py3-none-any.whl

Download URL bench_observe-0.1.2-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa3355d41bcba9e0961e2235e6499d7080c4962f31b5b389455f3d115ef209a3
BLAKE2b-256 checksum
How to use checksums
c72f55382b0b0378a13414e3d55f5d375e4dc368d0ea439520ff8a625f956bdb
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 Jul 1, 2026.

Transparency log

Security for bench-observe 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bench_observe-0.1.2.tar.gz

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 Jul 1, 2026.

Transparency log

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