Skip to content

[Agents] Update docs for Agents SDK 0.34.0 and Pi 1.6 - #35498

Merged
irvinebroque merged 3 commits into
productionfrom
agents/pi-1-6-docs
Nov 21, 2026
Merged

irvinebroque merged 3 commits into
productionfrom
agents/pi-1-6-docs

Conversation

@ben-reitz

Copy link
Copy Markdown
Contributor

Summary

Updates the Agents docs for Agents SDK v0.34.0, which moves PiHarness to 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 until reconnectMcpServer(id), and failed requests no longer send error details unless onFetchError() chooses to.

Page Change
agents/harnesses/pi/ Pi 1.6 compatibility and rollback warning, root session created on first use, harness.root() with agent and init, "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 to beforeTool gates
agents/harnesses/pi/extensions/ Tools can park, beforeTool gates, Extension.namespace for code mode
agents/models/pi-ai/, ai-gateway/integrations/pi-ai/, workers-ai/configuration/pi-ai/, partials/agents/pi-install Pi ~1.6.0. pi-ai page also covers Anthropic message threads and FLUX.2 image models
agents/models/ai-sdk/ FLUX.2 image models, Aura takes its language from the model id, MeloTTS option removed
agents/tools/web-fetch/, agents/tools/web-search/ Pi code mode gets results as objects
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-free 500 and 1011 defaults, how onError and sub-agents route failures, no messages run on a connection the host closed
agents/model-context-protocol/apis/client-api/, .../guides/oauth-mcp-client/, agents/runtime/capabilities/mcp-client-manager/, agents/agent-class/retries/ Failures and reconnecting, reconnectMcpServer(), which failures count as refused, re-authorization with MCPAuthorizationRequiredError, addMcpServer() on an existing server, background restore, Reconnect button replaces remove-then-add
agents/harnesses/think/tools/ WorkerJavaScriptBackend and ws:* modules become CodemodeBackend and codemode:*
agents/harnesses/claude-code/ Default model is claude-sonnet-5-5

The 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-flash is 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

@github-actions github-actions Bot added product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ product:changelog product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. labels Nov 20, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://agents-pi-1-6-docs.previews.developers.cloudflare.com (commit 3276e31)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://beb55b4e.previews.developers.cloudflare.com 3276e31 2026-11-20T21:27:54.310Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://aecfe6c8.previews.developers.cloudflare.com d2ffeb9 2026-11-20T17:43:20.041Z Visit the dashboard ↗

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Worker Preview URL: https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com
Worker Preview Deployment URL: https://4ecdbd23.previews.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/agents/harnesses/pi/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/harnesses/pi/
https://developers.cloudflare.com/agents/model-context-protocol/apis/client-api/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/model-context-protocol/apis/client-api/
https://developers.cloudflare.com/changelog/post/2026-11-20-pi-harness-pi-1-6/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/changelog/post/2026-11-20-pi-harness-pi-1-6/
https://developers.cloudflare.com/agents/model-context-protocol/guides/oauth-mcp-client/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/model-context-protocol/guides/oauth-mcp-client/
https://developers.cloudflare.com/agents/runtime/lifecycle/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/runtime/lifecycle/
https://developers.cloudflare.com/agents/agent-class/internals/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/agent-class/internals/
https://developers.cloudflare.com/agents/models/pi-ai/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/models/pi-ai/
https://developers.cloudflare.com/agents/harnesses/think/tools/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/harnesses/think/tools/
https://developers.cloudflare.com/agents/agent-class/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/agent-class/
https://developers.cloudflare.com/agents/models/ai-sdk/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/models/ai-sdk/
https://developers.cloudflare.com/agents/tools/web-fetch/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/tools/web-fetch/
https://developers.cloudflare.com/agents/runtime/lifecycle/api-reference/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/runtime/lifecycle/api-reference/
https://developers.cloudflare.com/agents/runtime/capabilities/mcp-client-manager/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/runtime/capabilities/mcp-client-manager/
https://developers.cloudflare.com/agents/agent-class/retries/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/agent-class/retries/
https://developers.cloudflare.com/agents/models/ https://gh-agents-pi-1-6-docs.previews.developers.cloudflare.com/agents/models/

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed 3276e31 · 0 findings · incremental

Resolved (2) · Dismissed (0)
  • Resolved: message can be undefined in the subagent example · Verified at head (pi/index.mdx, subagent example): message is now typed AssistantMessage | undefined with an explicit if (message === undefined) early return before message.content.filter(...), so the example no longer throws.
  • Resolved: Body headings start at H3 and skip H2 · Verified at head (2026-11-20-pi-harness-pi-1-6.mdx): first body heading is now ## Tools that wait and all sections use ##; the H3-without-H2 skip no longer exists.
Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.


## 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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 irvinebroque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@irvinebroque
irvinebroque added this pull request to the merge queue Nov 21, 2026
Merged via the queue into production with commit e201fd0 Nov 21, 2026
13 checks passed
@irvinebroque
irvinebroque deleted the agents/pi-1-6-docs branch November 21, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:changelog product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants