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

1.2 KB
Raw Blame
---
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>