Skip to main content

Raindrop integration for Agno

Project description

raindrop-agno

Raindrop integration for Agno — a Python agent framework for building AI applications.

Wraps Agno Agent, Team, and Workflow objects to automatically capture runs and ship telemetry to Raindrop. When tracing is enabled, the Agno OpenInference instrumentor provides properly nested spans (agent -> model -> tool calls).

Installation

pip install raindrop-agno agno

Quick Start

from raindrop_agno import create_raindrop_agno
from agno.agent import Agent
from agno.models.openai import OpenAIChat

raindrop = create_raindrop_agno(
    api_key="rk_...",
    user_id="user-123",
    tracing_enabled=True,
)

agent = Agent(model=OpenAIChat(id="gpt-4o"))
wrapped = raindrop["wrap"](agent)

result = wrapped.run("What is the capital of France?")
print(result.content)

raindrop["shutdown"]()

What Gets Traced

  • Agent runs — input prompt, output text, model name
  • Token usage — input_tokens and output_tokens from the Agno RunOutput metrics
  • Tool calls — nested spans with name, arguments, result, errors, duration (requires tracing_enabled=True)
  • Model calls — LLM invocations as nested child spans (requires tracing_enabled=True)
  • Team delegation — member agent calls appear as nested spans under the team run
  • 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

raindrop = create_raindrop_agno(
    api_key="rk_...",           # Required: your Raindrop API key
    user_id="user-123",        # Optional: associate events with a user
    convo_id="convo-456",      # Optional: conversation/thread ID
    tracing_enabled=True,      # Recommended: enables nested trace spans
)

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.

Tool Call Tracking

When your agent uses tools and tracing is enabled, each tool execution appears as a nested span in the trace view with input arguments, output, and duration:

def get_stock_price(symbol: str) -> str:
    return "189.50"

agent = Agent(
    model=OpenAIChat(id="gpt-4o-mini"),
    tools=[get_stock_price],
)
wrapped = raindrop["wrap"](agent)
result = wrapped.run("What is the price of AAPL?")

Tool call count is also captured in event properties as agno.tool_calls_count.

Wrapping Agents and Workflows

The wrap() function works with Agno Agents and Workflows. For Teams, wrap each member agent individually:

from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(model=OpenAIChat(id="gpt-4o"))
wrapped_agent = raindrop["wrap"](agent)

Flushing and Shutdown

Always call shutdown() before your process exits to ensure all telemetry is shipped:

raindrop["shutdown"]()  # flush + release resources

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.

For identify(), track_signal(), and other SDK functions, use import raindrop.analytics as raindrop directly alongside the wrapper.

Testing

cd packages/agno-python
pip install -e .
pip install pytest
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raindrop_agno-0.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raindrop_agno-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file raindrop_agno-0.0.1.tar.gz.

File metadata

  • Download URL: raindrop_agno-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for raindrop_agno-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dc937e833d718e2fec7baa1b78feb971a35e832ca1f07a3eec819f459c78007a
MD5 432aad1705ed4cf6df68742d649cdabb
BLAKE2b-256 ea9a8f63ffcad6d5d1efef99e623670ec7e6cb17bfb31c2d11b4f86c717a8a6f

See more details on using hashes here.

File details

Details for the file raindrop_agno-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: raindrop_agno-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for raindrop_agno-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37d691959eb2728bd7bf241a33cece9cd41519e247f987d66b789cd5814e4745
MD5 9969de680c96978bbb4c51667f1057b1
BLAKE2b-256 fde67908d664dc8ec563589af1ee92b8870b03cfddc6a1565ff6f18b4601d0a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page