---
title: AI Changelog
image: https://developers.cloudflare.com/cf-twitter-card.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

AI

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

Apr 15, 2026
1. ### [Agent Lee adds Write Operations and Generative UI](https://developers.cloudflare.com/changelog/post/2026-04-15-agentlee-writeops-genui/)  
[ Agents ](https://developers.cloudflare.com/agents/)  
#### Agent Lee adds Write Operations and Generative UI  
We are excited to announce two major capability upgrades for **Agent Lee**, the AI co-pilot built directly into the Cloudflare dashboard. Agent Lee is designed to understand your specific account configuration, and with this release, it moves from a passive advisor to an active assistant that can help you manage your infrastructure and visualize your data through natural language.  
#### Take action with Write Operations  
Agent Lee can now perform changes on your behalf across your Cloudflare account. Whether you need to update DNS records, modify SSL/TLS settings, or configure Workers routes, you can simply ask.  
To ensure security and accuracy, every write operation requires **explicit user approval**. Before any change is committed, Agent Lee will present a summary of the proposed action in plain language. No action is taken until you select **Confirm**, and this approval requirement is enforced at the infrastructure level to prevent unauthorized changes.

**Example requests:**

  * _"Add an A record for blog.example.com pointing to 192.0.2.10."_
  * _"Enable Always Use HTTPS on my zone."_
  * _"Set the SSL mode for example.com to Full (strict)."_  
#### Visualize data with Generative UI  
Understanding your traffic and security trends is now as easy as asking a question. Agent Lee now features **Generative UI**, allowing it to render inline charts and structured data visualizations directly within the chat interface using your actual account telemetry.

**Example requests:**

  * _"Show me a chart of my traffic over the last 7 days."_
  * _"What does my error rate look like for the past 24 hours?"_
  * _"Graph my cache hit rate for example.com this week."_

---  
#### Availability  
These features are currently available in **Beta** for all users on the **Free plan**. To get started, log in to the [Cloudflare dashboard ↗](https://dash.cloudflare.com) and select **Ask AI** in the upper right corner.  
To learn more about how to interact with your account using AI, refer to the [Agent Lee documentation](https://developers.cloudflare.com/agent-lee/).

Apr 14, 2026
1. ### [Manage Browser Rendering sessions with Wrangler CLI](https://developers.cloudflare.com/changelog/post/2026-04-14-browser-wrangler-commands/)  
[ Browser Run ](https://developers.cloudflare.com/browser-run/)  
[Browser Rendering](https://developers.cloudflare.com/browser-run/) now supports `wrangler browser` commands, letting you create, manage, and view browser sessions directly from your terminal, streamlining your workflow. Since Wrangler handles authentication, you do not need to pass API tokens in your commands.  
The following commands are available:

| Command                 | Description                  |
| ----------------------- | ---------------------------- |
| wrangler browser create | Create a new browser session |
| wrangler browser close  | Close a session              |
| wrangler browser list   | List active sessions         |
| wrangler browser view   | View a live browser session  |  
The `create` command spins up a browser instance on Cloudflare's network and returns a session URL. Once created, you can connect to the session using any [CDP](https://developers.cloudflare.com/browser-run/cdp/)\-compatible client like [Puppeteer](https://developers.cloudflare.com/browser-run/cdp/puppeteer/), [Playwright](https://developers.cloudflare.com/browser-run/cdp/playwright/), or [MCP clients](https://developers.cloudflare.com/browser-run/cdp/mcp-clients/) to automate browsing, scrape content, or debug remotely.  
Terminal window  
```  
wrangler browser create  
```  
Use `--keepAlive` to set the session keep-alive duration (60-600 seconds):  
Terminal window  
```  
wrangler browser create --keepAlive 300  
```  
The `view` command auto-selects when only one session exists, or prompts for selection when multiple sessions are available.  
All commands support `--json` for structured output, and because these are CLI commands, you can incorporate them into scripts to automate session management.  
For full usage details, refer to the [Wrangler commands documentation](https://developers.cloudflare.com/browser-run/reference/wrangler-commands/).

Apr 13, 2026
1. ### [Secure credential injection and dynamic egress policies for Sandboxes](https://developers.cloudflare.com/changelog/post/2026-04-13-sandbox-outbound-workers-tls-auth/)  
[ Containers ](https://developers.cloudflare.com/containers/)[ Agents ](https://developers.cloudflare.com/agents/)  
Outbound Workers for [Sandboxes](https://developers.cloudflare.com/sandbox/) and [Containers](https://developers.cloudflare.com/containers/) now support zero-trust credential injection, TLS interception, allow/deny lists, and dynamic per-instance egress policies. These features give platforms running agentic workloads full control over what leaves the sandbox, without exposing secrets to untrusted workloads, like user-generated code or coding agents.  
#### Credential injection  
Because outbound handlers run in the Workers runtime, outside the sandbox, they can hold secrets the sandbox never sees. A sandboxed workload can make a plain request, and credentials are transparently attached before a request is forwarded upstream.  
For instance, you could run an agent in a sandbox and ensure that any requests it makes to Github are authenticated. But it will never be able to access the credentials:  
TypeScript  
```  
export class MySandbox extends Sandbox {}  
MySandbox.outboundByHost = {  "github.com": (request: Request, env: Env, ctx: OutboundHandlerContext) => {    const requestWithAuth = new Request(request);    requestWithAuth.headers.set("x-auth-token", env.SECRET);    return fetch(requestWithAuth);  },};  
```  
You can easily inject unique credentials for different instances by using `ctx.containerId`:  
TypeScript  
```  
MySandbox.outboundByHost = {  "my-internal-vcs.dev": async (    request: Request,    env: Env,    ctx: OutboundHandlerContext,  ) => {    const authKey = await env.KEYS.get(ctx.containerId);  
    const requestWithAuth = new Request(request);    requestWithAuth.headers.set("x-auth-token", authKey);    return fetch(requestWithAuth);  },};  
```  
No token is ever passed into the sandbox. You can rotate secrets in the Worker environment and every request will pick them up immediately.  
#### TLS interception  
Outbound Workers now intercept HTTPS traffic. A unique ephemeral certificate authority (CA) and private key are created for each sandbox instance. The CA is placed into the sandbox and trusted by default. The ephemeral private key never leaves the container runtime sidecar process and is never shared across instances.  
With TLS interception active, outbound Workers can act as a transparent proxy for both HTTP and HTTPS traffic.  
#### Allow and deny hosts  
Easily filter outbound traffic with `allowedHosts` and `deniedHosts`. When `allowedHosts` is set, it becomes a deny-by-default allowlist. Both properties support glob patterns.  
TypeScript  
```  
export class MySandbox extends Sandbox {  allowedHosts = ["github.com", "npmjs.org"];}  
```  
#### Dynamic outbound handlers  
Define named outbound handlers then apply or remove them at runtime using `setOutboundHandler()` or `setOutboundByHost()`. This lets you change egress policy for a running sandbox without restarting it.  
TypeScript  
```  
export class MySandbox extends Sandbox {}  
MySandbox.outboundHandlers = {  allowHosts: async (req: Request, env: Env, ctx: OutboundHandlerContext ) => {    const url = new URL(req.url);    if (ctx.params.allowedHostnames.includes(url.hostname)) {      return fetch(req);    }    return new Response(null, { status: 403 });  },  
  noHttp: async () => {    return new Response(null, { status: 403 });  },};  
```  
Apply handlers programmatically from your Worker:  
TypeScript  
```  
const sandbox = getSandbox(env.Sandbox, userId);  
// Open network for setupawait sandbox.setOutboundHandler("allowHosts", {  allowedHostnames: ["github.com", "npmjs.org"],});await sandbox.exec("npm install");  
// Lock down after setupawait sandbox.setOutboundHandler("noHttp");  
```  
Handlers accept `params`, so you can customize behavior per instance without defining separate handler functions.  
#### Get started  
Upgrade to `@cloudflare/containers@0.3.0` or `@cloudflare/sandbox@0.8.9` to use these features.  
For more details, refer to [Sandbox outbound traffic](https://developers.cloudflare.com/sandbox/guides/outbound-traffic/) and [Container outbound traffic](https://developers.cloudflare.com/containers/platform-details/outbound-traffic/).

Apr 10, 2026
1. ### [Browser Rendering adds Chrome DevTools Protocol (CDP) and MCP client support](https://developers.cloudflare.com/changelog/post/2026-04-10-browser-rendering-cdp-endpoint/)  
[ Browser Run ](https://developers.cloudflare.com/browser-run/)  
[Browser Rendering](https://developers.cloudflare.com/browser-run/) now exposes the [Chrome DevTools Protocol (CDP)](https://developers.cloudflare.com/browser-run/cdp/), the low-level protocol that powers browser automation. The growing ecosystem of CDP-based agent tools, along with existing CDP automation scripts, can now use Browser Rendering directly.  
Any CDP-compatible client, including [Puppeteer](https://developers.cloudflare.com/browser-run/cdp/puppeteer/) and [Playwright](https://developers.cloudflare.com/browser-run/cdp/playwright/), can connect from any environment, whether that is [Cloudflare Workers](https://developers.cloudflare.com/workers/), your local machine, or a cloud environment. All you need is your Cloudflare API key.  
For any existing CDP script, switching to Browser Rendering is a one-line change:  
JavaScript  
```  
const puppeteer = require("puppeteer-core");  
const browser = await puppeteer.connect({  browserWSEndpoint: `wss://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/browser-rendering/devtools/browser?keep_alive=600000`,  headers: { Authorization: `Bearer ${API_TOKEN}` },});  
const page = await browser.newPage();await page.goto("https://example.com");console.log(await page.title());await browser.close();  
```  
Additionally, MCP clients like Claude Desktop, Claude Code, Cursor, and OpenCode can now use Browser Rendering as their remote browser via the [chrome-devtools-mcp ↗](https://github.com/ChromeDevTools/chrome-devtools-mcp) package.  
Here is an example of how to configure Browser Rendering for Claude Desktop:  
```  
{  "mcpServers": {    "browser-rendering": {      "command": "npx",      "args": [        "-y",        "chrome-devtools-mcp@latest",        "--wsEndpoint=wss://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/browser-rendering/devtools/browser?keep_alive=600000",        "--wsHeaders={\"Authorization\":\"Bearer <API_TOKEN>\"}"      ]    }  }}  
```  
To get started, refer to the [CDP documentation](https://developers.cloudflare.com/browser-run/cdp/).

Apr 08, 2026
1. ### [Website Source CSS content selectors for precise content extraction in AI Search](https://developers.cloudflare.com/changelog/post/2026-04-09-ai-search-content-selectors/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) now supports [CSS content selectors](https://developers.cloudflare.com/ai-search/configuration/data-source/website/#content-selectors) for website data sources. You can now define which parts of a crawled page are extracted and indexed by specifying CSS selectors paired with URL glob patterns.  
Content selectors solve the problem of indexing only relevant content while ignoring navigation, sidebars, footers, and other boilerplate. When a page URL matches a glob pattern, only elements matching the corresponding CSS selector are extracted and converted to Markdown for indexing.  
Configure content selectors via the dashboard or API:  
Terminal window  
```  
curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai-search/instances" \  -H "Authorization: Bearer {api_token}" \  -H "Content-Type: application/json" \  -d '{    "id": "my-ai-search",    "source": "https://example.com",    "type": "web-crawler",    "source_params": {      "web_crawler": {        "parse_options": {          "content_selector": [            {              "path": "**/blog/**",              "selector": "article .post-body"            }          ]        }      }    }  }'  
```  
Selectors are evaluated in order, and the first matching pattern wins. You can define up to 10 content selector entries per instance.  
For configuration details and examples, refer to the [content selectors documentation](https://developers.cloudflare.com/ai-search/configuration/data-source/website/#content-selectors).

Apr 08, 2026
1. ### [New Workers AI models for text generation and embedding in AI Search](https://developers.cloudflare.com/changelog/post/2026-04-09-new-workers-ai-models/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) now supports four additional [Workers AI](https://developers.cloudflare.com/workers-ai/) models across text generation and embedding.  
#### Text generation

| Model                      | Context window (tokens) |
| -------------------------- | ----------------------- |
| @cf/zai-org/glm-4.7-flash  | 131,072                 |
| @cf/qwen/qwen3-30b-a3b-fp8 | 32,000                  |  
GLM-4.7-Flash is a lightweight model from Zhipu AI with a 131,072 token context window, suitable for long-document summarization and retrieval tasks. Qwen3-30B-A3B is a mixture-of-experts model from Alibaba that activates only 3 billion parameters per forward pass, keeping inference fast while maintaining strong response quality.  
#### Embedding

| Model                          | Vector dims | Input tokens | Metric |
| ------------------------------ | ----------- | ------------ | ------ |
| @cf/qwen/qwen3-embedding-0.6b  | 1,024       | 4,096        | cosine |
| @cf/google/embeddinggemma-300m | 768         | 512          | cosine |  
Qwen3-Embedding-0.6B supports up to 4,096 input tokens, making it a good fit for indexing longer text chunks. EmbeddingGemma-300M from Google produces 768-dimension vectors and is optimized for low-latency embedding workloads.  
All four models are available without additional provider keys since they run on Workers AI. Select them when creating or updating an AI Search instance in the dashboard or through the API.  
For the full list of supported models, refer to [Supported models](https://developers.cloudflare.com/ai-search/configuration/models/supported-models/).

Apr 04, 2026
1. ### [Google Gemma 4 26B A4B now available on Workers AI](https://developers.cloudflare.com/changelog/post/2026-04-04-gemma-4-26b-a4b-workers-ai/)  
[ Workers AI ](https://developers.cloudflare.com/workers-ai/)  
We are partnering with Google to bring [@cf/google/gemma-4-26b-a4b-it](https://developers.cloudflare.com/workers-ai/models/gemma-4-26b-a4b-it/) to Workers AI. Gemma 4 26B A4B is a Mixture-of-Experts (MoE) model built from Gemini 3 research, with 26B total parameters and only 4B active per forward pass. By activating a small subset of parameters during inference, the model runs almost as fast as a 4B-parameter model while delivering the quality of a much larger one.  
Gemma 4 is Google's most capable family of open models, designed to maximize intelligence-per-parameter.  
#### Key capabilities

  * **Mixture-of-Experts architecture** with 8 active experts out of 128 total (plus 1 shared expert), delivering frontier-level performance at a fraction of the compute cost of dense models
  * **256,000 token context window** for retaining full conversation history, tool definitions, and long documents across extended sessions
  * **Built-in thinking mode** that lets the model reason step-by-step before answering, improving accuracy on complex tasks
  * **Vision understanding** for object detection, document and PDF parsing, screen and UI understanding, chart comprehension, OCR (including multilingual), and handwriting recognition, with support for variable aspect ratios and resolutions
  * **Function calling** with native support for structured tool use, enabling agentic workflows and multi-step planning
  * **Multilingual** with out-of-the-box support for 35+ languages, pre-trained on 140+ languages
  * **Coding** for code generation, completion, and correction  
Use Gemma 4 26B A4B through the [Workers AI binding](https://developers.cloudflare.com/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, or the [OpenAI-compatible endpoint](https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/).  
For more information, refer to the [Gemma 4 26B A4B model page](https://developers.cloudflare.com/workers-ai/models/gemma-4-26b-a4b-it/).

Apr 02, 2026
1. ### [Automatically retry on upstream provider failures on AI Gateway](https://developers.cloudflare.com/changelog/post/2026-04-02-auto-retry-upstream-failures/)  
[ AI Gateway ](https://developers.cloudflare.com/ai-gateway/)  
AI Gateway now supports automatic retries at the gateway level. When an upstream provider returns an error, your gateway retries the request based on the retry policy you configure, without requiring any client-side changes.  
You can configure the retry count (up to 5 attempts), the delay between retries (from 100ms to 5 seconds), and the backoff strategy (Constant, Linear, or Exponential). These defaults apply to all requests through the gateway, and per-request headers can override them.  
![Retry Requests settings in the AI Gateway dashboard](https://developers.cloudflare.com/_astro/auto-retry-changelog.DoCXZnDy_bIipL.webp)  
This is particularly useful when you do not control the client making the request and cannot implement retry logic on the caller side. For more complex failover scenarios — such as failing across different providers — use [Dynamic Routing](https://developers.cloudflare.com/ai-gateway/features/dynamic-routing/).  
For more information, refer to [Manage gateways](https://developers.cloudflare.com/ai-gateway/configuration/manage-gateway/#retry-requests).

Apr 01, 2026
1. ### [Create, manage, search AI Search instances with Wrangler CLI](https://developers.cloudflare.com/changelog/post/2026-04-01-ai-search-wrangler-commands/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) supports a `wrangler ai-search` command namespace. Use it to manage instances from the command line.  
The following commands are available:

| Command                   | Description                                      |
| ------------------------- | ------------------------------------------------ |
| wrangler ai-search create | Create a new instance with an interactive wizard |
| wrangler ai-search list   | List all instances in your account               |
| wrangler ai-search get    | Get details of a specific instance               |
| wrangler ai-search update | Update the configuration of an instance          |
| wrangler ai-search delete | Delete an instance                               |
| wrangler ai-search search | Run a search query against an instance           |
| wrangler ai-search stats  | Get usage statistics for an instance             |  
The `create` command guides you through setup, choosing a name, source type (`r2` or `web`), and data source. You can also pass all options as flags for non-interactive use:  
Terminal window  
```  
wrangler ai-search create my-instance --type r2 --source my-bucket  
```  
Use `wrangler ai-search search` to query an instance directly from the CLI:  
Terminal window  
```  
wrangler ai-search search my-instance --query "how do I configure caching?"  
```  
All commands support `--json` for structured output that scripts and AI agents can parse directly.  
For full usage details, refer to the [Wrangler commands documentation](https://developers.cloudflare.com/ai-search/wrangler-commands/).

Mar 24, 2026
1. ### [Advanced WAF customization for AI Crawl Control blocks](https://developers.cloudflare.com/changelog/post/2026-03-24-waf-rule-preservation/)  
[ AI Crawl Control ](https://developers.cloudflare.com/ai-crawl-control/)  
AI Crawl Control now supports extending the underlying WAF rule with custom modifications. Any changes you make directly in the WAF custom rules editor — such as adding path-based exceptions, extra user agents, or additional expression clauses — are preserved when you update crawler actions in AI Crawl Control.  
If the WAF rule expression has been modified in a way AI Crawl Control cannot parse, a warning banner appears on the **Crawlers** page with a link to view the rule directly in WAF.  
For more information, refer to [WAF rule management](https://developers.cloudflare.com/ai-crawl-control/features/manage-ai-crawlers/#waf-rule-management).

Mar 23, 2026
1. ### [Agents SDK v0.8.0: readable state, idempotent schedules, typed AgentClient, and Zod 4](https://developers.cloudflare.com/changelog/post/2026-03-23-agents-sdk-v080/)  
[ Agents ](https://developers.cloudflare.com/agents/)[ Workers ](https://developers.cloudflare.com/workers/)  
The latest release of the [Agents SDK ↗](https://github.com/cloudflare/agents) exposes agent state as a readable property, prevents duplicate schedule rows across Durable Object restarts, brings full TypeScript inference to `AgentClient`, and migrates to Zod 4.  
#### Readable `state` on `useAgent` and `AgentClient`  
Both `useAgent` (React) and `AgentClient` (vanilla JS) now expose a `state` property that reflects the current agent state. Previously, reading state required manually tracking it through the `onStateUpdate` callback.

**React (`useAgent`)**

  * [  JavaScript ](#tab-panel-3458)
  * [  TypeScript ](#tab-panel-3459)  
JavaScript  
```  
const agent = useAgent({  agent: "game-agent",  name: "room-123",});  
// Read state directly — no separate useState + onStateUpdate neededreturn <div>Score: {agent.state?.score}</div>;  
// Spread for partial updatesagent.setState({ ...agent.state, score: (agent.state?.score ?? 0) + 10 });  
```  
TypeScript  
```  
const agent = useAgent<GameAgent, GameState>({  agent: "game-agent",  name: "room-123",});  
// Read state directly — no separate useState + onStateUpdate neededreturn <div>Score: {agent.state?.score}</div>;  
// Spread for partial updatesagent.setState({ ...agent.state, score: (agent.state?.score ?? 0) + 10 });  
```  
`agent.state` is reactive — the component re-renders when state changes from either the server or a client-side `setState()` call.

**Vanilla JS (`AgentClient`)**

  * [  JavaScript ](#tab-panel-3460)
  * [  TypeScript ](#tab-panel-3461)  
JavaScript  
```  
const client = new AgentClient({  agent: "game-agent",  name: "room-123",  host: "your-worker.workers.dev",});  
client.setState({ score: 100 });console.log(client.state); // { score: 100 }  
```  
TypeScript  
```  
const client = new AgentClient<GameAgent>({  agent: "game-agent",  name: "room-123",  host: "your-worker.workers.dev",});  
client.setState({ score: 100 });console.log(client.state); // { score: 100 }  
```  
State starts as `undefined` and is populated when the server sends the initial state on connect (from `initialState`) or when `setState()` is called. Use optional chaining (`agent.state?.field`) for safe access. The `onStateUpdate` callback continues to work as before — the new `state` property is additive.  
#### Idempotent `schedule()`  
`schedule()` now supports an `idempotent` option that deduplicates by `(type, callback, payload)`, preventing duplicate rows from accumulating when called in places that run on every Durable Object restart such as `onStart()`.

**Cron schedules are idempotent by default.** Calling `schedule("0 * * * *", "tick")` multiple times with the same callback, expression, and payload returns the existing schedule row instead of creating a new one. Pass `{ idempotent: false }` to override.  
Delayed and date-scheduled types support opt-in idempotency:

  * [  JavaScript ](#tab-panel-3462)
  * [  TypeScript ](#tab-panel-3463)  
JavaScript  
```  
import { Agent } from "agents";  
class MyAgent extends Agent {  async onStart() {    // Safe across restarts — only one row is created    await this.schedule(60, "maintenance", undefined, { idempotent: true });  }}  
```  
TypeScript  
```  
import { Agent } from "agents";  
class MyAgent extends Agent {  async onStart() {    // Safe across restarts — only one row is created    await this.schedule(60, "maintenance", undefined, { idempotent: true });  }}  
```  
Two new warnings help catch common foot-guns:

  * Calling `schedule()` inside `onStart()` without `{ idempotent: true }` emits a `console.warn` with actionable guidance (once per callback; skipped for cron and when `idempotent` is set explicitly).
  * If an alarm cycle processes 10 or more stale one-shot rows for the same callback, the SDK emits a `console.warn` and a `schedule:duplicate_warning` diagnostics channel event.  
#### Typed `AgentClient` with `call` inference and `stub` proxy  
`AgentClient` now accepts an optional agent type parameter for full type inference on RPC calls, matching the typed experience already available with `useAgent`.

  * [  JavaScript ](#tab-panel-3466)
  * [  TypeScript ](#tab-panel-3467)  
JavaScript  
```  
const client = new AgentClient({  agent: "my-agent",  host: window.location.host,});  
// Typed call — method name autocompletes, args and return type inferredconst value = await client.call("getValue");  
// Typed stub — direct RPC-style proxyawait client.stub.getValue();await client.stub.add(1, 2);  
```  
TypeScript  
```  
const client = new AgentClient<MyAgent>({  agent: "my-agent",  host: window.location.host,});  
// Typed call — method name autocompletes, args and return type inferredconst value = await client.call("getValue");  
// Typed stub — direct RPC-style proxyawait client.stub.getValue();await client.stub.add(1, 2);  
```  
State is automatically inferred from the agent type, so `onStateUpdate` is also typed:

  * [  JavaScript ](#tab-panel-3464)
  * [  TypeScript ](#tab-panel-3465)  
JavaScript  
```  
const client = new AgentClient({  agent: "my-agent",  host: window.location.host,  onStateUpdate: (state) => {    // state is typed as MyAgent's state type  },});  
```  
TypeScript  
```  
const client = new AgentClient<MyAgent>({  agent: "my-agent",  host: window.location.host,  onStateUpdate: (state) => {    // state is typed as MyAgent's state type  },});  
```  
Existing untyped usage continues to work without changes. The RPC type utilities (`AgentMethods`, `AgentStub`, `RPCMethods`) are now exported from `agents/client` for advanced typing scenarios. `agents`, `@cloudflare/ai-chat`, and `@cloudflare/codemode` now require `zod ^4.0.0`. Zod v3 is no longer supported.  
#### `@cloudflare/ai-chat` fixes

  * **Turn serialization** — `onChatMessage()` and `_reply()` work is now queued so user requests, tool continuations, and `saveMessages()` never stream concurrently.
  * **Duplicate messages on stop** — Clicking stop during an active stream no longer splits the assistant message into two entries.
  * **Duplicate messages after tool calls** — Orphaned client IDs no longer leak into persistent storage.  
#### `keepAlive()` and `keepAliveWhile()` are no longer experimental  
`keepAlive()` now uses a lightweight in-memory ref count instead of schedule rows. Multiple concurrent callers share a single alarm cycle. The `@experimental` tag has been removed from both `keepAlive()` and `keepAliveWhile()`.  
#### `@cloudflare/codemode`: TanStack AI integration  
A new entry point `@cloudflare/codemode/tanstack-ai` adds support for [TanStack AI's ↗](https://tanstack.com/ai) `chat()` as an alternative to the Vercel AI SDK's `streamText()`:

  * [  JavaScript ](#tab-panel-3472)
  * [  TypeScript ](#tab-panel-3473)  
JavaScript  
```  
import {  createCodeTool,  tanstackTools,} from "@cloudflare/codemode/tanstack-ai";import { chat } from "@tanstack/ai";  
const codeTool = createCodeTool({  tools: [tanstackTools(myServerTools)],  executor,});  
const stream = chat({ adapter, tools: [codeTool], messages });  
```  
TypeScript  
```  
import { createCodeTool, tanstackTools } from "@cloudflare/codemode/tanstack-ai";import { chat } from "@tanstack/ai";  
const codeTool = createCodeTool({  tools: [tanstackTools(myServerTools)],  executor,});  
const stream = chat({ adapter, tools: [codeTool], messages });  
```  
#### Upgrade  
To update to the latest version:  
Terminal window  
```  
npm i agents@latest @cloudflare/ai-chat@latest  
```

Mar 23, 2026
1. ### [New AI Search REST API endpoints for /search and /chat/completions](https://developers.cloudflare.com/changelog/post/2026-03-23-ai-search-new-rest-api/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) now offers new [REST API](https://developers.cloudflare.com/ai-search/api/search/rest-api/) endpoints for search and chat that use an OpenAI compatible format. This means you can use the familiar `messages` array structure that works with existing OpenAI SDKs and tools. The messages array also lets you pass previous messages within a session, so the model can maintain context across multiple turns.

| Endpoint         | Path                                                                     |
| ---------------- | ------------------------------------------------------------------------ |
| Chat Completions | POST /accounts/{account\_id}/ai-search/instances/{name}/chat/completions |
| Search           | POST /accounts/{account\_id}/ai-search/instances/{name}/search           |  
Here is an example request to the Chat Completions endpoint using the new `messages` array format:  
Terminal window  
```  
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances/{NAME}/chat/completions \  -H "Content-Type: application/json" \  -H "Authorization: Bearer {API_TOKEN}" \  -d '{    "messages": [      {        "role": "system",        "content": "You are a helpful documentation assistant."      },      {        "role": "user",        "content": "How do I get started?"      }    ]  }'  
```  
For more details, refer to the [AI Search REST API guide](https://developers.cloudflare.com/ai-search/api/search/rest-api/).  
#### Migration from existing AutoRAG API (recommended)  
If you are using the previous AutoRAG API endpoints (`/autorag/rags/`), we recommend migrating to the new endpoints. The previous AutoRAG API endpoints will continue to be fully supported.  
Refer to the [migration guide](https://developers.cloudflare.com/ai-search/api/migration/rest-api/) for step-by-step instructions.

Mar 23, 2026
1. ### [AI Search UI snippets and MCP support](https://developers.cloudflare.com/changelog/post/2026-03-23-ai-search-public-endpoint-and-snippets/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) now supports public endpoints, UI snippets, and MCP, making it easy to add search to your website or connect AI agents.  
Public endpoints allow you to expose AI Search capabilities without requiring API authentication. To enable public endpoints:

  1. Go to **AI Search** in the Cloudflare dashboard. [ Go to **AI Search** ](https://dash.cloudflare.com/?to=/:account/ai/ai-search)
  2. Select your instance, and turn on **Public Endpoint** in **Settings**. For more details, refer to [Public endpoint configuration](https://developers.cloudflare.com/ai-search/configuration/retrieval/public-endpoint/).  
#### UI snippets  
UI snippets are pre-built search and chat components you can embed in your website. Visit [search.ai.cloudflare.com ↗](https://search.ai.cloudflare.com/) to configure and preview components for your AI Search instance.  
![Example of the search-modal-snippet component](https://developers.cloudflare.com/_astro/ui-snippet-search-modal.tIxR8nl5_2300oN.webp)  
To add a search modal to your page:  
```  
<script  type="module"  src="https://<INSTANCE_ID>.search.ai.cloudflare.com/assets/v0.0.25/search-snippet.es.js"></script>  
<search-modal-snippet  api-url="https://<INSTANCE_ID>.search.ai.cloudflare.com/"  placeholder="Search..."></search-modal-snippet>  
```  
For more details, refer to the [UI snippets documentation](https://developers.cloudflare.com/ai-search/configuration/retrieval/embed-search-snippets/).  
#### MCP  
The MCP endpoint allows AI agents to search your content via the Model Context Protocol. Connect your MCP client to:  
```  
https://<INSTANCE_ID>.search.ai.cloudflare.com/mcp  
```  
For more details, refer to the [MCP documentation](https://developers.cloudflare.com/ai-search/api/search/mcp/).

Mar 23, 2026
1. ### [Custom metadata filtering for AI Search](https://developers.cloudflare.com/changelog/post/2026-03-23-custom-metadata-filtering/)  
[ AI Search ](https://developers.cloudflare.com/ai-search/)  
[AI Search](https://developers.cloudflare.com/ai-search/) now supports custom metadata filtering, allowing you to define your own metadata fields and filter search results based on attributes like category, version, or any custom field you define.  
#### Define a custom metadata schema  
You can define up to 5 custom metadata fields per AI Search instance. Each field has a name and data type (`text`, `number`, or `boolean`):  
Terminal window  
```  
curl -X POST https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances \  -H "Content-Type: application/json" \  -H "Authorization: Bearer {API_TOKEN}" \  -d '{    "id": "my-instance",    "type": "r2",    "source": "my-bucket",    "custom_metadata": [      { "field_name": "category", "data_type": "text" },      { "field_name": "version", "data_type": "number" },      { "field_name": "is_public", "data_type": "boolean" }    ]  }'  
```  
#### Add metadata to your documents  
How you attach metadata depends on your data source:

  * **R2 bucket**: Set metadata using S3-compatible custom headers (`x-amz-meta-*`) when uploading objects. Refer to [R2 custom metadata](https://developers.cloudflare.com/ai-search/configuration/data-source/r2/#custom-metadata) for examples.
  * **Website**: Add `<meta>` tags to your HTML pages. Refer to [Website custom metadata](https://developers.cloudflare.com/ai-search/configuration/data-source/website/#custom-metadata) for details.  
#### Filter search results  
Use custom metadata fields in your search queries alongside built-in attributes like `folder` and `timestamp`:  
Terminal window  
```  
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai-search/instances/{NAME}/search \  -H "Content-Type: application/json" \  -H "Authorization: Bearer {API_TOKEN}" \  -d '{    "messages": [      {        "content": "How do I configure authentication?",        "role": "user"      }    ],    "ai_search_options": {      "retrieval": {        "filters": {          "category": "documentation",          "version": { "$gte": 2.0 }        }      }    }  }'  
```  
Learn more in the [metadata filtering documentation](https://developers.cloudflare.com/ai-search/configuration/indexing/metadata/).

Mar 19, 2026
1. ### [Moonshot AI Kimi K2.5 now available on Workers AI](https://developers.cloudflare.com/changelog/post/2026-03-19-kimi-k2-5-workers-ai/)  
[ Workers AI ](https://developers.cloudflare.com/workers-ai/)  
Workers AI is officially in the big models game. [@cf/moonshotai/kimi-k2.5](https://developers.cloudflare.com/workers-ai/models/kimi-k2.5/) is the first frontier-scale open-source model on our AI inference platform — a large model with a full 256k context window, multi-turn tool calling, vision inputs, and structured outputs. By bringing a frontier-scale model directly onto the Cloudflare Developer Platform, you can now run the entire agent lifecycle on a single, unified platform.  
The model has proven to be a fast, efficient alternative to larger proprietary models without sacrificing quality. As AI adoption increases, the volume of inference is skyrocketing — now you can access frontier intelligence at a fraction of the cost.  
#### Key capabilities

  * **256,000 token context window** for retaining full conversation history, tool definitions, and entire codebases across long-running agent sessions
  * **Multi-turn tool calling** for building agents that invoke tools across multiple conversation turns
  * **Vision inputs** for processing images alongside text
  * **Structured outputs** with JSON mode and JSON Schema support for reliable downstream parsing
  * **Function calling** for integrating external tools and APIs into agent workflows  
#### Prefix caching and session affinity  
When an agent sends a new prompt, it resends all previous prompts, tools, and context from the session. The delta between consecutive requests is usually just a few new lines of input. Prefix caching avoids reprocessing the shared context, saving time and compute from the prefill stage. This means faster Time to First Token (TTFT) and higher Tokens Per Second (TPS) throughput.  
Workers AI has done prefix caching, but we are now surfacing cached tokens as a usage metric and offering a discount on cached tokens compared to input tokens (pricing is listed on the [model page](https://developers.cloudflare.com/workers-ai/models/kimi-k2.5/)).  
Terminal window  
```  
curl -X POST \  "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/@cf/moonshotai/kimi-k2.5" \  -H "Authorization: Bearer {api_token}" \  -H "Content-Type: application/json" \  -H "x-session-affinity: ses_12345678" \  -d '{    "messages": [      {        "role": "system",        "content": "You are a helpful assistant."      },      {        "role": "user",        "content": "What is prefix caching and why does it matter?"      }    ],    "max_tokens": 2400,    "stream": true  }'  
```  
Some clients like [OpenCode ↗](https://opencode.ai) implement session affinity automatically. The [Agents SDK ↗](https://github.com/cloudflare/agents) starter also sets up the wiring for you.  
#### Redesigned asynchronous API  
For volumes of requests that exceed synchronous rate limits, you can submit batches of inferences to be completed asynchronously. We have revamped the [Asynchronous Batch API](https://developers.cloudflare.com/workers-ai/features/batch-api/) with a pull-based system that processes queued requests as soon as capacity is available. With internal testing, async requests usually execute within 5 minutes, but this depends on live traffic.  
The async API is the best way to avoid capacity errors in durable workflows. It is ideal for use cases that are not real-time, such as code scanning agents or research agents.  
To use the asynchronous API, pass `queueRequest: true`:  
JavaScript  
```  
// 1. Push a batch of requests into the queueconst res = await env.AI.run(  "@cf/moonshotai/kimi-k2.5",  {    requests: [      {        messages: [{ role: "user", content: "Tell me a joke" }],      },      {        messages: [{ role: "user", content: "Explain the Pythagoras theorem" }],      },    ],  },  { queueRequest: true },);  
// 2. Grab the request IDconst requestId = res.request_id;  
// 3. Poll for the resultconst result = await env.AI.run("@cf/moonshotai/kimi-k2.5", {  request_id: requestId,});  
if (result.status === "queued" || result.status === "running") {  // Retry by polling again} else {  return Response.json(result);}  
```  
You can also set up [event notifications](https://developers.cloudflare.com/workers-ai/platform/event-subscriptions/) to know when inference is complete instead of polling.  
#### Get started  
Use Kimi K2.5 through the [Workers AI binding](https://developers.cloudflare.com/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, [AI Gateway](https://developers.cloudflare.com/ai-gateway/), or via the [OpenAI-compatible endpoint](https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/).  
For more information, refer to the [Kimi K2.5 model page](https://developers.cloudflare.com/workers-ai/models/kimi-k2.5/), [pricing](https://developers.cloudflare.com/workers-ai/platform/pricing/), and [prompt caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/).

Mar 17, 2026
1. ### [@cloudflare/codemode v0.2.1: MCP barrel export, zero-dependency main entry point, and custom sandbox modules](https://developers.cloudflare.com/changelog/post/2026-03-17-codemode-sdk-v021/)  
[ Agents ](https://developers.cloudflare.com/agents/)[ Workers ](https://developers.cloudflare.com/workers/)  
The latest releases of [@cloudflare/codemode ↗](https://www.npmjs.com/package/@cloudflare/codemode) add a new MCP barrel export, remove `ai` and `zod` as required peer dependencies from the main entry point, and give you more control over the sandbox.  
#### New `@cloudflare/codemode/mcp` export  
A new `@cloudflare/codemode/mcp` entry point provides two functions that wrap MCP servers with Code Mode:

  * **`codeMcpServer({ server, executor })`** — wraps an existing MCP server with a single `code` tool where each upstream tool becomes a typed `codemode.*` method.
  * **`openApiMcpServer({ spec, executor, request })`** — creates `search` and `execute` MCP tools from an OpenAPI spec with host-side request proxying and automatic `$ref` resolution.

  * [  JavaScript ](#tab-panel-3470)
  * [  TypeScript ](#tab-panel-3471)  
JavaScript  
```  
import { codeMcpServer } from "@cloudflare/codemode/mcp";import { DynamicWorkerExecutor } from "@cloudflare/codemode";  
const executor = new DynamicWorkerExecutor({ loader: env.LOADER });  
// Wrap an existing MCP server — all its tools become// typed methods the LLM can call from generated codeconst server = await codeMcpServer({ server: upstreamMcp, executor });  
```  
TypeScript  
```  
import { codeMcpServer } from "@cloudflare/codemode/mcp";import { DynamicWorkerExecutor } from "@cloudflare/codemode";  
const executor = new DynamicWorkerExecutor({ loader: env.LOADER });  
// Wrap an existing MCP server — all its tools become// typed methods the LLM can call from generated codeconst server = await codeMcpServer({ server: upstreamMcp, executor });  
```  
#### Zero-dependency main entry point

**Breaking change in v0.2.0:** `generateTypes` and the `ToolDescriptor` / `ToolDescriptors` types have moved to `@cloudflare/codemode/ai`:

  * [  JavaScript ](#tab-panel-3468)
  * [  TypeScript ](#tab-panel-3469)  
JavaScript  
```  
// Beforeimport { generateTypes } from "@cloudflare/codemode";  
// Afterimport { generateTypes } from "@cloudflare/codemode/ai";  
```  
TypeScript  
```  
// Beforeimport { generateTypes } from "@cloudflare/codemode";  
// Afterimport { generateTypes } from "@cloudflare/codemode/ai";  
```  
The main entry point (`@cloudflare/codemode`) no longer requires the `ai` or `zod` peer dependencies. It now exports:

| Export                      | Description                                                 |
| --------------------------- | ----------------------------------------------------------- |
| sanitizeToolName            | Sanitize tool names into valid JS identifiers               |
| normalizeCode               | Normalize LLM-generated code into async arrow functions     |
| generateTypesFromJsonSchema | Generate TypeScript type definitions from plain JSON Schema |
| jsonSchemaToType            | Convert a single JSON Schema to a TypeScript type string    |
| DynamicWorkerExecutor       | Sandboxed code execution via Dynamic Worker Loader          |
| ToolDispatcher              | RPC target for dispatching tool calls from sandbox to host  |  
The `ai` and `zod` peer dependencies are now optional — only required when importing from `@cloudflare/codemode/ai`.  
#### Custom sandbox modules  
`DynamicWorkerExecutor` now accepts an optional `modules` option to inject custom ES modules into the sandbox:

  * [  JavaScript ](#tab-panel-3474)
  * [  TypeScript ](#tab-panel-3475)  
JavaScript  
```  
const executor = new DynamicWorkerExecutor({  loader: env.LOADER,  modules: {    "utils.js": `export function add(a, b) { return a + b; }`,  },});  
// Sandbox code can then: import { add } from "utils.js"  
```  
TypeScript  
```  
const executor = new DynamicWorkerExecutor({  loader: env.LOADER,  modules: {    "utils.js": `export function add(a, b) { return a + b; }`,  },});  
// Sandbox code can then: import { add } from "utils.js"  
```  
#### Internal normalization and sanitization  
`DynamicWorkerExecutor` now normalizes code and sanitizes tool names internally. You no longer need to call `normalizeCode()` or `sanitizeToolName()` before passing code and functions to `execute()`.  
#### Upgrade  
Terminal window  
```  
npm i @cloudflare/codemode@latest  
```  
See the [Code Mode documentation](https://developers.cloudflare.com/agents/tools/codemode/) for the full API reference.

Mar 17, 2026
1. ### [Log AI Gateway request metadata without storing payloads](https://developers.cloudflare.com/changelog/post/2026-03-17-collect-log-payload-header/)  
[ AI Gateway ](https://developers.cloudflare.com/ai-gateway/)  
AI Gateway now supports the `cf-aig-collect-log-payload` header, which controls whether request and response bodies are stored in logs. By default, this header is set to `true` and payloads are stored alongside metadata. Set this header to `false` to skip payload storage while still logging metadata such as token counts, model, provider, status code, cost, and duration.  
This is useful when you need usage metrics but do not want to persist sensitive prompt or response data.  
Terminal window  
```  
curl https://gateway.ai.cloudflare.com/v1/$ACCOUNT_ID/$GATEWAY_ID/openai/chat/completions \  --header "Authorization: Bearer $TOKEN" \  --header 'Content-Type: application/json' \  --header 'cf-aig-collect-log-payload: false' \  --data '{    "model": "gpt-4o-mini",    "messages": [      {        "role": "user",        "content": "What is the email address and phone number of user123?"      }    ]  }'  
```  
For more information, refer to [Logging](https://developers.cloudflare.com/ai-gateway/observability/logging/#collect-log-payload-cf-aig-collect-log-payload).

Mar 16, 2026
1. ### [Return up to 50 query results with values or metadata](https://developers.cloudflare.com/changelog/post/2026-03-16-topk-limit-increased-to-50/)  
[ Vectorize ](https://developers.cloudflare.com/vectorize/)  
You can now set `topK` up to `50` when a Vectorize query returns values or full metadata. This raises the previous limit of `20` for queries that use `returnValues: true` or `returnMetadata: "all"`.  
Use the higher limit when you need more matches in a single query response without dropping values or metadata. Refer to the [Vectorize API reference](https://developers.cloudflare.com/vectorize/reference/client-api/) for query options and current `topK` limits.

Mar 11, 2026
1. ### [NVIDIA Nemotron 3 Super now available on Workers AI](https://developers.cloudflare.com/changelog/post/2026-03-11-nemotron-3-super-workers-ai/)  
[ Workers AI ](https://developers.cloudflare.com/workers-ai/)  
We're excited to partner with NVIDIA to bring [@cf/nvidia/nemotron-3-120b-a12b](https://developers.cloudflare.com/workers-ai/models/nemotron-3-120b-a12b/) to Workers AI. NVIDIA Nemotron 3 Super is a Mixture-of-Experts (MoE) model with a hybrid Mamba-transformer architecture, 120B total parameters, and 12B active parameters per forward pass.  
The model is optimized for running many collaborating agents per application. It delivers high accuracy for reasoning, tool calling, and instruction following across complex multi-step tasks.

**Key capabilities:**

  * **Hybrid Mamba-transformer architecture** delivers over 50% higher token generation throughput compared to leading open models, reducing latency for real-world applications
  * **Tool calling** support for building AI agents that invoke tools across multiple conversation turns
  * **Multi-Token Prediction (MTP)** accelerates long-form text generation by predicting several future tokens simultaneously in a single forward pass
  * **32,000 token context window** for retaining conversation history and plan states across multi-step agent workflows  
Prompt caching  
For optimal performance with multi-turn conversations, send the `x-session-affinity` header with a unique session identifier to enable prompt caching. This routes requests to the same model instance, reducing latency and inference costs. For details, refer to [Prompt caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/).  
Use Nemotron 3 Super through the [Workers AI binding](https://developers.cloudflare.com/workers-ai/configuration/bindings/) (`env.AI.run()`), the REST API at `/run` or `/v1/chat/completions`, or the [OpenAI-compatible endpoint](https://developers.cloudflare.com/workers-ai/configuration/open-ai-compatibility/).  
For more information, refer to the [Nemotron 3 Super model page](https://developers.cloudflare.com/workers-ai/models/nemotron-3-120b-a12b/).

Mar 10, 2026
1. ### [Crawl entire websites with a single API call using Browser Rendering](https://developers.cloudflare.com/changelog/post/2026-03-10-br-crawl-endpoint/)  
[ Browser Run ](https://developers.cloudflare.com/browser-run/)  
_Edit: this post has been edited to clarify crawling behavior with respect to site guidance._  
You can now crawl an entire website with a single API call using [Browser Rendering](https://developers.cloudflare.com/browser-run/)'s new [/crawl endpoint](https://developers.cloudflare.com/browser-run/quick-actions/crawl-endpoint/), available in open beta. Submit a starting URL, and pages are automatically discovered, rendered in a headless browser, and returned in multiple formats, including HTML, Markdown, and structured JSON. The endpoint is a [signed-agent ↗](https://developers.cloudflare.com/bots/concepts/bot/signed-agents/) that respects robots.txt and [AI Crawl Control ↗](https://www.cloudflare.com/ai-crawl-control/) by default, making it easy for developers to comply with website rules, and making it less likely for crawlers to ignore web-owner guidance. This is great for training models, building RAG pipelines, and researching or monitoring content across a site.  
Crawl jobs run asynchronously. You submit a URL, receive a job ID, and check back for results as pages are processed.  
Terminal window  
```  
# Initiate a crawlcurl -X POST 'https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/crawl' \  -H 'Authorization: Bearer <apiToken>' \  -H 'Content-Type: application/json' \  -d '{    "url": "https://blog.cloudflare.com/"  }'  
# Check resultscurl -X GET 'https://api.cloudflare.com/client/v4/accounts/{account_id}/browser-rendering/crawl/{job_id}' \  -H 'Authorization: Bearer <apiToken>'  
```  
Key features:

  * **Multiple output formats** \- Return crawled content as HTML, Markdown, and structured JSON (powered by [Workers AI](https://developers.cloudflare.com/workers-ai/))
  * **Crawl scope controls** \- Configure crawl depth, page limits, and wildcard patterns to include or exclude specific URL paths
  * **Automatic page discovery** \- Discovers URLs from sitemaps, page links, or both
  * **Incremental crawling** \- Use `modifiedSince` and `maxAge` to skip pages that haven't changed or were recently fetched, saving time and cost on repeated crawls
  * **Static mode** \- Set `render: false` to fetch static HTML without spinning up a browser, for faster crawling of static sites
  * **Well-behaved bot** \- Honors `robots.txt` directives, including `crawl-delay`  
Available on both the Workers Free and Paid plans.

**Note**: the /crawl endpoint cannot bypass Cloudflare bot detection or captchas, and self-identifies as a bot.  
To get started, refer to the [crawl endpoint documentation](https://developers.cloudflare.com/browser-run/quick-actions/crawl-endpoint/). If you are setting up your own site to be crawled, review the [robots.txt and sitemaps best practices](https://developers.cloudflare.com/browser-run/reference/robots-txt/).

Mar 06, 2026
1. ### [Real-time transcription in RealtimeKit now supports 10 languages with regional variants](https://developers.cloudflare.com/changelog/post/2026-03-06-realtimekit-multilingual-transcription/)  
[ Workers AI ](https://developers.cloudflare.com/workers-ai/)[ Realtime ](https://developers.cloudflare.com/realtime/)  
[Real-time transcription](https://developers.cloudflare.com/realtime/realtimekit/ai/transcription/) in RealtimeKit now supports 10 languages with regional variants, powered by [Deepgram Nova-3](https://developers.cloudflare.com/workers-ai/models/nova-3/) running on [Workers AI](https://developers.cloudflare.com/workers-ai/).  
During a meeting, participant audio is routed through [AI Gateway](https://developers.cloudflare.com/ai-gateway/) to Nova-3 on Workers AI — so transcription runs on Cloudflare's network end-to-end, reducing latency compared to routing through external speech-to-text services.  
Set the language when [creating a meeting](https://developers.cloudflare.com/realtime/realtimekit/concepts/meeting/) via `ai_config.transcription.language`:  
```  
{  "ai_config": {    "transcription": {      "language": "fr"    }  }}  
```  
Supported languages include English, Spanish, French, German, Hindi, Russian, Portuguese, Japanese, Italian, and Dutch — with regional variants like `en-AU`, `en-GB`, `en-IN`, `en-NZ`, `es-419`, `fr-CA`, `de-CH`, `pt-BR`, and `pt-PT`. Use `multi` for automatic multilingual detection.  
If you are building voice agents or real-time translation workflows, your agent can now transcribe in the caller's language natively — no extra services or routing logic needed.

  * [Transcription docs](https://developers.cloudflare.com/realtime/realtimekit/ai/transcription/)
  * [Nova-3 model page](https://developers.cloudflare.com/workers-ai/models/nova-3/)
  * [Workers AI](https://developers.cloudflare.com/workers-ai/)
  * [AI Gateway](https://developers.cloudflare.com/ai-gateway/)

Mar 04, 2026
1. ### [Browser Rendering: 3x higher REST API request rate](https://developers.cloudflare.com/changelog/post/2026-03-04-br-rest-api-limit-increase/)  
[ Browser Run ](https://developers.cloudflare.com/browser-run/)  
[Browser Rendering](https://developers.cloudflare.com/browser-run/) REST API rate limits for Workers Paid plans have been increased from 3 requests per second (180/min) to **10 requests per second (600/min)**. No action is needed to benefit from the higher limit.  
![Browser Rendering REST API rate limit increased from 3 to 10 requests per second](https://developers.cloudflare.com/_astro/rest-api-limit-increase.DJHY7xYF_1U7IJn.webp)  
The [REST API](https://developers.cloudflare.com/browser-run/quick-actions/) lets you perform common browser tasks with a single API call, and you can now do it at a higher rate.

  * [/content - Fetch HTML](https://developers.cloudflare.com/browser-run/quick-actions/content-endpoint/)
  * [/screenshot - Capture screenshot](https://developers.cloudflare.com/browser-run/quick-actions/screenshot-endpoint/)
  * [/pdf - Render PDF](https://developers.cloudflare.com/browser-run/quick-actions/pdf-endpoint/)
  * [/markdown - Extract Markdown from a webpage](https://developers.cloudflare.com/browser-run/quick-actions/markdown-endpoint/)
  * [/snapshot - Take a webpage snapshot](https://developers.cloudflare.com/browser-run/quick-actions/snapshot/)
  * [/scrape - Scrape HTML elements](https://developers.cloudflare.com/browser-run/quick-actions/scrape-endpoint/)
  * [/json - Capture structured data using AI](https://developers.cloudflare.com/browser-run/quick-actions/json-endpoint/)
  * [/links - Retrieve links from a webpage](https://developers.cloudflare.com/browser-run/quick-actions/links-endpoint/)  
If you use the [Browser Sessions](https://developers.cloudflare.com/browser-run/#integration-methods) method, increases to concurrent browser and new browser limits are coming soon. Stay tuned.  
For full details, refer to the [Browser Rendering limits page](https://developers.cloudflare.com/browser-run/limits/).

Mar 04, 2026
1. ### [New conversion options for Markdown Conversion](https://developers.cloudflare.com/changelog/post/2026-03-04-new-markdown-conversion-options/)  
[ Workers AI ](https://developers.cloudflare.com/workers-ai/)  
You can now customize how the [Markdown Conversion](https://developers.cloudflare.com/workers-ai/features/markdown-conversion/) service processes different file types by passing a `conversionOptions` object.  
Available options:

  * **Images**: Set the language for AI-generated image descriptions
  * **HTML**: Use CSS selectors to extract specific content, or provide a hostname to resolve relative links
  * **PDF**: Exclude metadata from the output  
Use the [env.AI](https://developers.cloudflare.com/workers-ai/features/markdown-conversion/usage/binding/) binding:

  * [  JavaScript ](#tab-panel-3476)
  * [  TypeScript ](#tab-panel-3477)  
JavaScript  
```  
await env.AI.toMarkdown(  { name: "page.html", blob: new Blob([html]) },  {    conversionOptions: {      html: { cssSelector: "article.content" },      image: { descriptionLanguage: "es" },    },  },);  
```  
TypeScript  
```  
await env.AI.toMarkdown(  { name: "page.html", blob: new Blob([html]) },  {    conversionOptions: {      html: { cssSelector: "article.content" },      image: { descriptionLanguage: "es" },    },  },);  
```  
Or call the REST API:  
Terminal window  
```  
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/tomarkdown \  -H 'Authorization: Bearer {API_TOKEN}' \  -F 'files=@index.html' \  -F 'conversionOptions={"html": {"cssSelector": "article.content"}}'  
```  
For more details, refer to [Conversion Options](https://developers.cloudflare.com/workers-ai/features/markdown-conversion/conversion-options/).

Mar 03, 2026
1. ### [Real-time file watching in Sandboxes](https://developers.cloudflare.com/changelog/post/2026-03-03-sandbox-watch-file-events/)  
[ Agents ](https://developers.cloudflare.com/agents/)  
[Sandboxes](https://developers.cloudflare.com/sandbox/) now support real-time filesystem watching via `sandbox.watch()`. The method returns a [Server-Sent Events ↗](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent%5Fevents) stream backed by native inotify, so your Worker receives `create`, `modify`, `delete`, and `move` events as they happen inside the container.  
#### `sandbox.watch(path, options)`  
Pass a directory path and optional filters. The returned stream is a standard `ReadableStream` you can proxy directly to a browser client or consume server-side.

  * [  JavaScript ](#tab-panel-3478)
  * [  TypeScript ](#tab-panel-3479)  
JavaScript  
```  
// Stream events to a browser clientconst stream = await sandbox.watch("/workspace/src", {  recursive: true,  include: ["*.ts", "*.js"],});  
return new Response(stream, {  headers: { "Content-Type": "text/event-stream" },});  
```  
TypeScript  
```  
// Stream events to a browser clientconst stream = await sandbox.watch("/workspace/src", {  recursive: true,  include: ["*.ts", "*.js"],});  
return new Response(stream, {  headers: { "Content-Type": "text/event-stream" },});  
```  
#### Server-side consumption with `parseSSEStream`  
Use `parseSSEStream` to iterate over events inside a Worker without forwarding them to a client.

  * [  JavaScript ](#tab-panel-3480)
  * [  TypeScript ](#tab-panel-3481)  
JavaScript  
```  
import { parseSSEStream } from "@cloudflare/sandbox";  
const stream = await sandbox.watch("/workspace/src", { recursive: true });  
for await (const event of parseSSEStream(stream)) {  console.log(event.type, event.path);}  
```  
TypeScript  
```  
import { parseSSEStream } from "@cloudflare/sandbox";import type { FileWatchSSEEvent } from "@cloudflare/sandbox";  
const stream = await sandbox.watch("/workspace/src", { recursive: true });  
for await (const event of parseSSEStream<FileWatchSSEEvent>(stream)) {  console.log(event.type, event.path);}  
```  
Each event includes a `type` field (`create`, `modify`, `delete`, or `move`) and the affected `path`. Move events also include a `from` field with the original path.  
#### Options

| Option    | Type       | Description                                                 |
| --------- | ---------- | ----------------------------------------------------------- |
| recursive | boolean    | Watch subdirectories. Defaults to false.                    |
| include   | string\[\] | Glob patterns to filter events. Omit to receive all events. |  
#### Upgrade  
To update to the latest version:  
Terminal window  
```  
npm i @cloudflare/sandbox@latest  
```  
For full API details, refer to the [Sandbox file watching reference](https://developers.cloudflare.com/sandbox/api/file-watching/).

Mar 02, 2026
1. ### [Agents SDK v0.7.0: Observability rewrite, keepAlive, and waitForMcpConnections](https://developers.cloudflare.com/changelog/post/2026-03-02-agents-sdk-v070/)  
[ Agents ](https://developers.cloudflare.com/agents/)[ Workers ](https://developers.cloudflare.com/workers/)  
The latest release of the [Agents SDK ↗](https://github.com/cloudflare/agents) rewrites observability from scratch with `diagnostics_channel`, adds `keepAlive()` to prevent Durable Object eviction during long-running work, and introduces `waitForMcpConnections` so MCP tools are always available when `onChatMessage` runs.  
#### Observability rewrite  
The previous observability system used `console.log()` with a custom `Observability.emit()` interface. v0.7.0 replaces it with structured events published to [diagnostics channels](https://developers.cloudflare.com/workers/runtime-apis/nodejs/diagnostics-channel/) — silent by default, zero overhead when nobody is listening.  
Every event has a `type`, `payload`, and `timestamp`. Events are routed to seven named channels:

| Channel          | Event types                                                                                                                                      |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| agents:state     | state:update                                                                                                                                     |
| agents:rpc       | rpc, rpc:error                                                                                                                                   |
| agents:message   | message:request, message:response, message:clear, message:cancel, message:error, tool:result, tool:approval                                      |
| agents:schedule  | schedule:create, schedule:execute, schedule:cancel, schedule:retry, schedule:error, queue:retry, queue:error                                     |
| agents:lifecycle | connect, destroy                                                                                                                                 |
| agents:workflow  | workflow:start, workflow:event, workflow:approved, workflow:rejected, workflow:terminated, workflow:paused, workflow:resumed, workflow:restarted |
| agents:mcp       | mcp:client:preconnect, mcp:client:connect, mcp:client:authorize, mcp:client:discover                                                             |  
Use the typed `subscribe()` helper from `agents/observability` for type-safe access:

  * [  JavaScript ](#tab-panel-3488)
  * [  TypeScript ](#tab-panel-3489)  
JavaScript  
```  
import { subscribe } from "agents/observability";  
const unsub = subscribe("rpc", (event) => {  if (event.type === "rpc") {    console.log(`RPC call: ${event.payload.method}`);  }  if (event.type === "rpc:error") {    console.error(      `RPC failed: ${event.payload.method} — ${event.payload.error}`,    );  }});  
// Clean up when doneunsub();  
```  
TypeScript  
```  
import { subscribe } from "agents/observability";  
const unsub = subscribe("rpc", (event) => {  if (event.type === "rpc") {    console.log(`RPC call: ${event.payload.method}`);  }  if (event.type === "rpc:error") {    console.error(      `RPC failed: ${event.payload.method} — ${event.payload.error}`,    );  }});  
// Clean up when doneunsub();  
```  
In production, all diagnostics channel messages are automatically forwarded to [Tail Workers](https://developers.cloudflare.com/workers/observability/logs/tail-workers/) — no subscription code needed in the agent itself:

  * [  JavaScript ](#tab-panel-3486)
  * [  TypeScript ](#tab-panel-3487)  
JavaScript  
```  
export default {  async tail(events) {    for (const event of events) {      for (const msg of event.diagnosticsChannelEvents) {        // msg.channel is "agents:rpc", "agents:workflow", etc.        console.log(msg.timestamp, msg.channel, msg.message);      }    }  },};  
```  
TypeScript  
```  
export default {  async tail(events) {    for (const event of events) {      for (const msg of event.diagnosticsChannelEvents) {        // msg.channel is "agents:rpc", "agents:workflow", etc.        console.log(msg.timestamp, msg.channel, msg.message);      }    }  },};  
```  
The custom `Observability` override interface is still supported for users who need to filter or forward events to external services.  
For the full event reference, refer to the [Observability documentation](https://developers.cloudflare.com/agents/runtime/operations/observability/).  
#### `keepAlive()` and `keepAliveWhile()`  
Durable Objects are evicted after a period of inactivity (typically 70-140 seconds with no incoming requests, WebSocket messages, or alarms). During long-running operations — streaming LLM responses, waiting on external APIs, running multi-step computations — the agent can be evicted mid-flight.  
`keepAlive()` prevents this by creating a 30-second heartbeat schedule. The alarm firing resets the inactivity timer. Returns a disposer function that cancels the heartbeat when called.

  * [  JavaScript ](#tab-panel-3484)
  * [  TypeScript ](#tab-panel-3485)  
JavaScript  
```  
const dispose = await this.keepAlive();try {  const result = await longRunningComputation();  await sendResults(result);} finally {  dispose();}  
```  
TypeScript  
```  
const dispose = await this.keepAlive();try {  const result = await longRunningComputation();  await sendResults(result);} finally {  dispose();}  
```  
`keepAliveWhile()` wraps an async function with automatic cleanup — the heartbeat starts before the function runs and stops when it completes:

  * [  JavaScript ](#tab-panel-3482)
  * [  TypeScript ](#tab-panel-3483)  
JavaScript  
```  
const result = await this.keepAliveWhile(async () => {  const data = await longRunningComputation();  return data;});  
```  
TypeScript  
```  
const result = await this.keepAliveWhile(async () => {  const data = await longRunningComputation();  return data;});  
```  
Key details:

  * **Multiple concurrent callers** — Each `keepAlive()` call returns an independent disposer. Disposing one does not affect others.
  * **AIChatAgent built-in** — `AIChatAgent` automatically calls `keepAlive()` during streaming responses. You do not need to add it yourself.
  * **Uses the scheduling system** — The heartbeat does not conflict with your own schedules. It shows up in `getSchedules()` if you need to inspect it.  
Note  
`keepAlive()` is marked `@experimental` and may change between releases.  
For the full API reference and when-to-use guidance, refer to [Schedule tasks — Keeping the agent alive](https://developers.cloudflare.com/agents/runtime/execution/schedule-tasks/#keeping-the-agent-alive).  
#### `waitForMcpConnections`  
`AIChatAgent` now waits for MCP server connections to settle before calling `onChatMessage`. This ensures `this.mcp.getAITools()` returns the full set of tools, especially after Durable Object hibernation when connections are being restored in the background.

  * [  JavaScript ](#tab-panel-3490)
  * [  TypeScript ](#tab-panel-3491)  
JavaScript  
```  
export class ChatAgent extends AIChatAgent {  // Default — waits up to 10 seconds  // waitForMcpConnections = { timeout: 10_000 };  
  // Wait forever  waitForMcpConnections = true;  
  // Disable waiting  waitForMcpConnections = false;}  
```  
TypeScript  
```  
export class ChatAgent extends AIChatAgent {  // Default — waits up to 10 seconds  // waitForMcpConnections = { timeout: 10_000 };  
  // Wait forever  waitForMcpConnections = true;  
  // Disable waiting  waitForMcpConnections = false;}  
```

| Value                | Behavior                                      |
| -------------------- | --------------------------------------------- |
| { timeout: 10\_000 } | Wait up to 10 seconds (default)               |
| { timeout: N }       | Wait up to N milliseconds                     |
| true                 | Wait indefinitely until all connections ready |
| false                | Do not wait (old behavior before 0.2.0)       |  
For lower-level control, call `this.mcp.waitForConnections()` directly inside `onChatMessage` instead.  
#### Other improvements

  * **MCP deduplication by name and URL** — `addMcpServer` with HTTP transport now deduplicates on both server name and URL. Calling it with the same name but a different URL creates a new connection. URLs are normalized before comparison (trailing slashes, default ports, hostname case).
  * **`callbackHost` optional for non-OAuth servers** — `addMcpServer` no longer requires `callbackHost` when connecting to MCP servers that do not use OAuth.
  * **MCP URL security** — Server URLs are validated before connection to prevent SSRF. Private IP ranges, loopback addresses, link-local addresses, and cloud metadata endpoints are blocked.
  * **Custom denial messages** — `addToolOutput` now supports `state: "output-error"` with `errorText` for custom denial messages in human-in-the-loop tool approval flows.
  * **`requestId` in chat options** — `onChatMessage` options now include a `requestId` for logging and correlating events.  
#### Upgrade  
To update to the latest version:  
Terminal window  
```  
npm i agents@latest @cloudflare/ai-chat@latest  
```

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/product-group/ai/2/#page","headline":"AI Changelog | Cloudflare Docs","url":"https://developers.cloudflare.com/changelog/product-group/ai/2/","inLanguage":"en","image":"https://developers.cloudflare.com/cf-twitter-card.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
