Skip to content

Releases: openai/openai-agents-python

v0.10.1

24 Feb 01:48
4581307

Choose a tag to compare

What's Changed

  • fix: sync realtime model literals in realtime config by @seratch in #2535

Documents & Other Changes

  • docs: add responses websocket support by @seratch in #2533
  • docs: update translated document pages by @github-actions[bot] in #2534
  • Release 0.10.1 by @github-actions[bot] in #2536

Full Changelog: v0.10.0...v0.10.1

v0.10.0

23 Feb 23:19
e550663

Choose a tag to compare

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 set_default_openai_responses_transport("websocket") to enable it for all OpenAI Responses model agents.

You can also use either OpenAIProvider along with use_responses_websocket=True or responses_websocket_session() utility to enable a reusable WebSocket connection, as shown below:

import asyncio
from agents import Agent, responses_websocket_session

async def main():
    agent = Agent(name="Assistant", instructions="Be concise.")
    async with responses_websocket_session() as ws:
        first = ws.run_streamed(agent, "Say hello in one short sentence.")
        async for _event in first.stream_events():
            pass

        second = ws.run_streamed(
            agent,
            "Now say goodbye.",
            previous_response_id=first.last_response_id,
        )
        async for _event in second.stream_events():
            pass

asyncio.run(main())

References:

What's Changed

  • feat: add Responses websocket model and stream_ws example by @seratch in #2530
  • fix: drop usage token detail fields from OpenAI trace ingest payloads by @seratch in #2529

Documents & Other Changes

  • docs: add missing changes by @seratch in #2526
  • docs: update translated document pages by @github-actions[bot] in #2527
  • Release 0.10.0 by @github-actions[bot] in #2532

Full Changelog: v0.9.3...v0.10.0

v0.9.3

20 Feb 22:55
2fee7ed

Choose a tag to compare

What's Changed

  • fix: strip #2518 total_tokens from OpenAI tracing usage payloads by @seratch in #2521
  • Release 0.9.3 by @github-actions[bot] in #2522

Full Changelog: v0.9.2...v0.9.3

v0.9.2

19 Feb 05:15
f2f0b8c

Choose a tag to compare

Key Changes

reasoning_item_id_policy: omit for reasoning models

To mitigate 400 errors caused by an inconsistent set of items when using reasoning models, this release introduces the reasoning_item_id_policy: 'omit' option to RunConfig. This is a new, opt-in option, so the default behavior is unchanged.

run_config = RunConfig(reasoning_item_id_policy="omit")
result = await Runner.run(
    agent,
    "Tell me about recursion in programming.",
    run_config=run_config,
)

What's Changed

  • feat: persist reasoning item ID policy across resumes and streamed follow-up turns by @seratch in #2512
  • fix: filter reasoning items from nested handoff input by @seratch in #2508
  • fix(voice): keep trace active until pipeline processing completes by @OiPunk in #2472

Documents & Other Changes

  • docs: update configuration details by @seratch in #2507
  • docs: update translated document pages by @github-actions[bot] in #2509
  • Release 0.9.2 by @github-actions[bot] in #2510

Full Changelog: v0.9.1...v0.9.2

v0.9.1

17 Feb 05:36
35aaaf6

Choose a tag to compare

What's Changed

  • fix: materialize iterable input history in ItemHelpers.input_to_new_input_list by @seratch in #2496
  • fix: emit tracing function spans for shell/apply_patch/computer runtime tools by @seratch in #2498
  • fix: #2489 lazily initialize tracing globals to avoid import-time fork hazards by @seratch in #2499
  • fix: #2487 persist nested agent-tool HITL state across RunState JSON round-trips by @seratch in #2500
  • fix: isolate nested agent-tool resume cache by RunState scope by @seratch in #2501
  • fix: bump RunState schema to 1.1 with explicit backward-read policy by @seratch in #2502

Documents & Other Changes

  • docs: updates for 0.9.0 release by @seratch in #2481
  • docs: update translated document pages by @github-actions[bot] in #2482
  • docs: update translated document pages by @github-actions[bot] in #2483
  • docs: update translated document pages by @github-actions[bot] in #2484
  • docs: sync tool docs and add coverage for internal helper branches by @seratch in #2485
  • docs: update translated document pages by @github-actions[bot] in #2486
  • Release 0.9.1 by @github-actions[bot] in #2497

Full Changelog: v0.9.0...v0.9.1

v0.9.0

13 Feb 22:11
b3c6700

Choose a tag to compare

Key Changes

Python 3.9 is no longer supported

Since Python 3.9 is EOLed three months ago, this SDK no longer support the version. Please upgrade to Python 3.10 or newer.

Timeouts for function tools

Now you can pass the following options to customize function tool behavior:

  • timeout_seconds: float | None
  • timeout_behavior: ToolTimeoutBehavior = "error_as_result" # or "raise_exception"
  • timeout_error_function: ToolErrorFunction | None

