maple-agent-tracing-agno
Installation
SKILL.md
Maple agent tracing for Agno
Goal: every conversation with the Agno app shows up in Maple Agent Sessions as exactly one session, one turn per run(), with transcript, model calls, tool calls (failures marked), team-member lanes, tokens and cost where the provider returns it.
Mechanism: openinference-instrumentation-agno + OTel SDK + OTLP/HTTP exporter to Maple. Agno's setup_tracing(db=...) and AgentOS(tracing=True) only write to the AgentOS database; they never export OTLP.
Step 0: Detect versions and existing setup
- Find the Python project file (
pyproject.toml,requirements*.txt,uv.lock,poetry.lock) and the installedagnoversion. Targetagno>=3.0(verified 3.0.11). On Agno 2.x,openinference-instrumentation-agnoneedsagno>=2.5.0; the rest of this skill applies unchanged. - Grep for existing tracing:
TracerProvider(,set_tracer_provider,AgnoInstrumentor,setup_tracing(,tracing=True,phoenix.otel.register,openlit.init,logfire.configure,langfuse,OpenAIInstrumentor,LiteLLMInstrumentor.- Existing
TracerProviderof the app's own: reuse it. Add aBatchSpanProcessor(OTLPSpanExporter(...))for Maple to it. Do not create a second provider. - Existing
AgnoInstrumentor().instrument(...): edit that call (addconfig=); never callinstrument()a second time (the second call is a silent no-op). AgentOS(tracing=True)orsetup_tracing(db=...): see Step 2c.- Any other LLM instrumentor on the same calls (OpenAI/LiteLLM OpenInference instrumentors, OpenLIT,
register(auto_instrument=True)): remove it or scope it away from Agno, or every model call is recorded twice.
- Existing
- Find every place an
Agent,TeamorWorkflowis run:.run(,.arun(,.print_response(,.aprint_response(,.continue_run(,.acontinue_run(. Note where the conversation/thread id lives in the request.