Repository navigation
Agents SDK v0.24.0-alpha.8
Pre-release
Pre-release
·
35 commits
to main
since this release
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. Useinclude_execution_details=Trueto receive full items; receive summaries by default. Live tool observations - Use native Session Realtime APIs from
agents.realtime.native, includingRealtimeAgentConfig(is_tool_enabled=...). Keep retained Classic/v0 Realtime imports underagents.realtime. Native voice · Classic imports - Handle managed function approvals with
FunctionToolApprovalRequestandFunctionToolApprovalDecision. Setrun_input_policy_before_approval=Trueto run the input policy before the approval predicate as well as before execution. ReturnFinishTurn(output)fromtool_batch_completionto 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 withSession.replace_history_suffix(keep_prefix_count=...), and append staged checkpoint input withSessionState.with_appended_pending_input(). Read Unix milliseconds fromStoredTurn.started_at_msandcompleted_at_ms. History APIs · History edits - Use
SQLAlchemySQLiteSessionStorefor an application-owned synchronous SQLite engine, andResponsesSocketFactoryOptionsfor resolved WebSocket connection parameters. Read received logprob data throughTextLogprobsFact,TokenLogprob,TokenLogprobAlternative, andMalformedLogprobsFact, with unchanged serialized record kinds. ImportModelRunOwnerfromagents.modelsandApplicationToolOutputfromagents.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'sprompt_cache_keyto 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 useAgent.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
FunctionToolrequests and preapprovedHttpMCPtools withCustomStorage. 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
strictonfunction_toolormodel_backendonNativeProvider. - For Linux local execution, install
bubblewrapwith a compatiblebwrapin/usr/binor/binand allow sandbox namespace creation. For a Linux Docker executor, supplybwrapin 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
LocalStorageprofiles 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, useNetworkPolicy.allow_all(). On Linux, this also requiresallow_all_unix_sockets=Trueand 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
ChatGPTAppsMCPdeclaration 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. Providerfunction_callandfunction_call_outputrows can accompany a typed record for the same execution. Match nativethread_id,turn_id, andcall_idrather than counting rows or relying on a history cursor'sid. 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 finitemax_bytes, or useJsonlOutboxSinkorHttpProxySinkoutside the workspace for long-lived logs. Usemax_bytes=Noneonly for trusted workloads that need unlimited reads. The sink does not rotate or truncate logs. Workspace sink limits - If you use the
classic-blaxelextra and pin Blaxel, update the pin to0.2.51or 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