Agno is a modern AI agent framework for building intelligent agents, teams, and workflows. AgentOps provides automatic instrumentation to track all Agno operations including agent interactions, team coordination, tool usage, and workflow execution.

Installation

Install AgentOps and Agno:

pip install agentops agno 

Setting Up API Keys

You’ll need API keys for AgentOps and your chosen LLM provider:

Set these as environment variables or in a .env file.

export AGENTOPS_API_KEY="your_agentops_api_key_here"
export OPENAI_API_KEY="your_openai_api_key_here"
export ANTHROPIC_API_KEY="your_anthropic_api_key_here"  # Optional

Quick Start

import os
from dotenv import load_dotenv

# Load environment variables
load_dotenv()


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

# Initialize AgentOps
import agentops
agentops.init(api_key=os.getenv("AGENTOPS_API_KEY"))

# Create and run an agent
agent = Agent(
    name="Assistant",
    role="Helpful AI assistant",
    model=OpenAIChat(id="gpt-4o-mini")
)

response = agent.run("What are the key benefits of AI agents?")
print(response.content)

AgentOps Integration

Basic Agent Tracking

AgentOps automatically instruments Agno agents and teams:

import agentops
from agno.agent import Agent
from agno.team import Team
from agno.models.openai import OpenAIChat

# Initialize AgentOps - this enables automatic tracking
agentops.init(api_key=os.getenv("AGENTOPS_API_KEY"))

# Create agents - automatically tracked by AgentOps
agent = Agent(
    name="Assistant",
    role="Helpful AI assistant",
    model=OpenAIChat(id="gpt-4o-mini")
)

# Create teams - coordination automatically tracked
team = Team(
    name="Research Team", 
    mode="coordinate", 
    members=[agent]
)

# All operations are automatically logged to AgentOps
response = team.run("Analyze the current AI market trends")
print(response.content)

What Gets Tracked

AgentOps automatically captures:

  • Agent Interactions: All agent inputs, outputs, and configurations
  • Team Coordination: Multi-agent collaboration patterns and results
  • Tool Executions: Function calls, parameters, and return values
  • Workflow Steps: Session states, caching, and performance metrics
  • Token Usage: Costs and resource consumption across all operations
  • Timing Metrics: Response times and concurrent operation performance
  • Error Tracking: Failures and debugging information

Dashboard and Monitoring

Once your Agno agents are running with AgentOps, you can monitor them in the AgentOps Dashboard:

  • Real-time Monitoring: Live agent status and performance
  • Execution Traces: Detailed logs of agent interactions
  • Performance Analytics: Token usage, costs, and timing metrics
  • Team Collaboration: Visual representation of multi-agent workflows
  • Error Tracking: Comprehensive error logs and debugging information

Examples