Repository navigation
[Agents] Update docs for Agents SDK 0.34.0 and Pi 1.6 - #35498
Merged
Merged
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://agents-pi-1-6-docs.previews.developers.cloudflare.com (commit 3276e31)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Contributor
ben-reitz
marked this pull request as ready for review
November 20, 2026 21:03
ben-reitz
requested review from
a team,
ethulia,
irvinebroque,
kathayl,
kflansburg,
mattrothenberg,
mchenco,
oiricaud,
rita3ko,
shridharathi,
superhighfives,
thomasgauvin,
vy-ton and
zeke
as code owners
November 20, 2026 21:03
Contributor
AI Review✅ Reviewed Resolved (2) · Dismissed (0)
Commands
|
irvinebroque
approved these changes
Nov 21, 2026
|
|
||
| ## Tools that wait | ||
|
|
||
| - **Park until a signal or a deadline.** A tool can return a park instead of a result, and Pi runs it again when a signal arrives or the deadline passes. While it waits, the call holds no invocation, so the Durable Object can hibernate. Deliver signals with the new `harness.signal()`. Refer to [Tools that wait](/agents/harnesses/pi/#tools-that-wait). |
Contributor
There was a problem hiding this comment.
Suggested change
| - **Park until a signal or a deadline.** A tool can return a park instead of a result, and Pi runs it again when a signal arrives or the deadline passes. While it waits, the call holds no invocation, so the Durable Object can hibernate. Deliver signals with the new `harness.signal()`. Refer to [Tools that wait](/agents/harnesses/pi/#tools-that-wait). | |
| - **Park until a signal or a deadline.** A tool can return a "ToolPark" instead of a result, and Pi runs it again when a signal arrives or the deadline passes. While it waits, the call holds no invocation, so the Durable Object can hibernate. Deliver signals with the new `harness.signal()`. Refer to [Tools that wait](/agents/harnesses/pi/#tools-that-wait). |
|
|
||
| ## Tools that wait | ||
|
|
||
| A Pi tool can park instead of returning a result: it returns `{ sleep: { signals, until } }`, and Pi runs it again when one of the signals arrives or the deadline passes. While the call waits, it holds no invocation, so the Durable Object can hibernate or be evicted. Deliver a signal with `harness.signal()`, for example from the request that carries a person's answer: |
Contributor
There was a problem hiding this comment.
Suggested change
| A Pi tool can park instead of returning a result: it returns `{ sleep: { signals, until } }`, and Pi runs it again when one of the signals arrives or the deadline passes. While the call waits, it holds no invocation, so the Durable Object can hibernate or be evicted. Deliver a signal with `harness.signal()`, for example from the request that carries a person's answer: | |
| A Pi tool can "park" instead of returning a result: it returns `{ sleep: { signals, until } }`, and Pi runs it again when one of the signals arrives or the deadline passes. While the call waits, it holds no invocation, so the Durable Object can hibernate or be evicted. Deliver a signal with `harness.signal()`, for example from the request that carries a person's answer: |
irvinebroque
left a comment
Contributor
There was a problem hiding this comment.
Merging so that we get this out there
The "park" concept going to be very new to many and feels like the kind of thing we will need to maybe put some thought into visualizing or explaining more about
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the Agents docs for Agents SDK v0.34.0, which moves
PiHarnessto Pi 1.6, and adds a changelog entry for the release.Existing users may need to change code: Pi 1.5 can't run a conversation's tool calls or model requests once Pi 1.6 has run it, signals should go through
harness.signal(), a failed MCP server now stays failed untilreconnectMcpServer(id), and failed requests no longer send error details unlessonFetchError()chooses to.agents/harnesses/pi/harness.root()withagentandinit, "Seed a session with an existing history", "Tools that wait" and "Wait for a subagent" (harness.signal(),notify),onAbort: "keep",harness.pi()caveats, recovery of signal-parked calls, approvals limitation now points tobeforeToolgatesagents/harnesses/pi/extensions/beforeToolgates,Extension.namespacefor code modeagents/models/pi-ai/,ai-gateway/integrations/pi-ai/,workers-ai/configuration/pi-ai/,partials/agents/pi-install~1.6.0. pi-ai page also covers Anthropic message threads and FLUX.2 image modelsagents/models/ai-sdk/agents/tools/web-fetch/,agents/tools/web-search/agents/runtime/lifecycle/,agents/runtime/lifecycle/api-reference/,agents/agent-class/,agents/agent-class/internals/,agents/agent-class/websockets/,agents/runtime/capabilities/websockets/onFetchError(), detail-free500and1011defaults, howonErrorand sub-agents route failures, no messages run on a connection the host closedagents/model-context-protocol/apis/client-api/,.../guides/oauth-mcp-client/,agents/runtime/capabilities/mcp-client-manager/,agents/agent-class/retries/reconnectMcpServer(), which failures count as refused, re-authorization withMCPAuthorizationRequiredError,addMcpServer()on an existing server, background restore, Reconnect button replaces remove-then-addagents/harnesses/think/tools/WorkerJavaScriptBackendandws:*modules becomeCodemodeBackendandcodemode:*agents/harnesses/claude-code/claude-sonnet-5-5The second commit replaces the Workers AI models retired on November 20, 2026 (Kimi K2.6 and K2.7,
glm-5.3-flash, Llama 4 Scout) in Agents examples on 14 pages, matching the upstream examples.glm-4.7-flashis not retired, so those references are unchanged.Source of truth: the 0.34.0 changelog and the docs in cloudflare/agents, and the Pi Durable 1.6.0 changelog and README.
Documentation checklist