github openai/openai-agents-python v0.24.0-alpha.8
Agents SDK v0.24.0-alpha.8

pre-releaseone hour ago

Agents SDK v0.24.0-alpha.8

Highlights

  • Approve Python tool calls before they run. Review the arguments and approve or reject the call. You can remember a decision for the rest of the Session. Managed approval example
  • Connect your own model client. The native tool loop works with async Responses and Chat Completions clients, LiteLLM, AnyLLM, and custom adapters. Application-owned model clients
  • Add Realtime voice to a Session. Use a server WebSocket, connect a browser over WebRTC, or attach to an existing SIP call. Realtime connection options
  • Resume more kinds of work. Save supported pending tool requests and approvals. Request and token budgets keep the usage already spent when you restore a supported checkpoint. Restore a checkpoint with a budget
  • Install on more Linux systems. The preview adds an ARM64 wheel. Both Linux wheels support glibc 2.28 or newer. Preview wheel platform requirements

Added

  • Observe tool-search calls, tool-search results, and hosted MCP approval decisions through ModelOutputItemCompleted. Use include_execution_details=True to receive full items; receive summaries by default. Live tool observations
  • Use native Session Realtime APIs from agents.realtime.native, including RealtimeAgentConfig(is_tool_enabled=...). Keep retained Classic/v0 Realtime imports under agents.realtime. Native voice · Classic imports
  • Handle managed function approvals with FunctionToolApprovalRequest and FunctionToolApprovalDecision. Set run_input_policy_before_approval=True to run the input policy before the approval predicate as well as before execution. Return FinishTurn(output) from tool_batch_completion to propose a final value with output validation and completion checks. Managed approvals · Finish a tool batch
  • Create a remote conversation only when needed with ConversationsHistory.ensure_conversation_id(). Preserve a checked history prefix with Session.replace_history_suffix(keep_prefix_count=...), and append staged checkpoint input with SessionState.with_appended_pending_input(). Read Unix milliseconds from StoredTurn.started_at_ms and completed_at_ms. History APIs · History edits
  • Use SQLAlchemySQLiteSessionStore for an application-owned synchronous SQLite engine, and ResponsesSocketFactoryOptions for resolved WebSocket connection parameters. Read received logprob data through TextLogprobsFact, TokenLogprob, TokenLogprobAlternative, and MalformedLogprobsFact, with unchanged serialized record kinds. Import ModelRunOwner from agents.models and ApplicationToolOutput from agents.state. SQLite storage · Model ownership and socket options · Logprob facts
  • Group prompt-cache routing for fresh Sessions with an explicit TraceOptions.group_id. Keep the saved cache key when restoring a Session. Set a borrowed model adapter's prompt_cache_key to override only that adapter's outgoing key. Treat routing as affinity without a guaranteed cache hit. Prompt-cache routing
  • Route work through native handoffs or call a specialist with Agent.as_tool(). Add input and output guardrails, or use Agent.decide() for a separate typed decision with explicit input. Handoffs · Typed decisions
  • Use standalone Python function tools and select MCP tools by alias. Defer eligible tool schemas with ToolSearch. Function tools also support strict schemas, output schemas, and an option to ignore extra arguments. Python tool declarations · Tool schema discovery
  • Use Redis, MongoDB, SQLAlchemy, or a Dapr Redis state component to store supported root conversations through CustomStorage. Compatible Responses providers also support provider-managed conversation history. Application-owned storage
  • Use ordinary manual FunctionTool requests and preapproved HttpMCP tools with CustomStorage. Suspend a supported manual request and restore into independent memory. To continue through the original backend, use an unchanged checkpoint with one unresolved ordinary manual call. Keep managed function approvals, pending MCP requests, and staged input outside that same-backend restore path. CustomStorage support and checkpoint limits
  • Open read-only execution environments, supply skills, or implement command and patch tools with application callbacks. Callbacks run with the application's permissions. Read-only workspaces · Native skills
  • Set per-request model options for sampling, retries, deadlines, and prompt caching. Request produced items and history from one-shot runs, or opt in to provider reasoning summaries and tool-argument deltas. Model request controls · Streaming and retained history

Changed

  • Native streaming HTTP can negotiate HTTP/2. Buffered Responses continue to use HTTP/1.1.
  • Set NativeProvider(tool_output_token_limit=...) to adjust the approximate tool-result budget for model context. Leave it unset to use the model's default. The setting is separate from the final answer limit. Tool output limit reference

