Skip to content

OpenAI Agents SDK (TypeScript)

Production-ready TypeScript SDK with the same minimal primitives as the Python version, plus first-class browser support, HITL approval flows, and Express streaming.

Install

Terminal window
npm install @openai/agents

Version

v0.11.6 · May 2026 · Node 18+

Best for

Full-stack agents, HITL-approved workflows, browser-side tools.

  • v0.11.6 (May 2026) — Patch; stability and dependency updates. 163 exports confirmed (@openai/agents@0.11.6, /tmp/npm-check-0529); all key symbols (Agent, Runner, run, handoff, tool, shellTool, toolSearchTool, applyPatchTool, applyDiff, retryPolicies, MemorySession, OpenAIConversationsSession, OpenAIResponsesCompactionSession) confirmed present.
  • v0.11.5 (May 2026) — Patch; stability and dependency updates. 161 exports confirmed; all key symbols (Agent, Runner, run, handoff, tool, shellTool, toolSearchTool, applyPatchTool, applyDiff, retryPolicies, MemorySession, OpenAIConversationsSession, OpenAIResponsesCompactionSession, MCPServerStreamableHttp, RuntimeEventEmitter, applySessionHistoryMutations) confirmed present in @openai/agents@0.11.5 (.routine-envs/check-0523-node).
  • v0.11.4 (May 12) — Patch; stability improvements. All key symbols (Agent, Runner, run, handoff, tool, shellTool, toolSearchTool, applyPatchTool, applyDiff, retryPolicies, MemorySession, OpenAIConversationsSession, OpenAIResponsesCompactionSession, MCPServerStreamableHttp, RuntimeEventEmitter, applySessionHistoryMutations) confirmed present in @openai/agents@0.11.4 (.routine-envs/check-0512-node).
  • v0.11.3 (May 11) — Patch; stability improvements.
  • v0.11.2 (May 10) — Patch; stability improvements.
  • v0.11.1 (May 9) — Patch; stability improvements.
  • v0.11.0 (May 7) — New helpers: shellTool (sandboxed shell command execution), toolSearchTool (dynamic tool discovery), applyPatchTool (code-patch application), applyDiff (diff application utility). retryPolicies collection for configurable retry strategies. MemorySession and OpenAIConversationsSession for structured session management. MCPServerStreamableHttp added to MCP server options. All confirmed in @openai/agents@0.11.1 (.routine-envs/check-0509-node).
  • v0.9.0–v0.10.5 (May 3–6) — Minor releases; OpenAIConversationsSession, OpenAIResponsesCompactionSession, RuntimeEventEmitter, applySessionHistoryMutations; performance improvements.
  • v0.8.5 (April 2026) — HITL approval flows; browser bundle improvements; Zod v4.
import { Agent, run } from '@openai/agents';
const agent = new Agent({
name: 'Assistant',
instructions: 'You are a helpful assistant.',
});
const result = await run(agent, 'What is 2 + 2?');
console.log(result.finalOutput);

Ready? Start Zero → Hero Step 1 →


DateVersionChangesReviewer
2026-05-290.11.6Patch release bump 0.11.5 → 0.11.6; “What’s new” heading updated to v0.11.6; v0.11.6 bullet added; comprehensive guide header updated; revision history entry added. Key symbols (Agent, Runner, run, handoff, tool) confirmed in @openai/agents@0.11.6 (/tmp/npm-check-0529); 163 total exports confirmed.Claude routine
2026-05-230.11.5Patch release bump 0.11.4 → 0.11.5; “What’s new” heading updated to v0.11.5; v0.11.5 bullet added; comprehensive guide header updated; revision history entry added. Key symbols (Agent, Runner, run, handoff, tool) confirmed in installed @openai/agents@0.11.5 (.routine-envs/check-0523-node); 161 total exports confirmed.Claude routine
2026-05-120.11.4Version bumped 0.11.3 → 0.11.4; “What’s new” section updated; comprehensive guide header updated; revision history entry added. All key symbols (Agent, Runner, run, handoff, tool, shellTool, toolSearchTool, applyPatchTool, applyDiff, retryPolicies, MemorySession, OpenAIConversationsSession, OpenAIResponsesCompactionSession, MCPServerStreamableHttp, RuntimeEventEmitter, applySessionHistoryMutations) confirmed in installed @openai/agents@0.11.4 (.routine-envs/check-0512-node).Claude routine
2026-05-110.11.3Version bumped 0.11.1 → 0.11.3 (two patch releases: 0.11.2, 0.11.3); “What’s new” section updated; comprehensive guide header updated; revision history entry added. All key symbols confirmed in installed @openai/agents@0.11.3 (.routine-envs/check-0511-node).Claude routine
2026-05-090.11.1Version bumped 0.8.5 → 0.11.1 (multiple minor and patch releases); “What’s new” updated; comprehensive guide header updated. New symbols confirmed in installed @openai/agents@0.11.1 (.routine-envs/check-0509-node): shellTool, toolSearchTool, applyPatchTool, applyDiff, retryPolicies, MemorySession, OpenAIConversationsSession, OpenAIResponsesCompactionSession, RuntimeEventEmitter, applySessionHistoryMutations, MCPServerStreamableHttp. Revision history entry added.Claude routine
2026-04-210.8.5Banner bumped to installed version 0.8.5.
April 9, 20260.8.3HITL approval flows; browser bundle improvements; Zod v4.
November 20250.3.2Initial TypeScript guide; Swarm migration; MCP.

Note: Python implementation lives at OpenAI Agents SDK (Python).