Skip to content

fix(deps): update dependency agents to ^0.33.0 - #266

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/agents-0.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/agents-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
agents (source) ^0.29.0 → ^0.33.0 age confidence

Release Notes

cloudflare/agents (agents)

v0.33.0

Compare Source

This release adds support for Pi 1.5, which makes PiHarness much faster and lighter on memory, and lets you continue a run that ended without an answer.

Highlights
  • Pi 1.5 support: agents/harness/pi, agents/models/pi-ai and the Pi tools now run on Pi 1.5.
  • Far fewer storage writes while streaming: Pi stores streamed answers and tool output in batches, at the latest every second, instead of on every update. Over SQLite this cuts storage transactions about 27x for long answers and 5.7x for turns with parallel tools, and CPU by about a quarter. A crash can now lose up to about a second of streamed output.
  • Faster with many sessions: Pi's scheduler no longer rechecks every conversation on each commit, so on SQLite one Pi harness with 2,048 sessions went from 88 to 459 agent runs per second. Commits that arrive together now share one storage call, and a normal run makes no storage reads.
  • Large answers no longer blow up memory: streaming a 500 KB tool call used to take about 20 s of CPU and a 100 MB heap, and a 140 KB answer followed by a 140 KB tool call held over 100 MB. Pi now appends new text instead of copying it on every update.
  • Conversation view: session.watch() replaces session.events(). It returns the newest transcript entries and the session's live state, such as the answer being streamed, running tools, and why the last run ended without an answer. session.entries() pages older entries. See Work with sessions.
  • Continue a run: session.continue() starts a run on the transcript as it is, without a new message, for example after the model errored or the run hit its turn limit.
  • Turn limit: defaults.maxTurns caps the tool rounds a run can take in new sessions. A run that reaches it ends without an answer, with reason turn_limit.
  • Crash-looping tasks end instead of parking: a tool call cut off by Pi's restart limit ends with an error result the model sees, and a model request ends its run without an answer, with reason restart_limit. See How recovery works.
  • Other changes: submit() takes whenIdle: "reject", so an idle session refuses input instead of starting a run. Streamed tool-call arguments on the chat-completions wire that aren't valid JSON now fail the tool call with an error the model can fix. In Pi's code mode, browserTool gives scripts its run as an object, with screenshots as image blocks for image(). browserTool stops when the harness aborts its call, and BrowserSession lets code outside browserTool run the same browser object. useAgentChat().stop() now cancels server-started turns streamed without a resume handshake.
Upgrading

You only need to make changes if you use the Pi harness, agents/models/pi-ai or the Pi tools.

  1. Update Pi to ~1.5.0 (@earendil-works/pi-durable, pi-ai, chord) and install @earendil-works/pi-schema alongside them. Once a conversation runs on Pi 1.5, Pi 1.4 cannot read it, so a deployment cannot roll back past this release. Roll forward to fix a bad deploy instead.

  2. Check pi-durable's 1.5.0 changelog for its breaking changes, such as the removal of watchEvents(), tagged watch calls and ends, and ConversationView.entries becoming a window over the transcript.

  3. Replace session.events() with session.watch() and render the view each time it changes. To show a transcript longer than the window, merge each value into Pi's ConversationTranscript, which pages older entries with session.entries(). The view's entries now include those before a reset or compaction: Pi adds the reset or summary in place instead of cutting the transcript there. An idle pi.live now keeps runFailure after a failed run, so check run === undefined instead of comparing it with {}.

    - const stream = await session.events();
    - initialize(stream.snapshot);
    - stream.start(async (events) => events.forEach(apply));
    + const watch = await session.watch();
    + render(watch.value);
    + watch.start(async (call) => {
    +   if (call.kind === "value") render(call.value);
    + });
  4. Build your Pi tool schemas with @earendil-works/pi-schema, as pi-ai no longer exports TypeBox's Type. Unlike Type.Object, obj() rejects properties it doesn't list; pass { open: true } to allow them. To keep TypeBox instead, import Type from typebox.

    - import { Type } from "@earendil-works/pi-ai";
    - const WordCount = Type.Object({ text: Type.String() });
    + import { obj, str } from "@earendil-works/pi-schema";
    + const WordCount = obj({ text: str() });
  5. Remove calls to retry() and handling of the parked status. To run work again after a run ended without an answer, call session.continue() or submit it again.

  6. Update your onReport callback if you pass one to Harness.open. It now takes one report tagged by kind, with the error on it. session_failed is now storage_failed, and a task the restart limit ends is reported as task_interrupted instead of task_parked.