Fixed

  • Reject invalid web-starter request bodies and prompts before admitting work. Reject deeply nested JSON, non-object bodies, and text without valid UTF-8 encoding. Web-starter request validation
  • Wait for confirmed remote command exit during cancellation. Report a failure when the executor acknowledges a stop without confirming exit.
  • Preserve the backing store's configured history limit when a Classic compaction wrapper has no explicit settings. Explicit wrapper and per-run limits still take precedence.
  • Strict Python tools return a retryable error to the model when the original arguments fail validation, before approval or callback execution. A corrected call still goes through approval when required. Function argument validation reference
  • Preserve completed tool results during supported checkpoint restores. Report uncertain calls for reconciliation before reopening local profiles with interrupted child work. Recover after an interruption
  • Preserve accepted model settings and history across supported handoffs and retries. Improve provider error reporting so applications can see where a request failed. Inspect provider response attempts
  • Harden protection for native workspace metadata and credential files. Reduce startup work for simple runs and reuse eligible HTTP connections.

Upgrading from 0.24.0-alpha.7

  • Use the alpha.8 wheel for the features in these notes. Some linked guides still refer to development builds. If an example needs files from the repository, use the revision linked in these notes. Alpha.7 does not accept newer keywords such as strict on function_tool or model_backend on NativeProvider.
  • For Linux local execution, install bubblewrap with a compatible bwrap in /usr/bin or /bin and allow sandbox namespace creation. For a Linux Docker executor, supply bwrap in the container image or executor bundle. Linux executor setup
  • Back up your saved state before upgrading. Alpha.7 supports budgets for live runs. Alpha.8 adds checkpointing for supported pending runs with request or token budgets. The checkpoint saves the requests or tokens already used so they still count after restore. Alpha.7 rejects this new format because it cannot enforce the saved budget. We verified that both versions can reopen idle checkpoints, checkpoints waiting for a manual Python tool reply, and closed LocalStorage profiles on Linux x86-64. These checks used matching app settings and features available in both versions. If alpha.7 cannot reopen your saved state after rollback, restore your pre-upgrade backup. Resume a budgeted checkpoint · Checkpoint restore setup · Reopen a local profile
  • Replace bare "*" entries in network domain rules with exact hosts or scoped patterns such as "*.example.org". To allow outbound public hosts, use NetworkPolicy.allow_all(). On Linux, this also requires allow_all_unix_sockets=True and an executor isolated from host services and other jobs. Explicit network policies remain unsupported on Windows. Network policy and platform limits
  • If you relied on a saved Codex login to enable ChatGPT Apps tools, add the existing ChatGPTAppsMCP declaration to the Agent's tools. Supply the provisioned Apps token, its account ID, and the tool names you want to expose. A saved Codex login now supplies model authentication only. ChatGPT Apps setup
  • If your code reads session.items(), count each execution once. Provider function_call and function_call_output rows can accompany a typed record for the same execution. Match native thread_id, turn_id, and call_id rather than counting rows or relying on a history cursor's id. Recheck saved-history readers and analytics before upgrading. Execution history
  • If you use Classic WorkspaceJsonlSink, choose a log budget before upgrading. Its default is now 8 MiB. Exceeding the existing-file or pending-buffer budget drops pending events and permanently stops that sink; rebinding does not restart it. Create a new sink for a new outbox or a larger finite max_bytes, or use JsonlOutboxSink or HttpProxySink outside the workspace for long-lived logs. Use max_bytes=None only for trusted workloads that need unlimited reads. The sink does not rotate or truncate logs. Workspace sink limits
  • If you use the classic-blaxel extra and pin Blaxel, update the pin to 0.2.51 or newer. Test saved sandbox restoration with your current network and port settings. Blaxel, Cloudflare, Daytona, E2B, Modal, and Vercel can now reject saved settings that conflict with the current policy. Create a fresh sandbox with the required settings instead of relaxing the policy to reuse old state. Blaxel dependency · Example restore-policy check

Release verification

Source: d6a81c997eabdc56108633eb3132fb3907f87d7e.

Built and tested by Tests #43800450653.

Verified fresh installs on all four platforms with CPython 3.10 and 3.14. Installation checks

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

NewReleases is sending notifications on new releases.