---
description: A web_search tool backed by the Cloudflare Web Search API, with adapters for Pi Durable, AI SDK, and TanStack AI.
title: New web_search tool in the Agents SDK, powered by the Cloudflare Web Search API
image: https://developers.cloudflare.com/changelog/post/2026-10-12-web-search/og.png?v=6131e1c1132d34eb
---

[Skip to content](#main-content)

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

[Back to all posts](https://developers.cloudflare.com/changelog)

October 12, 2026

## New web\_search tool in the Agents SDK, powered by the Cloudflare Web Search API

[Agents](https://developers.cloudflare.com/agents/)

Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/changelog/post/2026-10-12-web-search/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

The [Cloudflare Agents SDK](https://developers.cloudflare.com/agents/) now provides a `web_search` tool that searches the public web through the [Cloudflare Web Search API](https://developers.cloudflare.com/web-search/), powered by [ceramic.ai, Exa, and Linkup](https://developers.cloudflare.com/web-search/providers/).

When you give the `web_search` tool to your agent, the model provides a query and max results, and receives back a short numbered list of titles, URLs, and trimmed descriptions. When you also provide the [`web_fetch`](https://developers.cloudflare.com/agents/tools/web-fetch/) tool to your agent, the model is told to use it to read the pages that the `web_search` tool returns.

To use the `web_search` tool, make sure you have [Agents SDK v0.27.0 ↗︎](https://github.com/cloudflare/agents/releases/tag/agents%400.27.0) or greater installed, and add it to a [Pi Durable](https://developers.cloudflare.com/agents/harnesses/pi/) [extension registry](https://developers.cloudflare.com/agents/harnesses/pi/extensions/) before opening the harness:

```js
import { webSearchTool } from "agents/websearch/pi";

export class MyAgent extends DurableObject {
	// ...

	harness = new PiHarness({
		harness: async ({ storage, context }) => {
			this.registry.install({
				name: "web-tools",
				tools: [webSearchTool({ binding: this.env.AI, provider: "exa" })],
			});

			// ...

			return Harness.open(
				storage,
				{ models, registry: this.registry },
				context,
			);
		},
	});
}
```

```ts
import { webSearchTool } from "agents/websearch/pi";

export class MyAgent extends DurableObject<Env> {
	// ...

	readonly harness = new PiHarness({
		harness: async ({ storage, context }) => {
			this.registry.install({
				name: "web-tools",
				tools: [webSearchTool({ binding: this.env.AI, provider: "exa" })],
			});

			// ...

			return Harness.open(
				storage,
				{ models, registry: this.registry },
				context,
			);
		},
	});
}
```

The SDK also includes AI SDK and TanStack AI adapters. To search without a model, such as from a scheduled job, use `createAIWebSearch()` or `createHTTPWebSearch()` from `agents/websearch`.

For setup, options, and error handling, refer to [Web search](https://developers.cloudflare.com/agents/tools/web-search/).

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://developers.cloudflare.com/changelog/post/2026-10-12-web-search/#page","headline":"New web_search tool in the Agents SDK, powered by the Cloudflare Web Search API","description":"A web_search tool backed by the Cloudflare Web Search API, with adapters for Pi Durable, AI SDK, and TanStack AI.","url":"https://developers.cloudflare.com/changelog/post/2026-10-12-web-search/","inLanguage":"en","image":"https://developers.cloudflare.com/changelog/post/2026-10-12-web-search/og.png?v=6131e1c1132d34eb","dateModified":"2026-10-12","datePublished":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
