openai/openai-agents-python
67.1
Adequate · 16 November 2026
146.6k
lines of production code
Python
primary language
5
measurements over time
What this system is
Features
Add GPT Live Responses delegation example
Added a new local browser example in \examples/live/app\ that demonstrates connecting GPT Live to an Agents SDK specialist agent via Responses delegation. The example includes a Python server (\server.py\ implied by usage, with logic in \delegation.py\ and \agent.py\) that handles WebRTC audio, delegates order-lookup tasks to a specialist agent, and returns results to the live session, alongside a static frontend (\index.html\, \app.js\) for conversation control and a Node.js test (\test\_ui.cjs\) for the UI logic.
examples/live · high confidence
Add Git MCP server example
Added a new example demonstrating how to integrate the Git MCP server with the agents framework. The example shows how to spin up the server via \uvx\, connect it to an agent using \MCPServerStdio\, and invoke Git tools like \git\_log\ to inspect repository history and contributors.
_examples/mcp/git\example · high confidence
Add MCP SSE example with local server and client integration
This change introduces a new example demonstrating how to use the Model Context Protocol (MCP) with Server-Sent Events (SSE). It includes a local SSE server (\server.py\) that exposes tools like \add\, \get\_weather\, and \get\_secret\_word\, and a client script (\main.py\) that runs this server in a subprocess and interacts with an agent using the \MCPServerSse\ class. The example is designed to run via \uv\ and targets the MCP Python SDK v2, while noting that the Agents SDK client supports both v1 and v2.
_examples/mcp/sse\example · high confidence
Add MCP filesystem example with tracing
Added a new example in \examples/mcp/filesystem\_example\ that demonstrates using the \MCPServerStdio\ class to connect to the Model Context Protocol (MCP) filesystem server via \npx\. The example includes a Python script (\main.py\) that configures an agent with filesystem tools, runs queries against sample data files, and integrates OpenAI tracing via \gen\_trace\_id\ and \trace\ to log execution details. A \README.md\ provides setup instructions and explains the underlying mechanism of spawning the server subprocess and managing tool calls.
_examples/mcp/filesystem\example · high confidence
Add Python example for remote MCP Streamable HTTP integration
A new Python example has been added to demonstrate connecting to a remote MCP server (DeepWiki) via the Streamable HTTP transport. The example configures the \MCPServerStreamableHttp\ client with specific timeout and retry settings to handle remote tool responses and includes instructions for running the agent with an OpenAI API key.
_examples/mcp/streamable\_http\_remote\example · high confidence
Add Python example for remote and local SSE MCP server usage
A new Python example has been added to demonstrate how to connect to an MCP server via Server-Sent Events (SSE). The example, located in examples/mcp/sse\_remote\_example, allows users to run a bundled local SSE server by default or connect to a remote server by setting the MCP\_SSE\_REMOTE\_URL environment variable. It showcases agent execution with MCP tools and includes trace logging for debugging.
_examples/mcp/sse\_remote\example · high confidence
Add Twilio SIP Realtime example with opt-in transcript logging
This location introduces a new example demonstrating how to handle OpenAI Realtime SIP calls via Twilio Elastic SIP Trunking. It provides a FastAPI server that accepts incoming calls, routes them through a multi-agent graph (triage, FAQ, and Records agents), and manages the realtime session. A key behavioral detail is that transcript logging (caller text, assistant text, and audio transcripts) is disabled by default and must be explicitly enabled by setting the \TWILIO\_SIP\_LOG\_TRANSCRIPTS=1\ environment variable, ensuring privacy by default while allowing debugging when needed.
_examples/realtime/twilio\sip · high confidence
Add financial research agent example
A new example demonstrating a financial research agent has been added to the examples directory. This agent composes multiple specialized sub-agents to plan, search, analyze, write, and verify financial reports. Users can run the example via \python -m examples.financial\_research\_agent.main\ to interact with the agent and generate analyses.
_examples/financial\_research\agent · high confidence
Add release-candidate preparation and sensitive-logging audit skills
The repository now includes new automation skills for release management and security auditing. The \release-candidate-prep\ skill materializes an isolated release candidate from a specific commit, updating version declarations in \pyproject.toml\, the release manifest, and the source version file. The \sensitive-logging-audit\ skill inventories Python source files to identify potential sensitive data exposure in logging calls, policy helpers, and raw output methods. Additionally, new examples demonstrate conditional tool enabling for agents-as-tools and structured input handling for agent tools.
openai-agents · high confidence
Add static voice example with local audio recording and playback
A new static voice demo has been added to the examples directory, allowing users to record audio directly in the terminal and process it through a voice pipeline. The example demonstrates a workflow where recorded speech is transcribed, passed to an agent (with tool use and handoff capabilities), and the response is streamed back as audio for playback. This provides a self-contained way to test voice interactions without requiring a live streaming server.
examples/voice/static · high confidence
Add streamed voice conversation example with Textual UI
Introduces a new interactive demo in examples/voice/streamed that allows users to have voice conversations with an agent using the voice pipeline's built-in turn detection. The example features a Textual-based terminal UI for recording audio and displaying transcriptions, utilizing a custom workflow (MyWorkflow) that supports tool usage (e.g., weather lookup) and agent handoffs (e.g., to a Spanish-speaking agent).
examples/voice/streamed · high confidence
Added script to identify the latest release tag
A new shell script, find\_latest\_release\tag.sh, has been added to the final-release-review skill. This utility fetches tags from a specified Git remote and identifies the most recent tag matching a given pattern (defaulting to 'v\'), which supports automated release review processes by providing a reliable way to determine the current latest release version.
.agents/skills/final-release-review/scripts · high confidence
Automated example execution support
The example suite now supports unattended, automated runs via the \make examples-run\ target, documented in the new \examples/README.md\. To facilitate this, \examples/auto\_mode.py\ introduces helper utilities that bypass interactive prompts when the \EXAMPLES\_INTERACTIVE\_MODE=auto\ environment variable is set, allowing examples to run deterministically without manual input.
examples · high confidence
Docker sandbox examples now support cloud storage mounts and secure rclone installation
The Docker sandbox examples have been expanded to include smoke tests for mounting cloud storage providers (S3, GCS, and Azure Blob) using rclone-backed Docker volumes, allowing agents to read and write to these mounts. Additionally, the sandbox Dockerfile now pins the rclone version to 1.74.4 and verifies its SHA-256 checksum during installation to prevent supply-chain risks, while also installing necessary mount helpers like blobfuse2, mount-s3, and EFS utils.
examples/sandbox/docker · high confidence
Expanded basic examples for GPT-5.6, multimodal inputs, and advanced agent patterns
The examples/basic directory now includes a comprehensive set of new and updated samples demonstrating the latest SDK capabilities. Users can now see how to configure GPT-5.6 models with reasoning and verbosity settings, run agents via Ollama using the Chat Completions adapter, and execute code in Jupyter notebooks. The examples cover multimodal inputs (local and remote images, local and remote PDFs), tool outputs that include images, and dynamic prompt templates. Advanced patterns are also demonstrated, including opt-in model retry policies with custom backoff, streaming function call arguments, and a full websocket-based session with human-in-the-loop approval. Additionally, new examples illustrate tool input/output guardrails for security, trace redaction for privacy, and using previous\_response\_id to continue conversations efficiently.
examples/basic · high confidence
Experimental extensions for Codex and hosted multi-agent workflows
The \src/agents/extensions/experimental\ package now exposes two new experimental capabilities: a Codex extension and hosted multi-agent support. The Codex extension provides a \Codex\ class to manage execution environments with configurable options (such as path overrides, API keys, and subprocess stream limits) and exposes a rich set of types for thread management, turn events, and item tracking (e.g., \Thread\, \Turn\, \AgentMessageItem\, \FileChangeItem\). The hosted multi-agent module introduces \OpenAIHostedMultiAgentModel\ and related configuration classes (\HostedMultiAgentConfig\, \HostedAgentMetadata\) to enable multi-agent orchestration via OpenAI's hosted infrastructure. Both extensions are marked as experimental and subject to change before general availability.
src/agents/extensions/experimental · high confidence
Introduce OpenAI voice model provider with STT/TTS support
Added the OpenAI voice model provider implementation in src/agents/voice/models, including the provider class, STT model wrapper, and TTS model wrapper. The provider defaults to the 'gpt-transcribe' STT model and 'gpt-4o-mini-tts' TTS model, supports explicit client configuration (api\_key, base\_url, organization, project) while raising a UserError if conflicting options are provided alongside a pre-existing client, and forwards TTS settings like speed and instructions to the OpenAI API.
src/agents/voice/models · high confidence
Introduce Realtime agents SDK (beta)
Adds a new \src/agents/realtime\ module providing a \RealtimeRunner\ and \RealtimeSession\ for building voice agents with persistent WebSocket connections. The SDK includes configuration for audio formats (PCM16, G.711), input noise reduction, transcription, turn detection, and reasoning effort. It supports agent handoffs with strict JSON schema validation, tool filtering, and guardrails. The module exports a comprehensive set of events, items, and model interfaces to manage the realtime session lifecycle.
src/agents/realtime · high confidence
Introduce runtime-behavior-probe skill for controlled runtime investigation
Added the \runtime-behavior-probe\ skill, which provides a structured workflow for planning and executing runtime behavior probes. The skill enforces a manual-only, explicit-approval model: invocation authorizes planning, but every probe requires user approval after disclosing the exact command, source identity, and capabilities. It includes a validation matrix for tracking cases, a disposable Python probe scaffold for capturing runtime context and results, and reference guides for error cases, OpenAI runtime patterns, and reporting formats.
.agents/skills/runtime-behavior-probe · high confidence
Introduce sandbox agent capabilities and apply\_patch tool
This change introduces the \src/agents/sandbox/capabilities\ module, defining a structured capability system for sandbox agents. It includes core capabilities such as Filesystem, Shell, Compaction, and Memory, with the Memory capability enabling agents to read and generate memory artifacts based on configurable layouts. Additionally, it adds the \apply\_patch\ tool, which allows agents to edit files using a specific patch grammar (Add, Delete, Update operations) and integrates with an approval workflow to ensure safe file modifications within the sandbox workspace.
src/agents/sandbox/capabilities · high confidence
Introduce sandbox agent framework with memory consolidation and path normalization
This change introduces the \src/agents/sandbox\ module, providing the core infrastructure for sandbox-backed agent execution. It adds support for run-scoped working directories and memory consolidation, allowing agents to extract and summarize conversation history across sessions. The module includes a robust \apply\_patch\ implementation that normalizes file paths to POSIX format to ensure cross-platform consistency and correctly handles case-only renames. Additionally, it introduces configurable memory generation phases (extraction and consolidation) with adjustable model settings and turn limits, and enforces strict path validation and remote mount policies to prevent workspace escape and unauthorized edits.
src/agents/sandbox · high confidence
Introduce sandbox agent memory consolidation
Added a new memory management system for sandbox agents that automatically extracts and consolidates insights from session rollouts. The system runs a two-phase background process: Phase 1 extracts raw memories and summaries from individual run segments, while Phase 2 consolidates these into a structured, file-based memory folder (including MEMORY.md, skills, and rollout summaries) to help future agents understand user preferences and avoid past mistakes. This feature is configurable via MemoryGenerateConfig and integrates with the sandbox session lifecycle to ensure memory is updated after runs.
src/agents/sandbox/memory · high confidence
Introduce sandbox entry and mount abstractions for artifact materialization
This change adds the \src/agents/sandbox/entries\ module, which defines the core data models (\Dir\, \File\, \LocalFile\, \LocalDir\, \GitRepo\) and mount strategies (\BoxMount\, \S3Mount\, \AzureBlobMount\, etc.) used to materialize sandbox artifacts. For users, this establishes the structured foundation for how local files, directories, and remote storage sources are resolved, validated, and copied into the sandbox environment, including support for native host paths and specific mount patterns.
src/agents/sandbox/entries · high confidence
Introduce sandbox session module with secure archive extraction and audit instrumentation
The new \src/agents/sandbox/session\ module provides the core infrastructure for sandbox operations, featuring secure extraction of tar and zip archives that validates member paths and enforces resource limits to prevent directory traversal and denial-of-service. It includes a robust instrumentation system that delivers audit events to configurable sinks with granular payload policies, allowing sensitive data like execution output and byte counts to be selectively redacted. Additionally, the module manages the lifecycle of ephemeral mounts, ensuring they are properly detached and restored during snapshot transitions, and handles PTY output collection with correct UTF-8 boundary handling.
src/agents/sandbox/session · high confidence
Introduce sandbox utility library for safe workspace operations
Added a new \src/agents/sandbox/util\ package providing core utilities for sandbox agents. This includes safe tar extraction with strict validation against path traversal, symlinks, and device nodes; a mechanism to run blocking workspace I/O off the asyncio event loop to prevent race conditions during snapshot resume; token-aware text truncation for managing output budgets; and helpers for retrying transient HTTP errors, parsing \ls -la\ output (including device nodes), and shallow-cloning GitHub repositories.
src/agents/sandbox/util · high confidence
Introduce session management and automatic conversation compaction
The \src/agents/memory\ module now provides a complete session management system. It includes \SQLiteSession\ for local, thread-safe storage of conversation history, and \OpenAIConversationsSession\ for remote history managed via the OpenAI Conversations API. Additionally, \OpenAIResponsesCompactionSession\ enables automatic compaction of long conversations using the OpenAI Responses API, allowing the system to maintain context within token limits by compacting history when configured thresholds are met.
src/agents/memory · high confidence
Introduce the \`src/agents/mcp\` package for Model Context Protocol integration
This change adds the \src/agents/mcp\ package, providing the core infrastructure for connecting to and managing MCP servers. It introduces \MCPServerManager\ for handling server lifecycles, \MCPServer\ classes for Stdio, SSE, and Streamable HTTP transports, and a compatibility layer (\\_compat\) that supports both MCP SDK v1 and v2. The package also includes utilities for tool filtering, metadata resolution, and secure logging that redacts credentials from URLs.
src/agents/mcp · high confidence
Introduce voice agent pipeline with streaming audio support
Adds a new \src/agents/voice\ module providing a \VoicePipeline\ that transcribes audio input, runs a configurable workflow, and streams text-to-speech output. The pipeline supports both single-turn and multi-turn (streamed) audio sessions, integrates with OpenAI for STT and TTS, and exposes configuration for tracing, sensitive data redaction, and custom voice IDs. It includes a \SingleAgentVoiceWorkflow\ for simple agent-based interactions, a \VoiceWorkflowBase\ for custom logic, and utilities like sentence-based text splitting and NumPy audio buffer handling.
src/agents/voice · high confidence
New Decisions API integration recipes
Added example recipes in \examples/decisions\ demonstrating how to integrate the native \AsyncOpenAI.decisions.create()\ client with the Agents SDK. The \classify.py\ recipe shows using decisions for input guardrails to check request scope, \model\_router.py\ demonstrates pre-run model selection based on classification, and \tool\_risk\_gate.py\ illustrates applying editorial policies to tool arguments with optional human approval workflows.
examples/decisions · high confidence
New Implementation Kickoff skill for isolated, verified local handoffs
A new agent skill, Implementation Kickoff, has been added to guide the transition from agreed scope to isolated execution. It instructs the agent to create a detached worktree from the current main branch, perform implementation without intermediate commits, replay changes onto the latest main, and produce a single local commit ready for a pull request draft. The skill enforces strict boundaries: it never pushes or creates PRs, preserves user-owned changes, and requires a final validation step using a shipped-path manifest and a dedicated validation script to ensure repository cleanliness and correct commit topology before handoff.
.agents/skills/implementation-kickoff · high confidence
New MCP Manager example with FastAPI and Streamable HTTP transport
Added a new example in \examples/mcp/manager\_example\ that demonstrates using \MCPServerManager\ to manage MCP server lifecycles within a FastAPI application using the Streamable HTTP transport. The example includes a sample MCP server (\mcp\_server.py\) exposing \add\ and \echo\ tools, a FastAPI app (\app.py\) that integrates the manager to handle server connection, health reporting, tool listing, and agent execution, and a smoke test (\smoke\_test.py\) to verify the integration. The example supports toggling the manager on or off via the \USE\_MCP\_MANAGER\ environment variable and includes a \/reconnect\ endpoint for recovering failed servers when the manager is active.
_examples/mcp/manager\example · high confidence
New MCP examples demonstrating tool filtering and human-in-the-loop workflows
Added Python example scripts for the \examples/mcp\ directory that demonstrate advanced Model Context Protocol (MCP) usage. The \get\_all\_mcp\_tools\_example\ shows how to prefetch all available tools using \MCPUtil.get\_all\_function\_tools\, apply a static tool filter to restrict available capabilities, and handle human-in-the-loop (HITL) interruptions by prompting for approval on specific tool calls. The \tool\_filter\_example\ illustrates how to configure an MCP server with a static tool filter to block specific tools (like file writing) and automatically approve or reject interruptions during agent execution.
_examples/mcp/get\_all\_mcp\_tools\_example, examples/mcp/tool\_filter\example · high confidence
New MCP prompt server example for dynamic agent configuration
Added a new example in \examples/mcp/prompt\_server\ that demonstrates how to use MCP prompts to dynamically generate agent instructions. The example includes a local MCP server (\server.py\) exposing a \generate\_code\_review\_instructions\ prompt, a client script (\main.py\) that discovers available prompts and uses user-selected parameters to configure an agent, and documentation (\README.md\) explaining the workflow. This allows users to control agent behavior through external prompt definitions rather than hardcoded instructions.
_examples/mcp/prompt\server · high confidence
New NASA Spending Text-to-SQL Agent example with Daytona sandbox
Added a new example agent that translates natural-language questions about NASA federal spending into SQL queries against a local SQLite database. The agent runs inside a Daytona sandbox and includes a custom SqlCapability with read-only guardrails (statement validation, row limits, timeouts), multi-turn conversation support with context compaction, and persistent memory across sessions. The example also includes a setup script to download and build the USAspending dataset and an audit log for debugging.
_examples/sandbox/extensions/daytona/usaspending\text2sql · high confidence
New Realtime CLI demo with barge-in support
Added a new command-line demo (examples/realtime/cli/demo.py) that demonstrates the Realtime API capabilities. The demo features a RealtimeAgent with a tool for weather lookups and implements a full audio pipeline using sounddevice. It includes logic for handling audio input/output, managing a jitter buffer to prevent choppiness, and supporting barge-in (interruption) with a fade-out effect to avoid audio clicks when the user interrupts the assistant.
examples/realtime/cli · high confidence
New Realtime Voice Assistant Demo with Human-in-the-Loop Approvals
A new web-based realtime voice assistant demo is available in examples/realtime/app, featuring a FastAPI backend and a vanilla JavaScript frontend. The demo supports real-time audio capture and playback, image inputs, and multi-agent handoffs (triage, FAQ, and seat booking). A key feature is human-in-the-loop support: tool calls marked with needs\_approval=True (such as updating a seat) trigger a browser confirmation dialog, allowing users to approve or deny actions before they execute. The demo is strictly bounded for local use, binding to 127.0.0.1 with limits on session count, message size, and audio/image data, and includes tests to ensure tool outputs are rendered as safe text and that approval dialogs cannot be bypassed.
examples/realtime · high confidence
New Streamable HTTP MCP example
Added a new example in \examples/mcp/streamablehttp\_example\ that demonstrates using the \MCPServerStreamableHttp\ class to connect an agent to a local MCP server over Streamable HTTP. The example includes a client script (\main.py\) that automatically selects a localhost port and runs tools like \add\, \get\_weather\, and \get\_secret\_word\, alongside a local server script (\server.py\) that implements these tools and runs via the \streamable-http\ transport.
_examples/mcp/streamablehttp\example · high confidence
New Temporal Sandbox Agent example with multi-backend support and TUI
Added a new example in \examples/sandbox/extensions/temporal\ that demonstrates a conversational coding agent running as a durable Temporal workflow. The example includes a Textual-based TUI for managing agent sessions, a minimal local smoke test (\local\_hello\_workflow.py\) for quick verification, and a \justfile\ to simplify running the worker and UI. The agent supports multiple sandbox backends (local Unix, Docker, Daytona, E2B) and allows users to switch or fork sessions within the TUI.
examples/sandbox/extensions/temporal · high confidence
New Twilio Realtime Voice Example
This location introduces a complete example for connecting the OpenAI Realtime API to phone calls via Twilio Media Streams. The \server.py\ file implements a FastAPI application that authenticates incoming Twilio webhooks and WebSocket connections using signature verification, enforces specific payload size limits, and serves TwiML to initiate audio streams. The \twilio\_handler.py\ file provides the core logic to bridge Twilio's G.711 μ-law audio with the OpenAI Realtime API, featuring a \RealtimeAgent\ configured with \gpt-realtime-2.1\, tool support for weather and time queries, and a startup buffering mechanism to mitigate initial audio jitter. The \README.md\ documents the prerequisites, setup steps involving tunneling services like ngrok, and configuration options for the integration.
examples/realtime/twilio · high confidence
New agent graph visualization and enhanced handoff filtering
The \src/agents/extensions\ module now includes a new \visualization.py\ file that generates DOT-format graphs of agent structures using Graphviz, supporting nodes for agents, tools, MCP servers, and handoffs with proper escaping and ID generation. Additionally, the \handoff\_filters.py\ module has been updated to preserve \input\_items\ in the \remove\_all\_tools\ filter to prevent data loss during chained operations, and expanded to filter out a wider range of tool-related item types (including MCP, reasoning, and custom tool calls) from handoff history.
src/agents/extensions · high confidence
New agent pattern examples: streaming tools, hosted multi-agent, and human-in-the-loop
The examples/agent\_patterns directory now includes new demonstration scripts for advanced orchestration patterns. agents\_as\_tools\_streaming.py shows how to use Agent.as\_tool() with on\_stream to capture nested agent events. hosted\_multi\_agent\_beta.py demonstrates using OpenAIHostedMultiAgentModel to coordinate server-hosted subagents. The human-in-the-loop examples (human\_in\_the\_loop.py, human\_in\_the\_loop\_stream.py, human\_in\_the\_loop\_custom\_rejection.py) illustrate tool approval workflows, including state serialization, streaming support, and custom rejection messages via tool\_error\_formatter. The README has been updated to document these new patterns alongside existing ones.
_examples/agent\patterns · high confidence
New cloud storage mount providers and credential redaction
Sandbox agents can now mount files from Azure Blob Storage, Box, Google Cloud Storage (GCS), Cloudflare R2, and Amazon S3 (including S3 Files). This change introduces provider-specific mount classes that translate credentials into runtime configurations for both in-container patterns (via rclone or Mountpoint) and Docker volume drivers. To protect sensitive data, mount lifecycle errors are now automatically redacted to prevent credentials from leaking into logs or error messages.
src/agents/sandbox/entries/mounts · high confidence
New example demonstrating custom HTTP client configuration for MCP StreamableHTTP
Added a new example in \examples/mcp/streamablehttp\_custom\_client\_example\ that shows how to use the \httpx\_client\_factory\ parameter in \MCPServerStreamableHttp\ to configure custom HTTP client behavior, including SSL settings, custom headers, timeouts, and proxy configurations.
_examples/mcp/streamablehttp\_custom\_client\example · high confidence
New examples for accessing model reasoning content
Added a new \examples/reasoning\_content\ directory containing sample scripts (\main.py\, \runner\_example.py\, \gpt\_oss\_stream.py\) that demonstrate how to access and display reasoning summaries and deltas from models like gpt-5.6 and gpt-oss-20b. These examples show how to configure \ModelSettings\ with \Reasoning\ parameters and extract reasoning data from both streaming and non-streaming responses using the Runner API and low-level model interfaces.
_examples/reasoning\content · high confidence
New examples for custom and third-party model providers
Added example scripts and documentation in the \examples/model\_providers\ directory demonstrating how to route agents through adapter layers like LiteLLM and any-llm, as well as how to configure custom OpenAI-compatible providers. Users can now see how to use \AnyLLMModel\ and \LitellmModel\ for third-party routing, and how to set up custom providers either globally via \set\_default\_openai\_client\ or per-run via \RunConfig\.
_examples/model\providers · high confidence
New healthcare support sandbox example demonstrating agent orchestration and sandboxed policy review
A new synthetic healthcare support workflow example has been added to \examples/sandbox/healthcare\_support\. It demonstrates a multi-agent architecture where a standard orchestrator coordinates a benefits subagent and a sandbox policy agent. The sandbox agent operates in an isolated workspace with shell, filesystem, and lazy-loaded skill capabilities to search local policy documents and generate structured artifacts. The example includes a CLI entry point, several predefined scenarios (such as eligibility verification and prior-auth confusion), synthetic patient and payer fixture data, and supports human-in-the-loop approvals and persistent SQLite memory across runs.
_examples/sandbox/healthcare\support · high confidence
New hosted MCP examples with human-in-the-loop support
The examples/hosted\_mcp directory now includes new example scripts demonstrating how to use the HostedMCPTool with the OpenAI Responses API. The simple.py and connectors.py examples show basic usage with approval disabled, while human\_in\_the\_loop.py and on\_approval.py introduce human-in-the-loop capabilities, allowing users to approve or reject tool executions via interruption handling and custom approval callbacks.
_examples/hosted\mcp · high confidence
New implementation-final-review skill for validating review packets and state
Added a new \implementation-final-review\ skill that introduces scripts to validate final-review packets, reviewer outputs, and verification receipts. The \review\_protocol.py\ script enforces strict schema validation for packet fields, reviewer findings, and inventory data, ensuring that review artifacts contain required evidence and conform to expected structures. The \review\_state.py\ script (tested in \test\_review\_state.py\) captures repository state, computes content fingerprints, and handles edge cases like special files and concurrent modifications. Comprehensive tests in \test\_review\_protocol.py\ and \test\_review\_state.py\ verify the validation logic, fingerprinting accuracy, and error handling for malformed inputs.
.agents/skills/implementation-final-review/scripts · high confidence
New manual validation examples for cloud sandbox backends
Added a new \examples/sandbox/extensions\ directory containing dedicated runner scripts and documentation for manually verifying cloud sandbox backends. The new examples cover E2B, Modal, Cloudflare, Blaxel, and Vercel, each demonstrating core capabilities such as standard agent runs, streaming output, PTY interactive sessions, snapshot stop/resume round-trips, and native cloud bucket mounts (e.g., R2, S3, GCS). These scripts allow contributors to validate backend behavior locally by installing the corresponding optional repository extra (e.g., \uv sync --extra e2b\) and providing the necessary provider credentials.
examples/sandbox/extensions · high confidence
New model providers for any-llm and LiteLLM integration
Users can now route model calls through third-party aggregators by using the new AnyLLMProvider and LiteLLMProvider classes. The AnyLLMProvider supports routing via either the 'responses' or 'chat\_completions' API and allows explicit configuration of API keys and base URLs, defaulting to the system's configured default model. The LiteLLMProvider provides a simpler interface that relies on environment variables for provider credentials and configuration, defaulting to the gpt-4.1 model. Both providers implement the standard ModelProvider interface, allowing them to be passed directly to the Runner's run\_config.
src/agents/extensions/models · high confidence
New optional session backends in the memory extensions package
The \src/agents/extensions/memory\ package now provides several optional, production-grade session storage backends that implement the \Session\ protocol as drop-in replacements for the built-in \SQLiteSession\. These include \AdvancedSQLiteSession\ (with conversation branching and usage analytics), \AsyncSQLiteSession\ (async SQLite via \aiosqlite\), \SQLAlchemySession\ (async support for PostgreSQL, MySQL, and SQLite via SQLAlchemy), \MongoDBSession\ (async MongoDB via \pymongo\), \RedisSession\ (distributed memory via \redis\), \DaprSession\ (state store via \dapr\), and \EncryptedSession\ (transparent encryption wrapper using \cryptography\). All backends are lazily imported to avoid requiring their respective third-party dependencies unless explicitly used, and each raises a clear installation hint when the optional package is missing.
src/agents/extensions/memory · high confidence
New sandbox example utilities and capabilities
Added new files in examples/sandbox/misc to support sandbox-based agent examples. This includes example\_support.py with helper functions for creating manifests and parsing tool call names, a reference MCP server (reference\_policy\_mcp\_server.py) demonstrating policy lookup tools, and two new sandbox capabilities: WorkspaceApplyPatchCapability for applying text patches to files and WorkspaceShellCapability for executing shell commands within the sandbox workspace.
examples/sandbox/misc · high confidence
New sandbox examples and documentation
Added a comprehensive set of sandbox examples and a README guide covering basic usage, agent handoffs, memory management (local, S3-backed, and multi-agent), remote snapshots, and cloud backends (Daytona, Runloop). The examples demonstrate how to configure sandbox agents with workspace capabilities, use memory layouts for persistent state across sessions, and integrate with external sandbox providers.
examples/sandbox · high confidence
New sandbox extension module with multi-provider cloud bucket mounts
The \src/agents/extensions/sandbox\ package is introduced, providing a unified entry point and dedicated submodules for E2B, Modal, Daytona, Blaxel, Cloudflare, and Vercel sandbox backends. This adds the capability to mount S3, R2, and GCS cloud storage buckets inside these sandboxes using provider-specific strategies (e.g., FUSE/rclone for E2B/Daytona, native APIs for Modal/Cloudflare/Vercel). The module also includes a shared \rclone\ installer that pins version 1.74.4 and verifies its SHA-256 checksum, ensuring consistent and secure tool provisioning across supported environments.
src/agents/extensions/sandbox · high confidence
New sandbox tutorial examples for financial extraction, code review, and vision tasks
Added a suite of new sandbox tutorial examples in \examples/sandbox/tutorials/\ that demonstrate agent workflows using the \SandboxAgent\ API. These include a dataroom metric extraction demo that parses synthetic 10-K financial data into structured CSV/JSONL artifacts, a dataroom Q&A demo for grounded financial queries with source citations, a repo code review demo that inspects git repositories and generates review findings and patches, a sandbox resume demo showing session serialization and resumption, and a vision website clone demo that uses the \view\_image\ tool and lazy-loaded Playwright skills to reproduce UI screenshots. A shared Dockerfile for the tutorial environment and synthetic fixture generators for the dataroom data are also included.
examples/sandbox/tutorials · high confidence
New session storage examples and capabilities
Added comprehensive examples for new session storage backends and features: AdvancedSQLiteSession with conversation branching and usage tracking, OpenAI responses.compaction (including stateless mode), Dapr-backed sessions, encrypted sessions, and file-backed sessions. Also included Human-in-the-Loop (HITL) examples for file, memory, and OpenAI sessions, plus MongoDB and Redis session examples.
examples/memory · high confidence
New tool examples for shell, code interpreter, image generation, and Codex
The examples/tools directory now includes new demonstration scripts for several capabilities: apply\_patch.py shows file editing with an approval tracker; code\_interpreter.py demonstrates numeric problem solving; image\_generator.py illustrates image creation with platform-specific file opening; container\_shell\_inline\_skill.py and container\_shell\_skill\_reference.py show shell tools with inline and reference skills; local\_shell\_skill.py demonstrates local skills with approval; shell.py and shell\_human\_in\_the\_loop.py provide host shell execution with interactive approval and HITL support; codex.py and codex\_same\_thread.py showcase the experimental Codex tool with streaming and thread reuse; tool\_search.py demonstrates namespaced tool search; and web\_search\_filters.py shows domain-filtered web search. The computer\_use.py example was updated to use environment variables for configuration and includes a demo page.
examples/tools · high confidence
New utility module for agent runtime helpers
A new \src/agents/util\ package has been introduced to centralize runtime support logic. This includes \\_approvals.py\ for evaluating tool approval policies and parsing arguments, \\_asyncio\_tasks.py\ for managing concurrent task lifecycles and cancellation, \\_custom\_data.py\ for extracting and normalizing custom tool output data, and \\_error\_tracing.py\ for recording model and tool errors on spans with sensitive data redaction. Additionally, it provides \\_json.py\ for strict JSON validation, \\_pretty\_print.py\ for formatting run results and errors, \\_transforms.py\ for normalizing tool names, and \\_types.py\ for shared type definitions.
src/agents/util · high confidence
Sandbox implementation with secure file operations and opt-in Docker removal protection
The sandbox package now provides concrete session and client implementations for Docker and local Unix environments. For UnixLocal sandboxes, file operations are implemented using descriptor-relative I/O to prevent symlink races and enforce path grants during recursive removals, while also handling case-only renames and rejecting special files. On Windows, UnixLocal support is disabled. For Docker, an opt-in removal service is introduced that allows trusted, host-side recursive removal of containers with bounded resource limits (concurrency, entry visits, CPU time) and specific eligibility checks, ensuring that removals are safe and controlled.
src/agents/sandbox/sandboxes · high confidence
Tracing subsystem refactored with new span types and provider abstraction
The tracing module has been restructured to support a pluggable provider architecture, replacing the previous global singleton with a lazily-initialized \TraceProvider\ that can be swapped via \set\_trace\_provider\. This change introduces new \TaskSpanData\ and \TurnSpanData\ types to explicitly track runner invocations and agent loop turns, and adds \mcp\_data\ to \FunctionSpanData\ for MCP tool integration. The \BackendSpanExporter\ now groups exports by API key, supports per-run API keys, and uses \httpx2\ for HTTP requests. Additionally, a public \flush\_traces()\ API is exposed to force immediate export of buffered traces, and the \TracingConfig\ TypedDict allows users to configure whether task and turn spans are included.
src/agents/tracing · high confidence
Architecture
Internal refactoring of the agent run pipeline
The internal execution logic for the agent run pipeline has been reorganized into the new \src/agents/run\_internal\ package. This change extracts private execution-time utilities—such as run-loop orchestration, session persistence, guardrail handling, approval coordination, and error handling—into dedicated modules, while keeping public-facing APIs like \RunConfig\ and \RunOptions\ at the top level. This structural shift improves code organization and maintainability without altering the public SDK surface area.
_src/agents/run\internal · high confidence
Behavioural changes
2 commits (0 fixes) modifying examples/research\_bot/agents/\_\_pycache\_\_
A change to existing behaviour in examples/research\bot/agents/\\pycache\\_ — 2 commits, 7 files: “update gitignore, pycache”; “Initial commit”.
_examples/research\bot/\\pycache\\_, examples/research\bot/agents/\\pycache\\_ · medium confidence · unverified_
Agents SDK major refactor and new capabilities
The \src/agents\ module has been significantly restructured and expanded. The core execution engine has been rewritten (replacing \\_run\_impl.py\), introducing stable agent graph identities, improved tool invocation tracking, and better handling of agent identity during execution. New public APIs include a REPL demo loop (\run\_demo\loop\), a dedicated WebSocket session helper for the OpenAI Responses API (\ResponsesWebSocketSession\), and support for programmatic tool calling. The SDK now exposes comprehensive guardrail support (input, output, and tool-level), configurable model retry policies, and new tool types such as \LocalShellTool\, \CodeInterpreterTool\, \ImageGenerationTool\, and \HostedMCPTool\. Configuration has been enhanced with coercion helpers for dataclass and Pydantic settings, and the \Computer\ interface now supports optional preview metadata. The public interface (\\\init\\_.py\) has been updated to export these new components, including new stream events, error types, and session management classes.
src/agents · high confidence
Code-change-verification script now runs lint, typecheck, and tests in parallel
The verification scripts in \.agents/skills/code-change-verification/scripts\ have been updated to execute \make lint\, \make typecheck\, and \make tests\ concurrently rather than sequentially. The PowerShell script (\run.ps1\) now launches these three steps in parallel, monitors their progress with configurable heartbeats, and captures stdout/stderr logs for debugging, while the Bash script (\run.sh\) has been rewritten to use background jobs and process groups to achieve the same parallel execution. This change reduces the total time required for code-change verification by overlapping these independent checks.
.agents/skills/code-change-verification/scripts · high confidence
Handoff examples updated for GPT-5 compatibility and decorator migration
The handoff examples now use the new @tool decorator instead of the deprecated @function\_tool. Additionally, the message filtering logic has been updated to skip history filtering when GPT-5 is enabled, as removing items can break functionality for that model. The examples also correct a bug where the wrong agent was invoked for random number generation and fix minor typos in user prompts.
examples/handoffs · high confidence
Introduces structured retry, WebSocket, and tracing infrastructure for model providers
The \src/agents/models\ package now includes dedicated modules for handling provider-level reliability and observability. A new retry system (\\_openai\_retry.py\, \\_retry\_runtime.py\) provides granular, context-aware retry advice for OpenAI errors, distinguishing between safe and unsafe replays based on headers and error types. WebSocket support for the OpenAI Responses API is formalized via \\_openai\_websocket.py\, which handles client credential refresh and header merging for secure handshakes. Additionally, \\_response\_terminal.py\ standardizes error formatting for terminal stream events, while \\_trace.py\ and \\_run\_context.py\ enhance observability by sanitizing URLs in traces and managing deterministic stream cleanup via context variables.
src/agents/models · high confidence
Research bot agents updated to GPT-5.6 and GPT-5-mini with reasoning settings
The example research bot agents now use newer model defaults: the PlannerAgent and SearchAgent have been switched to 'gpt-5.6-sol', while the WriterAgent now uses 'gpt-5-mini'. Additionally, the PlannerAgent and WriterAgent are configured with explicit ModelSettings enabling reasoning with medium effort, whereas the SearchAgent no longer enforces required tool choice. These changes update the underlying AI models and their configuration for the research workflow.
_examples/research\bot/agents · high confidence
Research bot example: auto-run support, trace URL fix, and search status updates
The research bot example now supports auto-runs by importing and using \input\_with\_fallback\ to provide a default query if no input is given. The trace link in the manager has been corrected to point to the new OpenAI logs URL (\/logs/trace\) instead of the old \/traces\ path. Additionally, the web search progress reporting has been enhanced to show real-time success/failure counts during execution and a final summary of succeeded versus failed searches.
_examples/research\bot · high confidence
Fixes
Fix nested handoff history management and summarization
The nested handoff history logic in \src/agents/handoffs/history.py\ has been fixed to correctly partition ownership of history items, preserve empty turns, and filter reasoning items from nested handoff inputs. The implementation now ensures that programmatic transcripts are summarized appropriately during nested handoffs while keeping sensitive data intact, and it deduplicates nested handoff inputs to prevent redundant processing. Additionally, user messages containing history wrappers are now preserved correctly, and the system defaults to nesting handoff history for better context management.
src/agents/handoffs · high confidence
Test coverage
5 commits adding/updating tests in tests/docs; Added comprehensive test suite for the Voice Pipeline; Added comprehensive test suites for memory session backends; Added comprehensive tests for tracing initialization, scope management, and data export; Added deterministic test utilities for agents SDK workflows; Added test coverage for sandbox capabilities; Added test infrastructure for MCP server functionality; Added test utilities for factories, HITL scenarios, and session implementations; Added tests for FastAPI streaming context handling; Added tests for ModelSettings serialization and configuration resolution; Added tests for hosted multi-agent beta support; Added tests for local release candidate preparation; Added tests for memory compaction and session management; Added tests for the ToolOutputTrimmer extension; Added tests for the experimental Codex extension; Added tests for the sensitive-logging-audit inventory collector; Expanded RunState schema compatibility tests; Expanded test coverage for model providers and agent registration; Expanded test coverage for sandbox provider extensions; Expanded test coverage for sandbox subsystems; Packaged integration tests for release validation and security; Realtime test suite reorganized into responsibility-based modules; Removal of example files from tests directory; Removed duplicated test source files.
Dependencies
OpenAI Agents SDK v0.23.1: Major dependency upgrades and Python 3.14 support
The SDK has been updated to version 0.23.1, raising the minimum Python requirement from 3.9 to 3.10 and adding support for Python 3.14. The core OpenAI client dependency has been upgraded from the 1.x series to the 3.x series (\>=3.0.0,\<4), and Pydantic has been bumped to \>=2.12.2. New optional dependencies have been introduced for voice (numpy, websockets), visualization (graphviz), LiteLLM integration, and support for any-LLM models. Security hardening is evident through the addition of explicit version floors for transitive dependencies like httpx2, pyjwt, and urllib3, alongside a significant expansion of optional extras for session backends (Redis, MongoDB, SQLAlchemy, Dapr) and sandbox providers (Modal, Vercel, E2B, Daytona).
(dependencies) · high confidence
Housekeeping
Removal of legacy egg-info build artifacts
The repository has removed the \src/openai\_agents.egg-info\ directory, including \PKG-INFO\, \SOURCES.txt\, \requires.txt\, and \top\_level.txt\. These files are generated build artifacts from the legacy \setuptools\ egg format and are no longer needed, likely as the project has standardized on modern Python packaging standards (such as \pyproject.toml\), resulting in a cleaner source tree.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 67 → 67 (+0.1)
- Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 74 → 73 (-1.3)
- Architecture 89 → 91 (+1.7)
- Maturity 76 → 79 (+2.4)
- Readiness 81 → 85 (+4.7)
- Security 91 → 84 (-6.7)
- Domain Modelling 54 → 54 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (39)
- Duplicated block (10 lines × 2) (src/agents/sandbox/entries/mounts/providers/s3.py)
- Duplicated block (13 lines × 2) (examples/memory/hitl_session_scenario.py)
- Duplicated block (16 lines × 2) (examples/sandbox/extensions/blaxel_runner.py)
- Duplicated block (16–25 lines × 3) (examples/memory/advanced_sqlite_session_example.py)
- Duplicated block (18 lines × 2) (src/agents/run_internal/guardrails.py)
- Duplicated block (19 lines × 2) (integration_tests/_contract_surface.py)
- Duplicated block (20 lines × 2) (src/agents/realtime/openai_realtime.py)
- Duplicated block (5 lines × 3) (src/agents/extensions/sandbox/blaxel/mounts.py)
- Duplicated block (7 lines × 2) (.agents/skills/release-candidate-prep/scripts/prepare.py)
- Duplicated block (9 lines × 2) (src/agents/memory/openai_responses_compaction_session.py)
- Duplicated block (9 lines × 2) (src/agents/models/openai_chatcompletions.py)
- Duplicated block (9 lines × 2) (src/agents/realtime/session.py)
- Hotspot: .agents/skills/implementation-final-review/scripts/review_protocol.py (.agents/skills/implementation-final-review/scripts/review_protocol.py)
- Hotspot: .agents/skills/implementation-final-review/scripts/review_state.py (.agents/skills/implementation-final-review/scripts/review_state.py)
- Hotspot: .agents/skills/implementation-kickoff/scripts/validate_handoff.py (.agents/skills/implementation-kickoff/scripts/validate_handoff.py)
- Hotspot: src/agents/_tool_invocation.py (src/agents/_tool_invocation.py)
- Hotspot: src/agents/extensions/memory/encrypt_session.py (src/agents/extensions/memory/encrypt_session.py)
- Hotspot: src/agents/extensions/sandbox/modal/sandbox.py (src/agents/extensions/sandbox/modal/sandbox.py)
- Hotspot: src/agents/extensions/sandbox/vercel/sandbox.py (src/agents/extensions/sandbox/vercel/sandbox.py)
- Hotspot: src/agents/mcp/util.py (src/agents/mcp/util.py)
- …and 19 more
New (136)
- Converter.convert_tool_choice (cyclomatic 18) (src/agents/models/openai_responses.py)
- Duplicated block (18 lines × 2) (src/agents/run.py)
- Edited copies of one member (3 members, 10+ corresponding lines) (src/agents/extensions/sandbox/blaxel/sandbox.py)
- Edited copies of one member (3 members, 11+ corresponding lines) (src/agents/extensions/experimental/codex/codex_options.py)
- Edited copies of one member (3 members, 12+ corresponding lines) (src/agents/extensions/sandbox/daytona/sandbox.py)
- Edited copies of one member (3 members, 13+ corresponding lines) (examples/sandbox/docs/coding_task.py)
- Edited copies of one member (3 members, 13+ corresponding lines) (src/agents/sandbox/entries/mounts/base.py)
- Edited copies of one member (3 members, 14+ corresponding lines) (src/agents/sandbox/session/base_sandbox_session.py)
- Edited copies of one member (3 members, 15+ corresponding lines) (src/agents/agent_tool_state.py)
- Edited copies of one member (3 members, 15+ corresponding lines) (src/agents/realtime/openai_realtime.py)
- Edited copies of one member (3 members, 22+ corresponding lines) (src/agents/extensions/sandbox/blaxel/sandbox.py)
- Edited copies of one member (3 members, 5+ corresponding lines) (examples/sandbox/misc/workspace_apply_patch.py)
- Edited copies of one member (3 members, 72+ corresponding lines) (src/agents/extensions/memory/advanced_sqlite_session.py)
- Edited copies of one member (4 members, 12+ corresponding lines) (src/agents/extensions/sandbox/daytona/mounts.py)
- Edited copies of one member (4 members, 19+ corresponding lines) (src/agents/run_internal/tool_execution.py)
- Edited copy of a member (10 corresponding lines) (docs/scripts/translate_docs.py)
- Edited copy of a member (10 corresponding lines) (src/agents/extensions/sandbox/blaxel/mounts.py)
- Edited copy of a member (10 corresponding lines) (src/agents/models/openai_responses.py)
- Edited copy of a member (10 corresponding lines) (src/agents/models/openai_responses.py)
- Edited copy of a member (11 corresponding lines) (examples/run_examples.py)
- …and 116 more
Changes since last survey
- 34 commits — 4 feature/other, 30 fixes
By area
- src/agents — 13 commits
- examples/realtime — 7 commits
- .github/workflows — 5 commits
- (root) — 3 commits
- tests/mcp — 2 commits
- docs/agents.md — 1 commit
- docs/ja — 1 commit
- examples/memory — 1 commit
- tests/fixtures — 1 commit
Notable commits
- fix: fix(deps): bump actions/create-github-app-token from 3.2.0 to 3.3.0 (#5464)
- fix: fix(deps): bump actions/download-artifact from 8.0.1 to 8.0.2 (#5466)
- fix: fix(deps): bump actions/setup-python from 7.0.0 to 7.1.0 (#5465)
- fix: fix(deps): bump astral-sh/setup-uv from 10.2.0 to 10.3.2 (#5463)
- fix: fix(deps): bump daytona from 0.155.0 to 0.226.1 (#5487)
- fix: fix(deps): bump the codeql group with 2 updates (#5462)
- fix: fix(deps): update fastapi requirement from >=0.150.0 to >=0.162.0 in /examples/realtime/twilio_sip (#5482)
- fix: fix(deps): update httpx2 requirement from >=2.15.1 to >=2.16.0 in /examples/realtime/twilio (#5478)
- fix: fix(deps): update httpx2 requirement from >=2.15.1 to >=2.16.0 in /examples/realtime/twilio_sip (#5483)
- fix: fix(deps): update openai requirement from <4,>=3.35.1 to >=3.39.0,<4 in /examples/realtime/twilio_sip (#5480)
- fix: fix(deps): update python-multipart requirement from >=0.0.32 to >=0.0.33 in /examples/realtime/twilio (#5706)
- fix: fix(deps): update starlette requirement from >=1.9.0 to >=1.10.0 in /examples/realtime/twilio (#5479)
- fix: fix(deps): update starlette requirement from >=1.9.0 to >=1.10.0 in /examples/realtime/twilio_sip (#5481)
- fix: fix(deps-dev): bump pytest from 9.0.3 to 9.2.0 (#5710)
- fix: fix(deps-dev): bump twilio from 9.11.1 to 9.12.0 (#5486)
- fix: fix(deps-dev): bump websockets from 15.0.1 to 16.1.1 (#5484)
- fix: fix(sessions): bounded session replay and isolate the Cloudflare mount test (#5637)
- fix: fix: Responses tool choice for functions named after hosted tools (#5639)
- fix: fix: allow concurrent Streamable HTTP requests on MCP v2 (#5641)
- fix: fix: preserve append order in SQLAlchemy sessions (#5645)
- …and 14 more
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
openai/openai-agents-python was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 16 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 64fbde5d02b42ae5f9db668eb0184cdb3fc9d775 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.73+preprod-52de90b74216.