Minor Changes
  • #​2796 edf1b52 Thanks @​ben-reitz! - Support Pi 1.5 (~1.5.0; Pi 1.4 is no longer supported): session.watch() replaces session.events() and returns Pi's conversation view, session.entries() pages the transcript, retry() and the parked pending status are removed as Pi now ends crash-looping tasks, submit() takes whenIdle: "reject", and the Pi tools build their schemas with @earendil-works/pi-schema, a new optional peer, as pi-ai no longer exports TypeBox's Type. See pi-durable 1.5.0's changelog.

  • #​2797 77138fa Thanks @​ben-reitz! - Two new controls for the Pi harness, from Pi 1.5:

    • continue() starts a run without sending a new message. Use it to try again after a run ended without an answer, for example because the model errored or the run hit its turn limit.
    • defaults.maxTurns limits how many tool rounds a run can take. A run that reaches it ends without an answer, with reason turn_limit.

    See Pi harness.

Patch Changes
  • #​2795 3e21ee4 Thanks @​ben-reitz! - Add Browser.functionDocs(), BrowserSession.functions, report notices, opt-in scope locks (browser.session({ lock: true }), session.lock()) and conversationScope() to agents/browser, so code outside browserTool can run the same browser object. See Browse the Web.

  • #​2795 3e21ee4 Thanks @​ben-reitz! - browserTool stops when the harness aborts its call, for pi, the AI SDK and TanStack AI. See Browse the Web.

  • #​2798 62ccd87 Thanks @​ben-reitz! - Pi models on the chat-completions wire (Workers AI, and OpenAI-compatible models through AI Gateway) now parse streamed tool-call arguments with pi-ai's own parser. When a model sends arguments that aren't valid JSON, the tool call now fails with an error the model can see and fix, instead of running with whatever arguments could be salvaged.

    See Models for pi-ai.

  • #​2801 748e693 Thanks @​ben-reitz! - The pi browserTool gives code mode scripts the run as an object, with screenshots as image blocks for image(). See Browse the Web.

  • #​2805 baf26bc Thanks @​ben-reitz! - useAgentChat().stop() now cancels server-started turns streamed without a resume handshake. See Request cancellation.

v0.32.0

Compare Source

Minor Changes
  • #​2752 34cbd30 Thanks @​mattzcarey! - Add experimental_registerOpenTelemetry() to agents/observability, which records spans from OpenTelemetry-instrumented libraries as Workers trace spans. Experimental and subject to change.

  • #​2771 54ae3e8 Thanks @​mattzcarey! - Breaking: agents/skills now loads Agent Skills from Computer Workspace files (workspace()), R2 (r2()), or code (manifest()), checks SKILL.md against the Agent Skills spec, and replaces SkillRegistry with loadSkillCatalog() and createSkillTools() (from agents/skills/tools/ai-sdk); parseSkill() follows the spec's guide for agents, loading skills that break a rule with warnings; runner() moved to agents/skills/runner; the agents:skills Vite import and agents/skills/compile are removed. See Agent Skills.

Patch Changes
  • #​2763 df85805 Thanks @​mattzcarey! - Agents SDK spans (agent lifecycle, wrapAISDK, Think) now set span status error on failure, where the Workers runtime supports Span.setStatus(); attributes are unchanged. See Observability.

  • #​2737 08747d9 Thanks @​mattzcarey! - Mark the package side-effect free (apart from the CLI), so bundlers drop the modules a Worker doesn't use. import { routeAgentRequest } from "agents" no longer bundles the MCP client.

  • #​2744 a2d371e Thanks @​mattzcarey! - Update @modelcontextprotocol/client and @modelcontextprotocol/server to 2.4.0 and @modelcontextprotocol/sdk to 1.32.2, and add a clientMetadataUrl option to DurableObjectOAuthClientProvider for OAuth Client ID Metadata Documents. See MCP client.

  • #​2740 8cf6da1 Thanks @​mattzcarey! - agents/models/pi-ai parses streamed chat-completions tool-call arguments incrementally, instead of re-parsing the whole argument text on every delta.

  • #​2766 b372289 Thanks @​github-actions! - Allow @tanstack/ai 1.x in the optional peer dependency ranges, and type the TanStack AI tools so they compile against both 0.x and 1.x. See TanStack AI.

