import agentops from agno.agent import Agent from agno.models.openai import OpenAIChat # Initialize AgentOps agentops.init() # Create and run an agent agent = Agent(model=OpenAIChat(id="gpt-5-mini")) response = agent.run("Share a 2 sentence horror story") # Print the response print(response.content)
Create a virtual environment
Terminal
python3 -m venv .venv source .venv/bin/activate
Set your API key
export AGENTOPS_API_KEY=xxx
Install libraries
pip install -U agno agentops openai
Run Agent
python cookbook/integrations/observability/agent_ops.py