Agent#as_tool() now returns FunctionTool

Additionally, the type hint for the value returned from the Agent#as_tool() method has been narrowed from Tool to FunctionTool. This change should not usually cause breaking issues, but if your code relies on the broader union type, you may need to make some adjustments on your side.

What's Changed

  • chore: drop Python 3.9 support across metadata, CI, and docs by @seratch in #2474
  • feat: #2346 add configurable timeout handling for function tools by @seratch in #2479
  • feat: add ToolOutputTrimmer for smart context management by @jkrish in #2468
  • fix: narrow Agent.as_tool return type to FunctionTool by @seratch in #2473
  • fix(tracing): propagate trace metadata to spans for processors by @seratch in #2478
  • fix(voice): handle odd-length audio buffers in StreamedAudioResult by @OiPunk in #2456

Documents & Other Changes

  • docs: update translated document pages by @github-actions[bot] in #2475
  • Release 0.9.0 by @github-actions[bot] in #2480

New Contributors

Full Changelog: v0.8.4...v0.9.0

v0.8.4

11 Feb 19:14
67687cb

Choose a tag to compare

Key Changes

Hosted container tool + Skills

This release includes the hosted shell runtime tool along with its native skills support. Developers now can pass a container-based shell runtime with skills this way:

from agents import Agent, ShellTool

agent = Agent(
    name="Shell Agent",
    model="gpt-5.2",
    instructions="Use the available shell tool to answer user requests.",
    tools=[
        ShellTool(
            environment={
                "type": "container_auto",
                "network_policy": {"type": "disabled"},
                "skills": [
                    {
                        "type": "skill_reference",
                        "skill_id": "skill_698bbe879adc81918725cbc69dcae7960bc5613dadaed377",
                        "version": "1",
                    }
                ],
            }
        )
    ],
)

Refer to examples/tools/container_shell_inline_skill.py and examples/tools/container_shell_skill_reference.py for more details.

What's Changed

  • feat: add container shell + skills support by @seratch in #2469
  • fix(realtime): omit null audio formats in SIP call attach updates by @OiPunk in #2454
  • fix(result): support Pydantic model_rebuild for RunResultStreaming by @OiPunk in #2455
  • fix(tool): resolve default failure handler at invoke time by @OiPunk in #2460
  • fix(agent-tools): inherit parent RunConfig when agent-as-tool is invoked by @OiPunk in #2463
  • fix(stream): emit queued events before max-turns exception by @OiPunk in #2458
  • fix(prompt): omit tool_choice when prompt manages built-in tools by @OiPunk in #2464

Documents & Other Changes

  • docs: update translated document pages by @github-actions[bot] in #2452
  • fix(mcp): validate required params before call_tool by @OiPunk in #2453
  • docs: clarify Azure Realtime GA endpoint configuration by @OiPunk in #2440
  • docs: update translated document pages by @github-actions[bot] in #2466
  • Release 0.8.4 by @github-actions[bot] in #2465

Full Changelog: v0.8.3...v0.8.4

v0.8.3

10 Feb 00:10
627a160

Choose a tag to compare

What's Changed

  • Support model_version param for turn detection in realtime agents sdk by @jhills20 in #2450

Documents & Other Changes

  • docs: describe Pydantic Field annotations for tool args by @haasonsaas in #2436
  • Release 0.8.3 by @github-actions[bot] in #2451

Full Changelog: v0.8.2...v0.8.3

v0.8.2

09 Feb 22:30
3a5e6fe

Choose a tag to compare

What's Changed

  • feat: support Annotated[T, Field(...)] in function schema by @haasonsaas in #2435
  • feat: include agent in ToolContext tool calls by @rm-openai in #2446
  • fix(tracing): #2444 drop unsupported usage fields for OpenAI trace ingest by @seratch in #2448
  • fix(core): avoid noisy pydantic serialization warnings for model_dump items by @OiPunk in #2443
  • refactor: Extract duplicate Gemini tool call ID cleanup logic by @hobostay in #2438

Documents & Other Changes

  • docs: update document pages for v0.8.1 release by @seratch in #2432
  • docs: update translated document pages by @github-actions[bot] in #2434
  • Release 0.8.2 by @github-actions[bot] in #2447

New Contributors

Full Changelog: v0.8.1...v0.8.2

v0.8.1

06 Feb 22:43
5949f09

Choose a tag to compare

What's Changed

  • feat: add run-context thread reuse for codex_tool by @seratch in #2425
  • feat: add max turns in REPL by @xju2 in #2431
  • fix: #2426 persist streamed run-again tool items to session by @seratch in #2433
  • fix: preserve handoff target resolution compatibility in run-state agent maps by @seratch in #2423

Documents & Other Changes

  • docs: v0.8.0 changes by @seratch in #2405
  • docs: update translated document pages by @github-actions[bot] in #2420
  • Release 0.8.1 by @github-actions[bot] in #2424

New Contributors

Full Changelog: v0.8.0...v0.8.1