Installation
Quick Start
What Gets Traced
The Agno integration automatically captures:- Agent runs — input prompt, output text, model name
- Token usage — input_tokens, output_tokens, and cached_tokens (cache_read_tokens) from the Agno RunOutput metrics
- Finish reason — extracted from
model_provider_dataor last assistant message’sprovider_datawhen available - Tool calls — nested spans with name, arguments, result, errors, and duration
- Model calls — LLM invocations as nested child spans under the agent run
- Team delegation — member agent calls appear as nested spans under the team
- Errors — captured (with error message) and re-raised to the caller
- Async support — both
run()(sync) andarun()(async) are instrumented - Agno identity — run_id, session_id, agent_name forwarded as properties
Configuration
tracing_enabled=True, the integration enables the Agno OpenInference
instrumentor (Instruments.AGNO), which automatically creates properly nested
OTEL spans for agent runs, model calls, and tool executions. This gives full
trace visibility in the Raindrop dashboard with a hierarchical span tree:
debug=True, the raindrop_agno logger is set to DEBUG level, which
outputs detailed information about telemetry extraction and any issues encountered.
Wrapping Agents
Useraindrop.wrap() to instrument an agent. The wrapped agent behaves identically
to the original — run() and arun() return the same RunOutput objects:
Tool Call Tracking
When your agent uses tools and tracing is enabled, each tool execution appears as a nested span in the trace view:agno.tool_calls_count.
Teams
For Agno Teams, wrap each member agent. The OpenInference instrumentor automatically traces team coordination, member delegation, and nested agent calls:Wrapping Workflows
The samewrap() function works with Agno Workflows:
Async Usage
The wrapper supports both sync and async agent runs:Captured Properties
Each event includes the following properties when available:| Property | Description |
|---|---|
ai.usage.prompt_tokens | Input token count |
ai.usage.completion_tokens | Output token count |
ai.usage.cached_tokens | Cached (cache-read) token count (provider-dependent) |
ai.model | Model name |
agno.finish_reason | Model finish/stop reason (e.g. "stop", "length") |
agno.run_id | Agno run identifier |
agno.session_id | Agno session identifier |
agno.agent_id | Agno agent identifier |
agno.agent_name | Agent name |
agno.workflow_id | Workflow identifier (if applicable) |
agno.tool_calls_count | Number of tool calls in the run |
Flushing and Shutdown
Always callshutdown() before your process exits to ensure all telemetry is shipped:
Known Limitations
- Streaming:
run(stream=True)does not produce events, but trace spans are still captured whentracing_enabled=True. - Multi-step agent runs: The event captures the final result. Individual LLM and tool calls appear as nested trace spans when
tracing_enabled=True.