github openai/openai-agents-python v1.0.0-alpha.2
Agents SDK v1.0.0-alpha.2

pre-releaseone hour ago

Agents SDK v1.0.0-alpha.2

Highlights

  • Resume conversations and pending approvals across workers with Responses or Codex.
  • Recover supported native Codex command and edit approvals.
  • Configure tool execution hooks and filter available function tools.
  • Opt into Runner text redaction and detailed operation tracing with either provider.
  • Upgrade checkpoint readers before writers. Alpha.2 introduces new persisted state formats.

Install

This GitHub-only preview bundles openai-agents and the native Codex runtime.

Activate a standard CPython 3.10–3.14 virtual environment, then run the single command for your platform. Pip verifies the downloaded wheel against its SHA-256 hash from the release's SHA256SUMS file before installing it.

Linux x86-64 (glibc 2.28+)

python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.2/openai_agents-1.0.0a2-cp310-abi3-manylinux_2_28_x86_64.whl#sha256=1c073472688dfae9ed4b082ad4be3451ceb2cf7913bfb56b1a9af258b63cdf7b"

Linux ARM64 (glibc 2.28+)

python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.2/openai_agents-1.0.0a2-cp310-abi3-manylinux_2_28_aarch64.whl#sha256=fd879e9f013173af52e60a2706133633ef4d1edf6ae1b5899e2f022a26aaba73"

macOS 11+ (Apple silicon)

python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.2/openai_agents-1.0.0a2-cp310-abi3-macosx_11_0_arm64.whl#sha256=4a86bf3c2ffd9018ec05bc3744a3f00898b019007922d0a0640864e4b704129f"

Windows x64

python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.2/openai_agents-1.0.0a2-cp310-abi3-win_amd64.whl#sha256=a1b5d648ee998c755f792128c9066260eb8a5ff4c050d1812986834baaf4579f"

To get started, see the Codex examples guide.

Upgrading from v1.0.0-alpha.1

  • Alpha.2 reads alpha.1 RunState schema 1.22 and always writes schema 1.24, even with redaction disabled. Alpha.1 cannot read new snapshots.
  • Protected ResumableSession checkpoints use version 2.

Sessions and approvals

  • Use ResumableSession to persist conversation history and pending approvals together. Supply a ResumableSessionStore with atomic conditional writes or use RedisSessionStore. Protect checkpoint storage and allow one writer per session. See the session guide.
  • On a replacement worker, call session = await ResumableSession.resume(store, session_id) and state = await session.load_state(agent). Recreate config with the appropriate model provider, matching tool declaration and authorization policy, hooks, and redactor. Use CodexProvider for pending native Codex approvals. Approve or reject the original interruption through RunState, then continue with await Runner.run(agent, state, session=session, run_config=config).
  • Native Codex recovery supports one pending direct exec_command or apply_patch approval in one local environment. Restore the same workspace path, permissions, and required hooks. Affected files must match their saved state. Missing required SDK tools or hooks leave approvals pending. Managed native hooks can also stop approval recovery. Keep required hooks enabled. Restored native results enter the conversation's replay history. See the native approval example.
  • After failure or worker loss, inspect the checkpoint and workspace. Reconcile partial edits and other external effects before retrying. Recovery cannot restart terminated commands or recover alpha.1 approvals that ended the model call.

Tool execution

  • Configure RunConfig.tool_execution with ToolExecutionConfig. Experimental prepare_tool_input modifies arguments before approval and execution. prepare_tool_output modifies results after execution. Both support SDK tools with either provider and hooked native Codex tools. Responses-hosted tools execute outside these callbacks.
  • Use prepare_tool_declaration to change or withhold supported function declarations. The Runner rechecks eligibility before execution, including after approval. See the tool hooks example.
  • With input or output hooks configured, sdk_only_tool_hooks=True disables native Codex workspace tools and their approval recovery.
  • Embedded Codex Core rust-v0.166.0 includes a patch blocking native dispatch when any synchronous PreToolUse handler fails or times out. After approval, the replacement worker runs configured on_tool_start callbacks and reuses the approved input without applying prepare_tool_input again. Asynchronous notifications and output hooks cannot prevent an action already started. See the required tool hooks patch.
  • When the manager run is cancelled, active Agent.as_tool() calls get up to 250 ms to clean up. Repeated cancellation does not reset the deadline. Tools that exceed the timeout may continue running and cause side effects or state changes after cancellation returns. #6130

Redaction and tracing

  • Opt into RunConfig.redact_text with your own synchronous callback. It changes recognized text sent to the model and SDK tools, replies, streams, and persisted state. Supply the same callback when continuing protected sessions. Protected runs withhold raw stream events and restrict automatic traces to metadata. Binary media and native Codex operations remain outside its protection. See the redaction guide.
  • Use RunConfig(tracing={"operation_detail": "metadata"}) for operation metadata with either provider. Set "operation_detail" to "content" to capture bounded model inputs and outputs, tool arguments, and available results. Model retries add events to the same model span.
  • Default SDK tracing can expose native Codex results, including file contents, through returned responses or replayed history. Set RunConfig(trace_include_sensitive_data=False) to suppress sensitive trace payloads in every mode. Use RunConfig(tracing_disabled=True) to disable SDK tracing entirely.
  • Install the verified wheel with its [opentelemetry] extra and use OpenTelemetryTracingProcessor to export SDK spans through your application's tracer provider. OpenTelemetry exports payloads only in "content" mode. See the OpenTelemetry setup.

Don't miss a new openai-agents-python release

NewReleases is sending notifications on new releases.