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.2.tar.gz (9.9 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.2-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bench_observe-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 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.2.tar.gz
Algorithm Hash digest
SHA256 de23bdc8ca2e5d7fbf18d16ee2c19272a5f495de12023772b2ff3505b9db70ba
MD5 f839f689f2c8f7a65781a77af8f595ba
BLAKE2b-256 f1f7bc7b3a097b5d31938e3fe251a3ab56866b660811edf5e2f7c0042dea5dd7

See more details on using hashes here.

Provenance

The following attestation bundles were made for bench_observe-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: bench_observe-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3355d41bcba9e0961e2235e6499d7080c4962f31b5b389455f3d115ef209a3
MD5 deb675988d82a2702c509afff4abf716
BLAKE2b-256 c72f55382b0b0378a13414e3d55f5d375e4dc368d0ea439520ff8a625f956bdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bench_observe-0.1.2-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