Agent Monitoring and Debugging with AgentOps - AG2

Agentops

AgentOps provides session replays, metrics, and monitoring for AI agents.

At a high level, AgentOps gives you the ability to monitor LLM calls, costs, latency, agent failures, multi-agent interactions, tool usage, session-wide statistics, and more. For more info, check out the AgentOps Repo.

๐Ÿ“Š Replay Analytics and Debugging Step-by-step agent execution graphs
๐Ÿ’ธ LLM Cost Management Track spend with LLM foundation model providers
๐Ÿงช Agent Benchmarking Test your agents against 1,000+ evals
๐Ÿ” Compliance and Security Detect common prompt injection and data exfiltration exploits
๐Ÿค Framework Integrations Native Integrations with CrewAI, AG2, & LangChain

Installation

AgentOps works seamlessly with applications built using AG2.

  1. Install AgentOps
   pip install agentops
  1. Create an API Key: Create a user API key here: Create API Key

  2. Configure Your Environment: Add your API key to your environment variables

   AGENTOPS_API_KEY=<YOUR_AGENTOPS_API_KEY>
  1. Initialize AgentOps

To start tracking all available data on AG2 runs, simply add two lines of code before using AG2.

   import agentops
   agentops.init() # Or: agentops.init(api_key="your-api-key-here")

After initializing AgentOps, AG2 will now start automatically tracking your agent runs.

Features

AG2 + AgentOps examples