v0.31.0

Compare Source

This release adds internal hostnames to the browser. Give a Browser Run browser hostnames such as preview.internal, and its requests to them go to your agent instead of the internet, so the model can open a dev server, a workspace folder or another Worker in the same browser it uses for the web.

Highlights
  • Internal hostnames: pass up to 8 hostnames to browserRun() as internalHosts. Serve each one from a fetch function on your agent or from another Worker. See Internal hostnames.
  • Hosts the model points: give a host a target schema, and the model chooses what it serves with browser.assignHost(), such as a container port or a folder in its workspace. Without a target, a host always serves the same thing.
  • Lighter installs without MCP servers: @modelcontextprotocol/sdk and @modelcontextprotocol/server are now optional peer dependencies, so apps that don't serve MCP no longer install them.
  • Stable models: agents/models/ai-sdk and agents/models/pi-ai are no longer experimental. See Models.
  • Other changes: createMcpHandler passes the verified token from @cloudflare/workers-oauth-provider 1.x to tool callbacks as context.http.authInfo. createAI from agents/models/pi-ai sends pi-ai's Anthropic betas for catalog Claude models. PiWhenBusy accepts "reject".
  • browserTool improvements: the model's code runs in its own Dynamic Worker instead of on codemode, and is stopped from outside that Worker if it overruns its timeout. It can no longer close the browser or create a Live View link. this.browser.session() lets your own code drive the same browser. createBrowserTools, createBrowserRuntime, BrowserConnector and the Quick Action helpers are deprecated in favour of browserTool.
Upgrading

You only need to make changes if you serve MCP or use browserTool.

If you serve MCP or use agents/x402 or agents/experimental/webmcp:

  1. Add the MCP packages to your package.json at the versions this release expects, since your package manager no longer installs them. Until you do, builds fail with an unresolved import.

    • agents/mcp (McpAgent, WorkerTransport, createLegacyMcpHandler) and agents/x402: @modelcontextprotocol/sdk@1.32.1 and @modelcontextprotocol/server@2.3.1
    • agents/mcp/server (createMcpHandler): @modelcontextprotocol/server@2.3.1
    • agents/experimental/webmcp: @modelcontextprotocol/sdk@1.32.1

    See Upgrading an existing McpAgent server.

  2. Import client helpers such as RPCClientTransport from agents/mcp/client instead of agents/mcp. MCP client code needs neither package.

If you use browserTool:

  1. Remove the CodemodeRuntime export from your Worker unless createBrowserTools still uses it, and remove ctx from browserTool's options. Keep the LOADER binding and keep @cloudflare/codemode installed for now.

  2. Update instructions of your own that mention cdp.send, such as a system prompt. The tool's description already teaches the new call:

    - await cdp.send({ method: "Page.navigate", params: { url }, sessionId: "active" });
    + await browser.cdp({ method: "Page.navigate", params: { url }, sessionId: "active" });
  3. Read notice instead of restarted, newTabs and calls if your code inspects results. notice says in sentences whether the browser restarted, the page opened tabs, or another chat closed or shares the tab. PiBrowserToolDetails now has only executionId and status.

