Skip to content
JournalTORIS / FIELD NOTES

← BlogAI insights

OpenAI Agents SDK v1.0.0-alpha.1: Embedding Codex Core via PyO3

How OpenAI Agents SDK v1.0.0-alpha.1 embeds Codex Core (rust-v0.166.0) via PyO3, removes app-server/JSON-RPC overhead, and what breaks from alpha.8.

#openai-agents-sdk #codex #python #pyo3 #ai-agent

Read the Korean original

OpenAI Agents SDK v1.0.0-alpha.1: Embedding Codex Core via PyO3

Q. What changed in OpenAI Agents SDK v1.0.0-alpha.1 compared to earlier releases? It is the first 1.0 preview that adds CodexProvider, embedding unmodified Codex Core (rust-v0.166.0) via PyO3 so Python calls Core directly without launching codex app-server or JSON-RPC. By swapping RunConfig(model_provider=provider), the same agent definition can switch between Codex and standard APIs per run.

⚠️ Accuracy guardrail: This post was verified on November 24, 2026 directly against the official openai/openai-agents-python GitHub repository (v1.0.0-alpha.1 release notes and official docs). 1.0.0a1 is a GitHub-only pre-release not published to PyPI, while the stable line remains v0.25.0 (November 18, 2026). Long-running sandbox or combined Realtime voice stress benchmarks beyond the release checks are not published and are not covered here.

30-second summary

  • Opt-in Codex per run: Import CodexProvider from agents.models.codex and pass it in RunConfig to run Runner.run() with your saved local Codex login or api_key=....
  • Native PyO3 embedding: Unmodified Codex Core rust-v0.166.0 ships inside the wheel, removing codex app-server startup and JSON-RPC serialization overhead.
  • GitHub Releases only: Four cp310-abi3 wheels (93.0–122.7 MB) are distributed exclusively via GitHub Releases for CPython 3.10–3.14 virtual environments.
  • Incompatible with v0.24.0-alpha.8: SessionState checkpoints do not match RunState, so pending runs must finish in the old environment before starting a fresh SDK session.

OpenAI Agents SDK v1.0.0-alpha.1 GitHub Release page

Why Codex became a model provider instead of a separate engine

This preview lets you swap the underlying inference engine at RunConfig time without rewriting your Agent definitions.

In the earlier harness preview (v0.24.0-alpha.8), execution required separate entry points such as Agent.run() or Session.submit(). Released on November 20, 2026 from the merged feat/simple-codex commit 87e8f533, v1.0.0-alpha.1 keeps the standard Runner.run() and Runner.run_streamed() loop intact.

For developers, streaming text, handoffs to specialist agents, approval pauses before Python tools run, and typed output validation work the same way while Codex handles inference. Native commands follow Codex's own sandbox and approval settings, and a native approval prompt ends the model call so control returns to your application.

Advertisement

What direct PyO3 calls eliminate—and what they require

Calling Rust Core directly inside Python avoids spawning a codex app-server subprocess, in exchange for platform-specific binary wheels and explicit lifecycle cleanup.

Architecture comparison between external process relay and Agents SDK v1.0.0-alpha.1

Reusing a CodexProvider instance shares a single ThreadManager across calls while creating a fresh thread per call, and SDK Session objects manage conversation history. Because native threads and connections stay open, calling await provider.aclose() when finished is required.

Automatic session compaction was fixed to use Codex's local conversation history—including after an approval pause—but compaction itself and tracing still require a separate OpenAI client or API credentials. If your only credential is a saved local Codex login, set OPENAI_AGENTS_DISABLE_TRACING=1 in your shell before running the example.

Wheel packages and CPython requirements

Because openai-agents==1.0.0a1 is not on PyPI, you install the platform wheel URL directly from GitHub Releases (each link includes a SHA-256 digest checked by pip).

Platform / Architecture Wheel filename Size (at release) Requirements
macOS (Apple Silicon) openai_agents-1.0.0a1-cp310-abi3-macosx_11_0_arm64.whl 93.0 MB macOS 11+, CPython 3.10–3.14
Linux ARM64 openai_agents-1.0.0a1-cp310-abi3-manylinux_2_28_aarch64.whl 111.6 MB glibc 2.28+, CPython 3.10–3.14
Linux x86-64 openai_agents-1.0.0a1-cp310-abi3-manylinux_2_28_x86_64.whl 116.7 MB glibc 2.28+, CPython 3.10–3.14
Windows x64 openai_agents-1.0.0a1-cp310-abi3-win_amd64.whl 122.7 MB Windows x64, CPython 3.10–3.14

Install using --only-binary=:all: rather than plain pip install openai-agents:

python -m pip install --only-binary=:all: "WHEEL_URL"
OPENAI_AGENTS_DISABLE_TRACING=1 python -I examples/model_providers/codex_provider.py --codex

Developer desk displaying Python agent code and Rust compilation logs

Breaking changes when moving from v0.24.0-alpha.8

Projects migrating from the previous harness preview need updates to both execution APIs and stored state.

  1. Execution entry point: Replace Agent.run() and Session.submit() with Runner.run() or Runner.run_streamed(), and import Agent, Runner, and RunConfig from agents instead of agents.classic.
  2. Incompatible checkpoints: SessionState from alpha.8 uses a different format from Runner's RunState. Finish pending native runs and approvals in your old environment, then start a fresh SDK session.
  3. Sandbox manifest compatibility: Resumed runs now preserve inline binary files. Upgrade all readers before sharing non-UTF-8 manifests, or keep using LocalFile if older SDKs must read them.

Q. Should production agents upgrade to 1.0.0a1 right away? Keep production workloads on the stable v0.25.0 release and test 1.0.0a1 in an isolated virtual environment to validate saved-login Codex workflows and tool approval loops.

Toris's take

If you want to prototype Python multi-agent handoffs and tool approval loops using only a saved local Codex login, v1.0.0-alpha.1 is worth testing in a separate virtual environment right away. On the other hand, if you operate production pipelines or rely on existing SessionState checkpoints, staying on stable v0.25.0 until 1.0 lands on PyPI is the safer call.

From Codex CLI 0.171.0 defaulting to GPT-6.2 Sol to Claude Ship's PR review and approval pipeline, agent runtimes are moving closer to local and repository execution loops. At Toris Studio's AI automation and engineering services, we keep experimental alpha runtimes strictly isolated from stable production lines.

Sources

Advertisement