Agent 基础设施官方发布自动监测

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.

原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。

人类阅读

为什么值得关注

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 解析

可执行摘要

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 实用度
77/100
可信度
96%
机器格式
JSON + Markdown
下一步

开发者应核对什么

  • 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.
分类

标签与路由

cloudflareagents-sdkedge-runtime
相关信号

继续阅读