Skip to main content

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_data or last assistant message’s provider_data when 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) and arun() (async) are instrumented
  • Agno identity — run_id, session_id, agent_name forwarded as properties

Configuration

When 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:
When debug=True, the raindrop_agno logger is set to DEBUG level, which outputs detailed information about telemetry extraction and any issues encountered.

Projects

Route events to a specific project by passing its slug as project_id:
project_id sets the X-Raindrop-Project-Id header on every event. Omit it (or pass "default") to use your org’s default Production project, which is the existing behavior. The same option is accepted by the create_raindrop_agno(...) factory. Invalid slugs are ignored with a warning and no header is sent.

Multiple projects in one process

Available in raindrop-ai>=0.0.56. When one service runs several Agno agents that should report to different projects, create one RaindropAgno wrapper per project. Each wrapper owns its own raindrop.Raindrop client, so the two route independently — there is no shared module-level state:
Each wrapper owns its configuration and delivery pipeline, so agents handled by different wrappers route independently. To share a single client across wrappers (or with the module-level API), construct a raindrop.Raindrop yourself and pass it via client=:

Wrapping Agents

Use raindrop.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:
The number of tool calls is also included in event properties as 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 same wrap() 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:
PropertyDescription
ai.usage.prompt_tokensInput token count
ai.usage.completion_tokensOutput token count
ai.usage.cached_tokensCached (cache-read) token count (provider-dependent)
ai.modelModel name
agno.finish_reasonModel finish/stop reason (e.g. "stop", "length")
agno.run_idAgno run identifier
agno.session_idAgno session identifier
agno.agent_idAgno agent identifier
agno.agent_nameAgent name
agno.workflow_idWorkflow identifier (if applicable)
agno.tool_calls_countNumber of tool calls in the run

Flushing and Shutdown

Always call shutdown() 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 when tracing_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.
The RaindropAgno class also provides identify() and track_signal() methods: