AgentOps

Monitoring Agents and Swarms with AgentOps

AgentOps is Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more.

Install AgentOps

pip install agentops

Usage

In your main code

import os

from dotenv import load_dotenv
load_dotenv()

import agentops
agentops.init(<INSERT YOUR API KEY HERE>)

from swarmzero import Agent, Swarm
# ...

In your .env file

AGENTOPS_API_KEY=<YOUR API KEY>\

Track Individual Agents in Swarm

import os

from dotenv import load_dotenv

import agentops
from agentops import track_agent
from swarmzero import Agent, Swarm

load_dotenv()
agentops.init(<INSERT YOUR API KEY HERE>)

@track_agent(name="qa")
class QaAgent(Agent):
...

@track_agent(name="engineer")
class EngineerAgent(Agent):
...

View Agent/Swarm Metrics

Open https://app.agentops.ai/drilldown to view your AgentOps dashboard

An example can be found here.

Last updated

Was this helpful?