Repository navigation
OpenAI Agents SDK v1.0.0-alpha.3
Pre-releaseOpenAI Agents SDK v1.0.0-alpha.3
Build agents in Python with the Codex harness. This release runs the same agent loop as the Codex CLI inside your Python process. Your application supplies tools, access checks, approvals, and storage.
What's changed
from openai_agents import Agent, Runnernow selects Codex. The wheel includes the compiled engine.- Existing Python workflows can use
openai_agents.classic, including Voice and Python model adapters. Useopenai_agents.realtimefor speech-to-speech applications. - Codex agents can react to tool results, compact long conversations, and resume saved checkpoints on another worker.
- Unlike alpha.2, this release uses the
openai_agentsnamespace and always runs Codex from the root API. There is noagentsalias or provider switch at the root.
Install
This GitHub-only prerelease provides four platform wheels and SHA256SUMS, as alpha.2 did. It is not published to PyPI.
Use a standard 64-bit CPython 3.10 through 3.14 environment. Run the command for your platform. Each command pins the wheel and its SHA-256 digest, which pip checks before installation.
Linux x86-64 (glibc 2.28 or newer)
python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.3/openai_agents-1.0.0a3-cp310-abi3-manylinux_2_28_x86_64.whl#sha256=69aa2d66eb0fa87e480e6e563adb6e4b3676e004c1387833dbb27cf0f1e2d2d8"Linux ARM64 (glibc 2.28 or newer)
python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.3/openai_agents-1.0.0a3-cp310-abi3-manylinux_2_28_aarch64.whl#sha256=476146114344b2495cbd29e74dc9e42f225639575b0fb1af37ea4dcfa1e7c896"macOS 11 or newer on Apple Silicon
python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.3/openai_agents-1.0.0a3-cp310-abi3-macosx_11_0_arm64.whl#sha256=cceaac9e998f590f91fd37e2292d807e246c3af1f24fbb49c3530f120c279ade"Windows x64
python -m pip install --only-binary=:all: "https://github.com/openai/openai-agents-python/releases/download/v1.0.0-alpha.3/openai_agents-1.0.0a3-cp310-abi3-win_amd64.whl#sha256=a23ef9969f083da80b3ec0d36f2f5451687da57f1ba0ccb40fb2887d0e6e37a9"For environment setup, optional dependencies, or source builds, see the installation guide. An unpinned install by distribution name can select v0.
Run a first turn
Set OPENAI_API_KEY and OPENAI_MODEL in your environment. Use a model ID available to your project. Save this as first_turn.py.
import asyncio
import os
from openai_agents import Agent, Runner
async def main():
agent = Agent(model=os.environ["OPENAI_MODEL"])
result = await Runner.run(agent, "Pick a neighborhood in Lisbon.")
print(result.output_text)
asyncio.run(main())Run python first_turn.py to print the reply. The request is billable.
Migrate an existing workflow
- To keep the Python loop, change
from agents import Agent, Runnertofrom openai_agents.classic import Agent, Runner. - Move Realtime imports to
openai_agents.realtime. Voice remains under Classic. - To use Codex, import
AgentandRunnerfromopenai_agentsand Codex tools fromopenai_agents.codex. Readresult.output_textinstead of Classic'sresult.final_output. - Test in a separate environment. Code and saved conversations do not migrate automatically. Keep existing conversations on their original loop until you have verified compatibility.
For Classic imports, copy the migration prompt. Compare v0 and v1 to choose a migration path, or start with the v1 documentation for more examples.