Agent InfrastructureAutomated release watch

agents@0.31.0

Cloudflare Agents SDK 0.31.0 adds internal hostnames to browser runs, isolates model browser execution in Dynamic Workers, stabilizes key model integrations, and makes MCP dependencies optional.

Human read

Why this signal matters

Cloudflare Agents SDK v0.31.0 introduces major browser integration enhancements, dependency structure adjustments, and model stabilization: 1. Internal Hostnames : Users can pass up to 8 internal hostnames to browserRun({ internalHosts }) . Requests to these domains are intercepted and routed to agent fetch handlers or Workers rather than the public internet. Models can map hosts to dynamic targets (e.g., container ports, folders) via browser.assignHost() . 2. MCP Dependency Decoupling : @modelcontextprotocol/sdk and @modelcontextprotocol/server are shifted to optional peer dependencies. Projects serving MCP endpoints or utilizing agents/mcp , agents/x402 , or agents/experimental/webmcp must now explicitly list these dependencies in package.json . 3. Browser Tool Execution Overhaul : browserTool executes model code within a dedicated Dynamic Worker rather than codemode , isolating execution and enforcing strict external timeout termination. The execution model replaces cdp.send with browser.cdp(...) , replaces result properties ( restarted , newTabs , calls ) with a unified notice string, and exposes direct session control via this.browser.session() . Legacy tools ( createBrowserTools , createBrowserRuntime , BrowserConnector , Quick Action helpers) are officially deprecated. 4. Model Integrations : agents/models/ai-sdk and agents/models/pi-ai are graduated from experimental to stable.

Agent parse

Actionable summary

Cloudflare Agents SDK v0.31.0 introduces internal hostnames via browserRun(..., { internalHosts }) routed to agents or Workers. It deprecates legacy browser helpers in favor of browserTool , which now executes model code in an isolated Dynamic Worker with browser.cdp replacing cdp.send . Additionally, @modelcontextprotocol/sdk and @modelcontextprotocol/server are now optional peer dependencies, requiring explicit…

Agent usefulness
77/100
Confidence
96%
Canonical data
JSON + Markdown
Next actions

What builders should check

  • If serving MCP or using agents/mcp, agents/x402, or agents/experimental/webmcp, explicitly install required peer dependencies (@modelcontextprotocol/sdk@1.32.1 and/or @modelcontextprotocol/server@2.3.1) in package.json.
  • If importing MCP client helpers like RPCClientTransport, update import paths from 'agents/mcp' to 'agents/mcp/client'.
  • For browserTool users, remove ctx from tool options, remove CodemodeRuntime exports, and update prompts/instructions to use browser.cdp(...) instead of cdp.send(...).
  • Update browserTool result handlers to parse the notice field instead of restarted, newTabs, or calls.
Classification

Tags and routing

cloudflareagents-sdkedge-runtime
Related signals

Continue the thread