> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentops.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenAI Agents JS

> 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 theme={null}
npm install agentops @openai/agents
```

## Usage

```typescript theme={null}
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 type="module" src="/scripts/scroll-img-fadein-animation.js" />

<script type="module" src="/scripts/button_heartbeat_animation.js" />

<script type="css" src="/styles/styles.css" />

<script type="module" src="/scripts/adjust_api_dynamically.js" />
