ReleaseOpenAIOpenAIpublished Feb 23, 2026seen Jun 26

openai/openai-agents-js v0.5.0

openai/openai-agents-js

Open original ↗

Captured source

source ↗
published Feb 23, 2026seen Jun 26captured 4whttp 200method plain

v0.5.0

Repository: openai/openai-agents-js

Tag: v0.5.0

Published: 2026-02-23T23:14:57Z

Prerelease: no

Release notes:

Key Changes

WebSocket Mode for OpenAI Responses API

This version adds WebSocket mode support for OpenAI's Responses API. This is a new opt-in feature, so the default behavior is unchanged. If you want to switch all Responses API calls to WebSocket mode, call setOpenAIResponsesTransport('websocket') to enable it for all OpenAI Responses model agents.

You can also use withResponsesWebSocketSession o enable a reusable WebSocket connection, as shown below:

import { Agent, withResponsesWebSocketSession } from '@openai/agents';

const agent = new Agent({
name: 'Assistant',
instructions: 'You are a helpful assistant.',
model: 'gpt-5.2-codex',
});
await withResponsesWebSocketSession(async ({ run }) => {
const streamed = await run(agent, 'Say hello in one sentence.', {
stream: true,
});
for await (const _event of streamed.toStream()) {
// Drain the stream.
}
console.log(streamed.finalOutput);
});

References:

  • https://developers.openai.com/api/docs/guides/websocket-mode
  • https://github.com/openai/openai-agents-js/pull/1004

What's Changed

  • feat: add responses websocket transport and websocket session helper by @seratch in https://github.com/openai/openai-agents-js/pull/1004

Documents & Other Changes

  • docs: add missing changes by @seratch in https://github.com/openai/openai-agents-js/pull/1002
  • docs: update translated document pages by @github-actions[bot] in https://github.com/openai/openai-agents-js/pull/1003
  • chore: change #1004 to minor version changes by @seratch in https://github.com/openai/openai-agents-js/pull/1007
  • chore: update versions by @github-actions[bot] in https://github.com/openai/openai-agents-js/pull/1006

Full Changelog: https://github.com/openai/openai-agents-js/compare/v0.4.15...v0.5.0