{"library":"opentelemetry-instrumentation-agno","title":"OpenTelemetry Agno Instrumentation","description":"This library provides OpenTelemetry auto-instrumentation for Agno agents, enabling detailed tracing of AI applications. It's part of the OpenInference project, ensuring compatibility with OpenTelemetry collectors and observability backends like Arize Phoenix and Langfuse. Currently at version 0.58.0, it follows a rapid release cadence, with multiple minor and patch releases occurring monthly to incorporate new features and align with evolving OpenTelemetry semantic conventions.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install opentelemetry-instrumentation-agno agno opentelemetry-sdk opentelemetry-exporter-otlp-proto-http"],"cli":null},"imports":["from openinference.instrumentation.agno import AgnoInstrumentor"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom opentelemetry import trace\nfrom opentelemetry.sdk.resources import Resource\nfrom opentelemetry.sdk.trace import TracerProvider\nfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor\nfrom opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter\n\nfrom openinference.instrumentation.agno import AgnoInstrumentor\n\n# Agno related imports for the example\nfrom agno.agent import Agent\nfrom agno.models.openai import OpenAIChat\nfrom agno.tools.duckduckgo import DuckDuckGoTools\n\n# Configure OpenTelemetry TracerProvider\nresource = Resource.create({\"service.name\": \"agno-agent-app\"})\nprovider = TracerProvider(resource=resource)\n\n# Export spans to an OTLP collector (e.g., SigNoz, Jaeger, Arize Phoenix)\n# Replace with your actual OTLP endpoint if not using default localhost\notlp_endpoint = os.environ.get(\"OTEL_EXPORTER_OTLP_ENDPOINT\", \"http://localhost:4318/v1/traces\")\nspan_processor = SimpleSpanProcessor(OTLPSpanExporter(endpoint=otlp_endpoint))\nprovider.add_span_processor(span_processor)\n\n# Set the global TracerProvider\ntrace.set_tracer_provider(provider)\n\n# Initialize Agno instrumentation\nAgnoInstrumentor().instrument()\n\n# Example Agno Agent application\nprint(\"Agno Agent started...\")\nagent = Agent(\n    model=OpenAIChat(id=os.environ.get(\"OPENAI_MODEL_ID\", \"gpt-4o-mini\")),\n    tools=[DuckDuckGoTools()],\n    markdown=True,\n    debug_mode=True,\n)\n\nresponse = agent.print_response(\"What is the current weather in London?\")\nprint(f\"Agent Response: {response}\")\n\nprint(\"Agno Agent finished. Check your OTLP collector for traces.\")\n\n# In a real application, you might want to ensure all spans are exported\n# before the application exits. For this simple example, we rely on\n# the SimpleSpanProcessor flushing on shutdown. For production, consider BatchSpanProcessor.\nprovider.shutdown()\n","lang":"python","description":"This quickstart demonstrates how to set up OpenTelemetry to automatically instrument an Agno agent application. It configures a `TracerProvider` with an `OTLPSpanExporter` to send traces to an OpenTelemetry collector and then initializes the `AgnoInstrumentor` before running a simple Agno agent. Ensure your OpenTelemetry collector is running and accessible at the configured OTLP endpoint.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"0.50.1","pypi_latest":"0.60.0","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":10.2,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"89.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":10.9,"import_time_s":null,"mem_mb":null,"disk_size":"90M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"102.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":9.9,"import_time_s":null,"mem_mb":null,"disk_size":"103M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"91.7M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":9.1,"import_time_s":null,"mem_mb":null,"disk_size":"92M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"91.6M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":8.7,"import_time_s":null,"mem_mb":null,"disk_size":"92M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"88.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"opentelemetry-instrumentation-agno","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":12.5,"import_time_s":null,"mem_mb":null,"disk_size":"89M"}]}}