Integrating Agno with Traceloop
Traceloop provides an LLM observability platform built on OpenLLMetry, an open-source OpenTelemetry extension. By integrating Agno with Traceloop, you can automatically trace agent execution, team workflows, tool calls, and token usage metrics.Prerequisites
-
Install Dependencies
Ensure you have the necessary packages installed:
-
Setup Traceloop Account
- Sign up for an account at Traceloop.
- Obtain your API key from Settings > API Keys.
-
Set Environment Variables
Configure your environment with the Traceloop API key:
Sending Traces to Traceloop
-
Example: Basic Agent Instrumentation
-
Example: Development Mode (Disable Batching)
-
Example: Multi-Agent Team Tracing
-
Example: Using Workflow Decorators
@workflow decorator to create custom spans for organizing your traces:
-
Example: Async Agent with Tools
Notes
- Initialization: Call
Traceloop.init()before creating any agents to ensure proper instrumentation. - Development Mode: Use
disable_batch=Trueduring development for immediate trace visibility. - Async Support: Both sync (
run()) and async (arun()) methods are fully instrumented. - Privacy Control: Set
TRACELOOP_TRACE_CONTENT=falseto disable logging of prompts and completions.