Choose a setup method
Start with one method for a call path. Combining SDK tracking with framework
OpenTelemetry on the same call can create duplicate interactions.
Recommended: Agnost AI skill
Recommended. Choose this path when you want your coding agent to inspect the
project, select a supported transport, make the smallest instrumentation change,
send a test event, and verify that it reached Agnost AI.
Manual setup: Agnost AI SDK
agent.run() does not raise for model or provider failures. It returns a result with
status="error", so result.is_done() is what marks the interaction as failed.
Call agnost.shutdown() once when the application exits, not after each request.
Shutting down per request disables telemetry for later agent runs in the same process.
Manual setup: OpenTelemetry
Browser Use 1.0 runs on Pydantic AI, and its documented tracing route is Pydantic AI’s OpenTelemetry instrumentation. Each run emits aninvoke_agent span, a chat <model> span
per model request, and an execute_tool python span for every Python cell the agent runs.
These spans use the OTel GenAI conventions, so Agnost AI ingests them as they are.
Install
Setup
gen_ai.conversation.id on every run, and Browser Use does not
let you pass your own. BaggageSpanProcessor copies the agnost.session_id and
agnost.user_id baggage onto every span started inside run_task, and Agnost AI reads
agnost.session_id before gen_ai.conversation.id. That is how runs for the same user
session land in one conversation.
instrument_all() must run before the first Agent is created. Keep the default
Browser() (Browser Use Cloud) if you use it; Browser("chromium") above runs a local browser.
What appears in Agnost AI
- Conversations grouped by
agnost.session_id. - User-level analytics grouped by
agnost.user_id. - Events for the agent run (
agent), each model request (chat), and each tool call (pythonfor the cells the agent writes, plus Pydantic AI’s output tool). - The task as input and the final answer as output on the agent event. The
pythontool events carry the code the model wrote and what the cell printed.
Verify
Run one task, then open Events in Agnost AI. Confirm the conversation shows your session ID and user ID, anagent event with the task and the final answer, and a python
tool event for each cell.
Troubleshooting
- No events: confirm
instrument_all()runs before anyAgentis created and that the exporter hasX-Agnost-Org-ID. Callprovider.shutdown()(orforce_flush()) before a short script exits. - Every run is its own conversation: the baggage was not attached around
agent.run(). Attach it before the run starts, in the same task, as shown above. - One extra
chatevent per run: that is Browser Use’s judge, which grades the run with the same model. PassAgent(..., judge=False)to turn it off. - Spans carry the task, the code the model writes, and page text it reads. Pass
InstrumentationSettings(tracer_provider=provider, include_content=False)to keep message content out of the spans. ANONYMIZED_TELEMETRYcontrols Browser Use’s own usage telemetry. It does not affect these traces.- Browser Use 0.x hooks (
on_step_start,on_step_end) and the Laminar and OpenLIT integrations are gone in 1.0. Use the Pydantic AI spans above.
References
- Browser Use observability
- Pydantic AI OpenTelemetry without Logfire
- OpenTelemetry baggage span processor
Next steps
- Conversations: review the complete Browser Use run.
- Events: inspect model requests and the Python cells the agent ran.
- Patterns: organize production conversations by what users wanted.