Minor Changes
  • #​2673 865a57e Thanks @​ben-reitz! - Add internalHosts to browserRun() provider: set internal hostnames the browser can reach through your agent. Allow the model to point these hostnames at specific targets like container ports or workspace folders with browser.assignHost(). See Internal hostnames.

  • #​2667 03b4609 Thanks @​ben-reitz! - browserTool now runs the model's code in its own Dynamic Worker instead of on codemode, so it needs no ctx or CodemodeRuntime export (keep @cloudflare/codemode installed for now) and its output has no calls log; browser.session() gives your own code the same connection to the browser. See Persistent browser.

  • #​2634 565e37c Thanks @​mattzcarey! - @modelcontextprotocol/sdk and @modelcontextprotocol/server are now optional peer dependencies, so add them to your package.json if you use agents/mcp, agents/mcp/server, agents/x402 or agents/experimental/webmcp. See Upgrading an existing McpAgent server.

Patch Changes
  • #​2668 183c141 Thanks @​ben-reitz! - browserTool's model code now calls a browser global (browser.cdp(...), browser.spec({ domain })) instead of cdp.send(...), and the result's notice replaces the restarted and newTabs fields. See Persistent browser.

  • #​2666 57c7813 Thanks @​ben-reitz! - createBrowserTools, createBrowserRuntime and BrowserConnector are deprecated; use browserTool. See Persistent browser. The Quick Action helpers (createQuickActionTools, runQuickAction, browserMarkdown and the rest) are deprecated too and will not change.

  • #​2743 f049ee1 Thanks @​mattzcarey! - agents/models/ai-sdk and agents/models/pi-ai are no longer experimental. See Models.

  • #​2718 916c0e3 Thanks @​ben-reitz! - createAI from agents/models/pi-ai now sends pi-ai's betas as the anthropic-beta header for catalog Claude models on /run, as it already did on the provider-native path. See #​2714.

  • #​2717 4d7734a Thanks @​ben-reitz! - PiWhenBusy accepts "reject", which PiHarness.submit() already passed through to pi-durable. See Pi harness.

  • #​2680 2a25d88 Thanks @​mattzcarey! - createMcpHandler now reads the verified token that @cloudflare/workers-oauth-provider 1.x sets as ctx.auth, so tool callbacks receive context.http.authInfo (token, client ID, scopes, expiry and resource) behind OAuthProvider and OAuthResourceServer. getMcpAuthContext().props is unchanged.

v0.30.1

Compare Source

Patch Changes

v0.30.0

Compare Source

This release adds support for Pi 1.4 and makes PiHarness recover more reliably from evictions, crashes and storage errors.

Highlights
  • Pi 1.4 support: agents/harness/pi now runs on Pi 1.4.
  • Hibernation while Pi's tasks sleep: PiHarness passes Pi's onWake through your harness factory, so a Durable Object sleeps until Pi's next task is due instead of staying in memory.
  • One wake job per object: PiHarness wakes from Pi's wake(), so a task stopped by Pi's restart limit no longer keeps the object awake.
  • Parked tasks: tasks stopped by Pi's restart limit show as parked in pending(), and retry() runs them again.
  • Recovery: Pi reopens after a storage error instead of failing every call until the object restarts, and the wake job survives failed steps with backoff.
  • Fixes: Lifecycle no longer keeps evicted Durable Objects in memory, and it arms a fallback alarm when startup fails. pi-ai now reports cut-off model streams with wording Pi treats as transient, so Pi retries them.
Upgrading
  1. Update Pi to ~1.4.0 (@earendil-works/pi-durable, pi-ai, pi-agent-core) and install @earendil-works/chord alongside them. Pi 1.4 migrates session storage to a schema Pi 1.3 cannot open, so a deployment cannot roll back past this release.

  2. Check pi-durable's 1.4.0 changelog for its breaking changes, such as the removal of TaskRuntime.sleep(), the new sleeping task status, and the restart limit that parks a crash-looping task after 5 restarts.

  3. Pass onWake to Harness.open, as in the diff below. Without it, the harness still works but logs a warning, and the object stays in memory while Pi's tasks sleep.

  4. If you create Pi's registry at module scope, move it into your class, as a field or in the factory. Our tool examples showed module scope before this release. Pi keeps every Harness subscribed to its registry until it closes, and an evicted object never closes it, so a module-level registry keeps every evicted object's harness in memory.

    - const registry = createRegistry();
      export class Assistant extends Agent<Env> {
    +   registry = createRegistry();
        harness = new PiHarness({
          harness: ({ storage, context, onWake }) =>
    -       Harness.open(storage, { models, registry }, context)
    +       Harness.open(storage, { models, registry: this.registry, onWake }, context)
        });
      }
  5. Keep the harness factory safe to run more than once. It now runs again when Pi reopens after a storage error.

  6. Handle the new parked status if you switch on PiPendingOperation.status.

