Skip to main content
If your app uses Google ADK, Bento captures every model call, tool call, and agent run for you. No per-call code.
That’s the whole integration. Run your app and the dashboard fills in immediately.
Not on ADK? For raw LLM SDKs (OpenAI, Anthropic, Bedrock, Vertex), use bento.track_ai. For a framework that already emits OpenTelemetry (LangChain, LlamaIndex, Pydantic AI, or a TypeScript framework like the Vercel AI SDK or Mastra), see Export from any framework. All of these mix freely in the same app.

Install

The [adk] extra pulls in the OpenInference tracer for ADK. The base wheel stays small.

bento.instrument()

Call this once at app startup, after bento.init(...) and before any LLM call.
With no argument, Bento activates ADK if it’s installed and returns "adk", or returns None when the [adk] extra is missing. Passing "adk" activates ADK by name. An unknown name raises ValueError; a missing [adk] extra logs a warning and returns None. The call is safe to repeat: a second call with the same target is a no-op, and a second call with a different target logs a warning and is ignored. bento.shutdown() removes every active integration on the way out.

Identity at init

To stamp every captured span with user_id, session_id, and tags without threading them through your code, pass getters to bento.init(...):
A getter is any zero-argument callable. Bento calls it on every span and writes the result. Three common patterns:
If a getter raises, Bento drops the field for that span and your app keeps running. Telemetry never breaks the host. For more, see Configuration → Identity getters.

Add custom events

For ad-hoc events alongside the integration, wrap each one with bento.track_ai: a custom event before or after a model call, or an event for a step ADK doesn’t emit. The integration’s spans and your manual ones land in the same dashboard. If you need a single trace to span multiple LLM and tool calls within one turn, see Trajectories (advanced).

Reference

See also

Manual tracking

bento.track_ai for SDKs without an integration.

Configuration

init(), identity getters, env vars, lifecycle.

Trajectories

Group multi-step work into one trace.

OTel transport

Wire Bento into an existing OpenTelemetry pipeline.