Skip to main content

Installation

pip install -e ./sdk/tracectrl
pip install -e ./sdk/tracectrl-instrumentation-agno

Usage

import tracectrl
tracectrl.configure(service_name="my-agno-agent")

from tracectrl.instrumentation.agno import AgnoInstrumentor
AgnoInstrumentor().instrument()

# Your Agno code
from agno.agent import Agent

agent = Agent(model="gpt-4o", tools=[...])
agent.run("Analyze this document")

What Gets Captured

Agno provides rich agent metadata out of the box. TraceCtrl maps Agno-specific attributes:
Agno AttributeTraceCtrl AttributePurpose
agno.agent.idtracectrl.agent.idAgent identity
agent.nametracectrl.agent.nameHuman-readable name
agno.team.idtracectrl.agent.id (fallback)Team-level identity
session.idtracectrl.session_id (fallback)Agno session correlation
The TraceCtrlSpanProcessor automatically derives tracectrl.agent.id from Agno’s native attributes when they’re present.

API

AgnoInstrumentor()

instrument
method
instrument(tracer_provider=None, skip_dep_check=False) — Registers the TraceCtrl span processor and wraps the OpenInference Agno instrumentor.
uninstrument
method
uninstrument() — Shuts down processors and unwraps the instrumentor.