# OpenAI Agents SDK
URL: /integrations/openai-agents-sdk

---
title: OpenAI Agents SDK
sidebarTitle: OpenAI Agents SDK
description: Build typed browser agents with handoffs, guardrails, and tracing.
llm: true
---

The OpenAI Agents SDK is OpenAI's official toolkit for building agents with typed tools, handoffs, guardrails, and tracing. The Steel integration runs each tool against a Steel cloud session, so you can stand up a typed browser agent that opens a session, navigates, extracts data, and returns a validated final report.

Available in TypeScript and Python.

### Requirements

*   **Steel API Key**: Active Steel subscription
*   **OpenAI API Key**: A model supported by the Agents SDK
*   **Runtime**: Node.js 20+ or Python 3.10+

### Connect Steel to the OpenAI Agents SDK

Open a Steel session inside a typed Agents SDK `tool()`:

```typescript Typescript -wc
import { tool } from "@openai/agents";
import { chromium } from "playwright";
import Steel from "steel-sdk";
import { z } from "zod";

const steel = new Steel({ steelAPIKey: STEEL_API_KEY });

const openSession = tool({
  name: "open_session",
  description: "Open a Steel cloud browser session.",
  parameters: z.object({}),
  execute: async () => {
    const session = await steel.sessions.create({});
    const browser = await chromium.connectOverCDP(
      `${session.websocketUrl}&apiKey=${STEEL_API_KEY}`,
    );
    return { sessionId: session.id, liveViewUrl: session.sessionViewerUrl };
  },
});
```

Full runnable starter: [Steel + OpenAI Agents SDK recipe →](/cookbook/openai-agents)

### FAQ

### Do I need to change my existing OpenAI Agents SDK code to use Steel?

No — Steel slots in as a typed `tool()`. The tool's `execute` opens a Steel session and connects Playwright over CDP; your agents, handoffs, guardrails, and tracing work as before.

### How do I connect the OpenAI Agents SDK to a Steel browser session?

Inside a `tool()`'s `execute`, call `steel.sessions.create()` and attach Playwright via `chromium.connectOverCDP()` using the session's `websocketUrl` with your `apiKey` appended. Subsequent tools drive that browser.

### Does the OpenAI Agents SDK work with Steel's proxies, stealth mode, and CAPTCHA solving?

Yes — pass the options when creating the session (e.g. `useProxy`, `solveCaptcha`, `stealthConfig` on `sessions.create()`). They're transparent to the SDK's tool-calling loop.

### Can I watch what the agent is doing in the browser?

Yes — the example tool returns `liveViewUrl` from `session.sessionViewerUrl`, which you can open to watch the session live alongside the agent run.

### Is the Steel integration available in both TypeScript and Python?

Yes — the Agents SDK integration works in TypeScript and Python (Node.js 20+ or Python 3.10+). The page's example is TypeScript; the cookbook recipe has the full runnable starter.


### Resources

*   [OpenAI Agents SDK documentation](https://openai.github.io/openai-agents-js/) – Agents, tools, handoffs, tracing
*   [Steel Sessions API reference](/api-reference) – Programmatic session control for Steel browsers
*   [Steel Discord](https://discord.gg/steel-dev) – Get help and share what you build