Existing objects need no migration step. Wake jobs left by earlier releases are handed over to the new wake job on first start.

Minor Changes
  • #​2617 cfe9d0f Thanks @​ben-reitz! - Support Pi 1.4: the Pi peer range is now ~1.4.0. Pi 1.4 migrates SQLite session storage to a schema that Pi 1.3 cannot open, so a deployment cannot roll back past this release. See Pi harness.

  • #​2619 4b535dc Thanks @​ben-reitz! - PiHarness hands its factory an onWake to pass to Harness.open, so the Durable Object can hibernate while Pi's tasks sleep. Add it to your factory: harness: ({ storage, context, onWake }) => Harness.open(storage, { ...options, onWake }, context). Without it the harness still works and logs a warning. See Pi harness.

  • #​2624 3954859 Thanks @​ben-reitz! - PiHarness shows operations stopped by Pi's restart limit as parked in pending(), and retry() runs them again. See Pi harness.

Patch Changes
  • #​2644 f404547 Thanks @​ben-reitz! - Lifecycle arms a fallback alarm while its job queue holds jobs, before startup runs in an alarm and after a startup that queued jobs throws, so a failed startup cannot leave queued jobs without a wake. See Lifecycle.

  • #​2653 fc4cd24 Thanks @​ben-reitz! - Stop Lifecycle startup keeping an evicted Durable Object in memory when a capability's startup leaves a promise pending, as PiHarness does when it opens Pi. See Pi harness.

  • #​2643 e117121 Thanks @​ben-reitz! - agents/models/pi-ai reports a cut-off or idle model stream with wording pi's retry policy treats as transient, so pi retries the turn instead of failing it. See Models with pi-ai.

  • #​2617 cfe9d0f Thanks @​ben-reitz! - agents/harness/pi now uses chord's own context helpers, so install @earendil-works/chord alongside pi-durable and pi-ai. See Pi harness.

  • #​2648 000fcaf Thanks @​ben-reitz! - PiHarness opens pi again after a storage error closes it, instead of failing every call until the object restarts. See How recovery works.

  • #​2618 3e91ded Thanks @​ben-reitz! - PiHarness wakes from Pi's wake() with one job per object, so a task parked by Pi's restart limit no longer keeps the Durable Object awake. See Pi harness.

  • #​2649 91a8f61 Thanks @​ben-reitz! - PiHarness keeps its wake job when a step fails, retrying with a backoff up to 10 minutes, and counts a memory-limit reset during the job's wait against the alarm memory-limit breaker. See How recovery works.


Configuration

📅 Schedule: (in timezone Asia/Tokyo)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot enabled auto-merge October 25, 2026 13:41
@renovate
renovate Bot force-pushed the renovate/agents-0.x branch 2 times, most recently from 239fd2f to 48c50c6 Compare October 30, 2026 19:01
@renovate renovate Bot changed the title fix(deps): update dependency agents to ^0.30.0 fix(deps): update dependency agents to ^0.31.0 Oct 30, 2026
@renovate
renovate Bot force-pushed the renovate/agents-0.x branch from 48c50c6 to 232680f Compare November 1, 2026 21:17
@renovate renovate Bot changed the title fix(deps): update dependency agents to ^0.31.0 fix(deps): update dependency agents to ^0.32.0 Nov 1, 2026
@renovate
renovate Bot force-pushed the renovate/agents-0.x branch 2 times, most recently from 0bcb6a9 to 5eb740a Compare November 6, 2026 14:25
@renovate renovate Bot changed the title fix(deps): update dependency agents to ^0.32.0 fix(deps): update dependency agents to ^0.33.0 Nov 6, 2026
@renovate
renovate Bot force-pushed the renovate/agents-0.x branch from 5eb740a to 20431ba Compare November 6, 2026 14:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants