Accessibility Adjustments

Use these optional tools to adjust reading and display preferences. These tools cannot resolve every accessibility barrier. Please contact the website owner if you need assistance.

  • Text adjustments
  • Content scaling 100%
  • Font size 100%
  • Line height 100%
  • Letter spacing 100%
  • Colour adjustments
  • Orientation adjustments

OpenAI Python SDK adds typed agent results and file helpers

OpenAI Python SDK 3.23.0 adds typed agent answers, application tools and file helpers, alongside tracing and connection fixes.

Listen to this article

OpenAI released version 3.23.0 of its Python SDK on October 1, adding helpers that connect agent work to the rest of an application. The official release includes structured final answers, typed application tools, file staging and downloads tied to a completed turn.

The practical theme is integration. An agent can produce useful text while still leaving developers to write the code that validates its answer, calls application functions and retrieves the correct output file. This update brings more of that work into the SDK.

Completed answers become easier to use

The SDK helper documentation shows how a Pydantic model can define the expected answer when a streamed agent session is created. The helper generates the output schema and parses the completed response into that type.

For example, an application can request a report with a summary and a list of findings, then work with those fields directly. The documentation says every final text part is validated, while the parsed output property exposes the first parsed final text part.

There are important limits. Choosing an output type on a later stream only selects the local parser for an already configured session. It does not change that session’s schema. If parsing fails, the SDK retains the completed raw result for inspection.

Type validation checks the shape of an answer. Developers still need separate checks for whether its facts and conclusions are correct.

Application functions need less duplicate code

A merged change for typed tools lets an application expose annotated Python functions through the beta Agents interface. Previously, the example required a separate JSON schema plus code that unpacked arguments before calling the application’s function.

The helper derives the tool definition and validates incoming arguments with Pydantic before invoking the application. Developers can keep dependencies in ordinary closures or bound methods. Asynchronous callbacks are supported through the asynchronous client.

That can make a catalog lookup or another existing application function simpler to connect. Validation of argument types should still sit alongside the application’s own permission checks and business rules.

Files stay connected to the completed turn

The file handling commit included in the release adds preparation helpers for selected local files and directory snapshots. An application can also stage a file in an existing hosted environment.

For outputs, the new helper selects an artifact using the completed result’s session, turn and requested path. It can read the content into memory or stream it to a destination chosen by the application. Missing or ambiguous matches produce an error.

This matters when the same session produces several versions of a report. The retrieval code has an explicit relationship to the completed turn.

Uploads remain the caller’s responsibility to clean up. The implementation also states that local path selection is intended for stable files controlled by the application. It does not provide a filesystem sandbox for untrusted paths or hostile local changes.

Tracing and connection fixes round out the release

A separate merged change adds paginated listing of agent session traces, with synchronous and asynchronous methods. It also adds SDK methods for creating Realtime translation client secrets and configuring their expiration.

The release notes list fixes for WebSocket paths and query parameters, send queue limits during reconnection and avoiding replay of typed sends whose delivery is uncertain.

For teams using the Agents API, the useful next step is testing these helpers against their actual workflow. That includes invalid output, interrupted uploads, ambiguous file results and connection loss. The agent helpers remain beta, and the release does not establish a new model launch or a measured reliability guarantee.

Featured image is an original AI generated editorial illustration.

Jordan Reid
Jordan Reid

Jordan Reid is focused on AI tools, agents, developer products, and the way technology changes everyday work. Jordan approaches a launch from the userโ€™s side of the screen. What can it actually help someone finish? The voice is practical, conversational, and skeptical of products that turn a simple job into five new settings. Coverage follows coding assistants, creative software, browser agents, and the workflows around them, with attention to pricing, permissions, setup, and the human work that remains.

Leave a Reply

Your email address will not be published. Required fields are marked *

Gravatar profile