Skip to main content
Valiqor automatically traces Agno Agent.arun() calls, capturing the full agent lifecycle including model interactions, tool executions, and MCP tool schemas.
Agno tracing requires the agno package to be installed separately. There is no valiqor[agno] extra — install agno directly alongside valiqor.

Install

pip install valiqor agno

Add a single import at the top of your app — all Agno agent runs are automatically traced:
import valiqor.auto  # ← Add this line

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

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    description="You are a helpful research assistant",
    instructions=["Be concise", "Cite sources"]
)

# Async agent run — automatically traced
import asyncio
response = asyncio.run(agent.arun("What are the latest AI trends?"))
print(response.content)

Selective Instrumentation

If you only want Agno tracing:
from valiqor.trace import agno_autolog

agno_autolog()

Tool Call Tracing

When your Agno agent uses tools, each tool execution is captured as a child span with full details:
import valiqor.auto
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    tools=[DuckDuckGoTools()],
    description="You are a research assistant with web search"
)

import asyncio
response = asyncio.run(agent.arun("Search for recent news about AI safety"))
Each tool call span captures:
FieldDescription
tool_nameName of the tool
call_idUnique tool call identifier
argumentsRaw and parsed arguments
resultTool output content
errorError info (if failed)
descriptionTool description
execution_metricsPerformance data

MCP Tool Support

Agno’s MCP (Model Context Protocol) tool integration is automatically detected. When your agent uses MCP tools, Valiqor captures the MCP server metadata and tool schemas:
import valiqor.auto
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.mcp import MCPTools

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    tools=[MCPTools(server_name="my-server", transport="sse", url="http://localhost:8080")]
)
MCP-specific data captured includes server name, transport type, URL, and tool parameter schemas.

What Gets Captured

Each traced Agno agent call records:
FieldDescription
modelModel name from agent instance
messageUser input message
responseAgent response content
prompt_tokensInput token count
completion_tokensOutput token count
total_tokensCombined token count
costEstimated cost in USD
tool_callsFull tool call details (see above)
mcp_toolsMCP server info and tool schemas (if any)
duration_msTotal agent run latency
statusSuccess or error

With Workflows

Group multiple agent interactions into a single trace:
import valiqor.auto
from valiqor.trace import trace_workflow
from agno.agent import Agent
from agno.models.openai import OpenAIChat

researcher = Agent(model=OpenAIChat(id="gpt-4o"), description="Research agent")
writer = Agent(model=OpenAIChat(id="gpt-4o"), description="Writing agent")

async def main():
    with trace_workflow("research-and-write"):
        # Step 1: Research
        research = await researcher.arun("Find key facts about quantum computing")

        # Step 2: Write article
        article = await writer.arun(f"Write an article based on: {research.content}")

import asyncio
asyncio.run(main())
Both agent calls appear as child spans under the research-and-write trace.

Disabling

from valiqor.trace import disable_autolog

disable_autolog("agno")    # Disable Agno only
disable_autolog()          # Disable all providers

Limitations

  • Async only — only Agent.arun() (async) is traced. Synchronous Agent.run() is not instrumented. Use asyncio.run() for sync entry points.
  • Streaming is not instrumented.
  • Team orchestration — multi-agent team runs are traced at the individual agent level, not at the team coordination level.

Next Steps