Skip to main content

Bench — the home for your AI agents. One line of code → live dashboard, public profile, README badge.

Project description

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.

Project details


Download files

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

Source Distribution

bench_observe-0.1.3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

bench_observe-0.1.3-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file bench_observe-0.1.3.tar.gz.

File metadata

  • Download URL: bench_observe-0.1.3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bench_observe-0.1.3.tar.gz
Algorithm Hash digest
SHA256 79c43f35d7240c2dad0250e89ab9cb6a464607a2017bcab189a75c32926a61e2
MD5 c73a9b6f4352d8a740a615911bdf3ed3
BLAKE2b-256 b953c42ddbf74c8ee1a3ddcd1d94f0d018dc6c9bb1425d4143800c01a8354014

See more details on using hashes here.

Provenance

The following attestation bundles were made for bench_observe-0.1.3.tar.gz:

Publisher: publish-python.yml on VirajMishra1/bench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bench_observe-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: bench_observe-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bench_observe-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 99b80ac75cc9388afadb45181f96ec25af695b6dedac4da701c5d4a18087fbb4
MD5 c2a1ec821adff9140a41c8c5c41c235d
BLAKE2b-256 fd8e94b0ee86c566b5d3c4283197c96584f88f06ffb094aaf8f83b2cbf1008b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bench_observe-0.1.3-py3-none-any.whl:

Publisher: publish-python.yml on VirajMishra1/bench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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