@virajmishra1/bench-sdk
v0.1.3
Published
Observe AI agents. One line, then a live dashboard, public profile, and README badge.
Maintainers
Readme
@virajmishra1/bench-sdk
Observability for AI agents. One line of code → live dashboard, public profile, README badge.
npm install @virajmishra1/bench-sdkQuickstart
import { observe } from "@virajmishra1/bench-sdk";
const agent = observe({
apiKey: process.env.BENCH_KEY!,
agent: "my-agent",
});
await agent.task("search", { query: "hello" }, async (task) => {
task.log("started");
const result = await doSearch();
task.cost(0.003);
return result;
});That's the whole API. The wrapper records task.start, task.end, status, duration_ms, plus any task.log() / task.cost() calls inside.
What you get
- Live dashboard at
https://bench.virajmishratakehome.workers.dev/dashboard - Public profile at
https://bench.virajmishratakehome.workers.dev/@you/your-agent - Embeddable README badge:

API
observe(options)
interface ObserveOptions {
apiKey: string;
agent: string; // slug, e.g. "mcpify"
displayName?: string;
endpoint?: string; // default: bench.virajmishratakehome.workers.dev
flushIntervalMs?: number; // default: 2000
maxBatchSize?: number; // default: 50
}agent.task(name, input, fn)
Wraps an async function. Auto-records lifecycle.
agent.event(kind, data)
Manual event.
agent.flush()
Force-flush the buffer. Auto-called on batch full or interval. Useful before process exit.
License
MIT
