is Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more.
Install AgentOps
pip install agentops
poetry add 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):
...