Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

Add separate docs for OpenAI Agents SDKs (#1080)

Alex Reibman7e961e98411e
diff --git a/README.md b/README.md
index 30d26938..5bd2dab2 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ AgentOps helps developers build, evaluate, and monitor AI agents. From prototype
<div align="center" style="background-color: white; padding: 20px; border-radius: 10px; margin: 0 auto; max-width: 800px;">
<div style="display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; margin-bottom: 20px;">
- <a href="https://docs.agentops.ai/v1/integrations/openai-agents"><img src="docs/images/external/openai/agents-sdk.svg" height="45" alt="OpenAI Agents SDK"></a>
+ <a href="https://docs.agentops.ai/v2/integrations/openai_agents_python"><img src="docs/images/external/openai/agents-sdk.svg" height="45" alt="OpenAI Agents SDK"></a>
<a href="https://docs.agentops.ai/v1/integrations/crewai"><img src="docs/v1/img/docs-icons/crew-banner.png" height="45" alt="CrewAI"></a>
<a href="https://docs.ag2.ai/docs/ecosystem/agentops"><img src="docs/images/external/ag2/ag2-logo.svg" height="45" alt="AG2 (AutoGen)"></a>
<a href="https://docs.agentops.ai/v1/integrations/microsoft"><img src="docs/images/external/microsoft/microsoft_logo.svg" height="45" alt="Microsoft"></a>
@@ -216,14 +216,25 @@ All decorators support:
### OpenAI Agents SDK 🖇️
-Build multi-agent systems with tools, handoffs, and guardrails. AgentOps natively integrates with OpenAI Agents.
+Build multi-agent systems with tools, handoffs, and guardrails. AgentOps natively integrates with the OpenAI Agents SDKs for both Python and TypeScript.
+
+#### Python
```bash
pip install openai-agents
```
-- [AgentOps integration example](https://docs.agentops.ai/v1/integrations/agents_sdk)
-- [Official OpenAI Agents SDK documentation](https://openai.github.io/openai-agents-python/)
+- [Python integration guide](https://docs.agentops.ai/v2/integrations/openai_agents_python)
+- [OpenAI Agents Python documentation](https://openai.github.io/openai-agents-python/)
+
+#### TypeScript
+
+```bash
+npm install agentops @openai/agents
+```
+
+- [TypeScript integration guide](https://docs.agentops.ai/v2/integrations/openai_agents_js)
+- [OpenAI Agents JS documentation](https://openai.github.io/openai-agents-js)
### CrewAI 🛶
diff --git a/docs/mint.json b/docs/mint.json
index 2e80ea8c..c6639f70 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -180,7 +180,8 @@
"v2/integrations/litellm",
"v2/integrations/mem0",
"v2/integrations/openai",
- "v2/integrations/agents_sdk",
+ "v2/integrations/openai_agents_python",
+ "v2/integrations/openai_agents_js",
"v2/integrations/smolagents",
"v2/integrations/ibm_watsonx_ai",
"v2/integrations/xai"
diff --git a/docs/v2/integrations/openai_agents_js.mdx b/docs/v2/integrations/openai_agents_js.mdx
new file mode 100644
index 00000000..9af08933
--- /dev/null
+++ b/docs/v2/integrations/openai_agents_js.mdx
@@ -0,0 +1,38 @@
+---
+title: OpenAI Agents JS
+description: 'AgentOps integration with the OpenAI Agents SDK for TypeScript/JavaScript.'
+---
+
+[OpenAI Agents JS](https://github.com/openai/openai-agents-js) is a lightweight yet powerful SDK for building multi-agent workflows in TypeScript. AgentOps seamlessly integrates to provide observability into these workflows.
+
+- [OpenAI Agents JS documentation](https://openai.github.io/openai-agents-js)
+- [Python guide](/v2/integrations/openai_agents_python)
+
+## Installation
+
+```bash
+npm install agentops @openai/agents
+```
+
+## Usage
+
+```typescript
+import { agentops } from 'agentops';
+import { Agent, run } from '@openai/agents';
+
+await agentops.init();
+
+const agent = new Agent({
+ name: 'Assistant',
+ instructions: 'You are a helpful assistant.'
+});
+
+const result = await run(agent, 'Hello, world!');
+console.log(result.finalOutput);
+```
+
+<script type="module" src="/scripts/github_stars.js"></script>
+<script type="module" src="/scripts/scroll-img-fadein-animation.js"></script>
+<script type="module" src="/scripts/button_heartbeat_animation.js"></script>
+<script type="css" src="/styles/styles.css"></script>
+<script type="module" src="/scripts/adjust_api_dynamically.js"></script>
diff --git a/docs/v2/integrations/agents_sdk.mdx b/docs/v2/integrations/openai_agents_python.mdx
similarity index 91%
rename from docs/v2/integrations/agents_sdk.mdx
rename to docs/v2/integrations/openai_agents_python.mdx
index ed3101ad..ce0db8eb 100644
--- a/docs/v2/integrations/agents_sdk.mdx
+++ b/docs/v2/integrations/openai_agents_python.mdx
@@ -3,7 +3,10 @@ title: OpenAI Agents SDK
description: 'AgentOps and OpenAI Agents SDK integration for powerful multi-agent workflow monitoring.'
---
-[OpenAI Agents SDK](https://github.com/openai/agentsdk_prototype) 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.
+[OpenAI Agents Python](https://github.com/openai/openai-agents-python) is a lightweight yet powerful SDK for building multi-agent workflows in Python. AgentOps seamlessly integrates to provide observability into these workflows.
+
+- [OpenAI Agents Python documentation](https://openai.github.io/openai-agents-python/)
+- [TypeScript guide](/v2/integrations/openai_agents_js)
## Core Concepts
@@ -12,7 +15,9 @@ description: 'AgentOps and OpenAI Agents SDK integration for powerful multi-agen
- **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
+## Python
+
+### Installation
Install AgentOps, the OpenAI Agents SDK, and `python-dotenv` for managing API keys:
<CodeGroup>
@@ -27,7 +32,7 @@ Install AgentOps, the OpenAI Agents SDK, and `python-dotenv` for managing API ke
```
</CodeGroup>
-## Setting Up 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](https://platform.openai.com/api-keys)
@@ -57,7 +62,7 @@ AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY")
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
```
-## Usage
+### Usage
AgentOps will automatically instrument the OpenAI Agents SDK after being initialized. You can then create agents, run them, and track their interactions.
diff --git a/docs/v2/introduction.mdx b/docs/v2/introduction.mdx
index f697c2fe..dc2cb371 100644
--- a/docs/v2/introduction.mdx
+++ b/docs/v2/introduction.mdx
@@ -35,7 +35,8 @@ description: "AgentOps is the developer favorite platform for testing, debugging
<Card title="CrewAI" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/crewai/crewai-logo.png?raw=true" alt="CrewAI" />} iconType="image" href="/v2/integrations/crewai" />
<Card title="Google ADK" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/google-adk/google-adk-logo.png?raw=true" alt="Google ADK" />} iconType="image" href="/v2/integrations/google_adk" />
<Card title="LangChain" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/langchain/langchain-logo.svg?raw=true" alt="LangChain" />} iconType="image" href="/v2/integrations/langchain" />
- <Card title="OpenAI Agents SDK" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents SDK" />} iconType="image" href="/v2/integrations/agents_sdk" />
+ <Card title="OpenAI Agents (Python)" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents Python" />} iconType="image" href="/v2/integrations/openai_agents_python" />
+ <Card title="OpenAI Agents (TypeScript)" icon={<img src="https://www.github.com/agentops-ai/agentops/blob/main/docs/images/external/openai/openai-logomark.png?raw=true" alt="OpenAI Agents JS" />} iconType="image" href="/v2/integrations/openai_agents_js" />
<Card title="Smolagents" icon={<img src="https://github.com/AgentOps-AI/agentops/blob/main/docs/images/external/huggingface/hf-logo.png?raw=true" alt="smolagents" />} iconType="image" href="/v2/integrations/smolagents" />
</CardGroup>