Skip to main content
Back to timeline
CloudflareSource publication:

Agents SDK adds a browser that survives the turn: tabs, cookies and logins persist, even through hibernation

Synopsis

Cloudflare's Agents SDK now ships browserTool, giving an agent a browser it can return to across turns with tabs, cookies and login sessions intact, kept alive even while the Durable Object hibernates.

Source-provided article image: Changelog
Cloudflare

Interpretation

An agent can now open a website, inspect a page, and come back to the same browser on a later turn with its tabs, cookies and login session still in place. Previously an agent could only start a fresh browser session each turn, with no way to carry an open page or a logged-in state forward. The browser session stays alive between turns, including when the Durable Object hibernates, with a default idle timeout of 10 minutes.

The model drives the browser by writing code rather than by calling a fixed set of click and type actions. Control runs through the Chrome DevTools Protocol (CDP), the browser debugging protocol, with model-generated code issuing the commands. Screenshots come back as images that an image-capable model can inspect and that a UI can display.

Each Pi conversation gets its own active tab by default, while cookies and logins are shared within the same browser. Tabs are scoped per conversation, whereas login state is shared across conversations, so the two have different reach. Use requires Agents SDK v0.28.0 or greater, creating a Browser, registering it with the object's Lifecycle, and adding the tool to a Pi Durable extension registry before opening the harness.

Perspective

The tool is aimed at developers using the Cloudflare Agents SDK, requires v0.28.0 or greater, and needs a Browser created, registered with the object's Lifecycle, and added to a Pi Durable extension registry before the harness is opened. The same persistent browser can also be used with the AI SDK and TanStack AI adapters, or another harness through the public Browser and CDP APIs.

The browser's default idle timeout is 10 minutes; if the session expires or crashes, the tool creates a fresh browser and reports restarted: true, and the old tabs and login state are gone. Behavior when a tool call is interrupted is covered in the persistent browser tools documentation.