agents@0.16.1
Patch Changes
-
#1757
92a5ba1Thanks @threepointone! - Bump thepartyserverdependency to^0.5.8, which base64-encodes the
x-partykit-propsheader so props containing non-ASCII characters (e.g.
accented names) no longer trigger workerd's "header value contains non-ASCII
characters" warning (which throws aTypeErrorin browser fetch
implementations). The header is decoded back to the original Unicode payload on
the server, and raw-JSON values from older callers are still accepted for
backwards compatibility. -
#1754
151d457Thanks @threepointone! - Pin accepted WebSocket connections tobinaryType = "arraybuffer". On Worker
compatibility_dates>= 2026-03-17the runtime defaults a server WebSocket's
binaryTypeto"blob"(thewebsocket_standard_binary_typeflag), so binary
frames arrive asBlobinstead ofArrayBuffer. The Agent protocol and every
downstream consumer (e.g.@cloudflare/voiceaudio frames, useronMessage
handlers that checkmessage instanceof ArrayBuffer) have always relied on
ArrayBuffer. The Agent now setsconnection.binaryType = "arraybuffer"when a
connection is established, restoring the historical contract regardless of
compatibility date without requiring theno_websocket_standard_binary_type
flag. (The hibernatablewebSocketMessagehandler always delivers
ArrayBuffer, so this only affects non-hibernating agents.)Also bumps the
partyserverdependency to^0.5.7, which pinsbinaryTypeat
the connection layer (accept()), accepts non-hibernating connections in
half-open mode, and suppresses retryable transport-teardown errors on
already-closing/closed connections. With partyserver now pinningbinaryType
itself, the Agent's own pin becomes defense-in-depth (kept for older partyserver
versions and custom connections) and runs once per connection per isolate
lifetime instead of on every state access. -
#1754
151d457Thanks @threepointone! - Add Browser Run Live View support to the browser tools. Thecdpconnector
gains agetLiveViewUrl({ targetId?, mode? })tool that returns a link a human
can open to watch and control a session in real time — the building block for
human-in-the-loop handoffs (login, MFA, CAPTCHA, sensitive input), paired with
the runtime's durable approval pause.BrowserConnectoralso exposes a
host-sideliveView()helper for surfacing the shared session's Live View URLs
in your own UI; eachBrowserLiveViewTargetincludes the tab's current
pageUrlso you can label tabs and filter out blank/internal pages. New
LiveViewMode,BrowserLiveView,BrowserLiveViewTarget, and
BrowserLiveViewUrltypes are exported fromagents/browser. -
#1754
151d457Thanks @threepointone! - Add Browser Run Quick Actions to the browser tools: stateless, one-shot
browsing that needs only thebrowserbinding — no Durable Object, loader, or
sandbox. New primitives inagents/browser(browserMarkdown,
browserExtract,browserLinks,browserScrape,browserContent,
browserSnapshot,browserScreenshot,browserPdf, plusrunQuickAction)
wrap thequickAction()binding and unwrap its{ success, result }envelope.
A newcreateQuickActionTools({ browser })(fromagents/browser/ai) returns
AI SDK tools (browser_markdown,browser_extract,browser_links,
browser_scrape, opt-inbrowser_content) so an agent can read a page as
Markdown, extract structured data with AI, or list/scrape elements in a single
call. Every result is bounded tomaxChars(text truncated, oversized
arrays/objects summarized) to protect the context window, and host-only request
options (cookies,authenticate,gotoOptions,viewport, …) can be passed
once viaoptionsfor authenticated or JavaScript-heavy pages without exposing
them to the model.createBrowserTools/createBrowserRuntimenow expose these tools alongside the
durablebrowser_executetool by default whenever abrowserbinding is
present (passquickActions: falseto opt out), and they resolvectxfrom the
current Agent viagetCurrentAgent()soctxno longer has to be passed
explicitly from inside an Agent. Result bounding is shape-stable — arrays stay
arrays (trimmed), so the model sees a consistent type, except when even the
first element overflows the budget, where the result degrades to the
truncated-preview summary rather than a misleading empty array.
runQuickAction'sparamsare now typed per action.@cloudflare/think/tools/browserre-exports
createQuickActionToolsand the Quick Action primitives/types so a Think agent
can expose them fromgetTools()with a single import. Quick Actions require a
Workercompatibility_dateof2026-03-24+ andremote: trueon the browser
binding for localwrangler dev. -
#1754
151d457Thanks @threepointone! - Add Browser Run session recording to the browser tools. Setrecording: true
on the connector'ssessionoption (orConnectBrowserOptions/
createBrowserSession) to opt a session into an rrweb capture of everything
the agent did in the browser — DOM changes, input, and navigation — finalized
when the session closes. Pairs with Live View: watch a session live, then
review the recording afterward for audit or debugging. A new
getBrowserRecording({ accountId, apiToken, sessionId })helper fetches a
finished recording via the Browser Rendering REST API, returning per-tab rrweb
event arrays (BrowserRecording) ready forrrweb-player.