OpenAI Agents SDK
AgentOps and OpenAI Agents SDK integration for powerful multi-agent workflow monitoring.
OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows. The SDK provides a comprehensive set of tools for creating, managing, and monitoring agent-based applications. AgentOps seamlessly integrates to provide observability into these workflows.
Core Concepts
- Agents: LLMs configured with instructions, tools, guardrails, and handoffs
- Handoffs: Allow agents to transfer control to other agents for specific tasks
- Guardrails: Configurable safety checks for input and output validation
- Tracing: Built-in tracking of agent runs, allowing you to view, debug and optimize your workflows
Installation
Install AgentOps, the OpenAI Agents SDK, and python-dotenv
for managing API keys:
Setting Up API Keys
Before using the OpenAI Agents SDK with AgentOps, you need to set up your API keys:
- OPENAI_API_KEY: From the OpenAI Platform
- AGENTOPS_API_KEY: From your AgentOps Dashboard
You can set these as environment variables or in a .env
file.
Then load them in your Python code:
Usage
AgentOps will automatically instrument the OpenAI Agents SDK after being initialized. You can then create agents, run them, and track their interactions.