megachangelog
Feature0.28.0

Agents: Add document conversion and pagination to web fetch tool

Agents SDK 0.28.0 introduces a beta web_fetch tool that reads URLs with support for HTML, PDF, and Office documents, automatically converting content to Markdown and paginating long responses with offset navigation. The tool lets you configure allowed hosts, response sizes, timeouts, and redirect handling.

Agents SDK 0.28.0 adds a beta web_fetch tool for reading URLs. It handles HTML, PDF, and supported Office documents through Workers AI Markdown Conversion, requests Markdown directly when available, and formats JSON for the model.

Long pages come back in smaller windows with offsets to continue reading. Each result includes the final URL, HTTP status, and content type. You control allowed hosts, response size, timeouts, and redirects.

Add the tool to a Pi Durable extension registry before opening the harness:

import { webFetchTool } from "agents/webfetch/pi";

this.registry.install({
	name: "web-tools",
	tools: [webFetchTool({ binding: this.env.AI })],
});
import { webFetchTool } from "agents/webfetch/pi";

this.registry.install({
	name: "web-tools",
	tools: [webFetchTool({ binding: this.env.AI })],
});

The SDK also includes AI SDK and TanStack AI adapters. For another harness, use the public fetchWeb, windowWebFetchPage, and renderWebFetchPage functions to build its tool handler. Direct fetching does not require a Durable Object or browser.

For setup, examples, and request controls, refer to Web fetch.

agentssdkweb-fetchtoolsai

Source: original entry ↗

More from Cloudflare

Follow Cloudflare to get its new changes in your feed and email digest.

Feature0.28.0

Persistent browser tool in Agents SDK with tabs and logins

The Cloudflare Agents SDK now includes a browserTool that allows agents to maintain a persistent browser session across multiple turns, preserving tabs, cookies, and login sessions. The browser remains alive even when the Durable Object hibernates, with a 10-minute idle timeout before creating a fresh session.

agentsbrowsersdkdurable-objectstools
Feature

Cloudflare API MCP server sends Workers Issues as MCP Events

The Cloudflare API MCP server now exposes Workers Issues as MCP Events through webhook subscriptions, allowing agents to receive real-time notifications when production failures are detected without polling. Clients can subscribe to cloudflare.alert.workers_observability_real_time_issue scoped to an account or individual Worker.

workersmcpmonitoringapiobservability
Feature

Web Analytics: Deeper Core Web Vitals Diagnostics with LCP & INP Sub-Part Metrics

Real User Monitoring in Web Analytics now breaks down Largest Contentful Paint (LCP) and Interaction to Next Paint (INP) into their constituent phases, plus splits connection time into TCP and TLS components. These sub-part metrics are available in the dashboard and queryable through the GraphQL Analytics API to help identify which specific area is impacting page performance.

web-analyticsrumcore-web-vitalsperformanceapi
See all Cloudflare changes →