Integrations
AG2
Track and analyze your AG2 agents with AgentOps
Installation
Setting Up API Keys
Before using AG2 with AgentOps, you need to set up your API keys. You can obtain:
- OPENAI_API_KEY: From the OpenAI Platform
- AGENTOPS_API_KEY: From your AgentOps Dashboard
Then to set them up, you can either export them as environment variables or set them in a .env
file.
Then load the environment variables in your Python code:
Usage
Initialize AgentOps at the beginning of your application to automatically track all AG2 agent interactions: