You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Access AI Search instances with the new ai_search_namespaces binding for namespace isolation, dynamic instance management, and file uploads.
2
+
title: New AI Search bindings, built-in storage, and cross-instance search
3
+
description: Access AI Search from Workers with two new bindings, upload files directly to built-in storage, and search across multiple instances in a single call.
4
4
products:
5
5
- ai-search
6
6
date: 2026-04-16
7
7
---
8
8
9
-
The new `ai_search_namespaces`[Workers binding](/ai-search/api/search/workers-binding/) provides first-class access to [AI Search](/ai-search/)from your Worker. The binding follows the same pattern as `kv_namespaces` and `r2_buckets`, and supports dynamic instance management at runtime.
9
+
[AI Search](/ai-search/)now ships with two new Workers bindings, built-in storage for every new instance, and cross-instance search.
10
10
11
-
## What is new
11
+
## New Workers bindings
12
12
13
-
-**Namespace isolation**: Group instances into [namespaces](/ai-search/concepts/namespaces/) for environment or tenant separation
14
-
-**Dynamic instance management**: Create, update, and delete instances at runtime without redeploying
15
-
-**Items API**: Upload and manage individual documents through the [Items API](/ai-search/api/items/workers-binding/)
16
-
-**Streaming**: Stream chat completion responses as Server-Sent Events
17
-
-**Messages-based API**: Uses a `messages` array format consistent with chat completion APIs
13
+
AI Search introduces two new Workers bindings for accessing AI Search from a [Cloudflare Worker](/workers/).
18
14
19
-
## Example
20
-
21
-
Add the binding to your Wrangler configuration and start querying:
15
+
The `ai_search_namespaces` binding gives your Worker access to all instances within a [namespace](/ai-search/concepts/namespaces/). You can create, update, and delete instances at runtime without redeploying:
messages: [{ role: "user", content: "What is Cloudflare?" }],
41
+
});
40
42
```
41
43
42
-
## Requirements
44
+
Refer to [Namespaces](/ai-search/concepts/namespaces/) for details on the difference between the two bindings.
43
45
44
-
| Package | Minimum version |
45
-
| --------------------------- | --------------- |
46
-
|`@cloudflare/workers-types`|`4.20260304.0`|
47
-
|`wrangler`|`4.68.1`|
46
+
## Built-in storage
48
47
49
-
## Backwards compatibility
48
+
New AI Search instances come with built-in storage and a built-in vector index, powered by [R2](/r2/) and [Vectorize](/vectorize/). You can upload files directly to an instance and they are indexed automatically. No need to set up an R2 bucket or Vectorize index yourself.
49
+
50
+
Upload files using the [Items API](/ai-search/api/items/workers-binding/) or the **Items** tab in the dashboard. You can also connect an external data source like a website or R2 bucket alongside built-in storage.
51
+
52
+
Refer to [Built-in storage](/ai-search/configuration/data-source/built-in-storage/) for details.
53
+
54
+
## Cross-instance search
55
+
56
+
You can now search across multiple instances in a single call using the namespace binding. Pass an array of instance IDs and get one ranked list back. Each chunk in the response includes an `instance_id` field identifying which instance it came from.
57
+
58
+
```ts
59
+
const results =awaitenv.AI_SEARCH.search({
60
+
messages: [{ role: "user", content: "What is Cloudflare?" }],
The previous `env.AI.autorag()` binding is deprecated but will continue to work indefinitely. Existing code does not need to be migrated.
67
+
This is useful when you need to search across different data sources. For example, a support agent can search shared product docs and per-customer history in one call.
52
68
53
-
For full documentation, refer to the [Workers binding guide](/ai-search/api/search/workers-binding/).
69
+
Refer to [Namespace-level search](/ai-search/api/search/workers-binding/#namespace-level) for details.
description: Combine vector and keyword search in a single query, and boost results by metadata fields like timestamp or priority.
4
+
products:
5
+
- ai-search
6
+
date: 2026-04-16
7
+
---
8
+
9
+
[AI Search](/ai-search/) now supports hybrid search and relevance boosting, giving you more control over how results are found and ranked.
10
+
11
+
## Hybrid search
12
+
13
+
Hybrid search combines vector (semantic) search with BM25 keyword search in a single query. Vector search understands intent, but it can miss queries that depend on a specific term appearing exactly. For example, a query for "Go errors help" might return Java or Python docs because the embedding model prioritizes the broad context of "error handling" over the word "Go." Keyword search fills that gap by matching the exact terms in your query.
14
+
15
+
When you enable hybrid search, both run in parallel and the results are fused into a single ranked list. You can configure the tokenizer (`porter` for natural language, `trigram` for code), keyword match mode (`and` for precision, `or` for recall), and fusion method (`rrf` or `max`) per instance:
Refer to [Search modes](/ai-search/concepts/search-modes/) for an overview and [Hybrid search](/ai-search/configuration/indexing/hybrid-search/) for configuration details.
28
+
29
+
## Relevance boosting
30
+
31
+
Relevance boosting lets you nudge search rankings based on document metadata. For example, you can prioritize recent documents by boosting on `timestamp`, or surface high-priority content by boosting on a custom metadata field like `priority`.
32
+
33
+
Configure up to 3 boost fields per instance or override them per request:
Copy file name to clipboardExpand all lines: src/content/docs/ai-search/how-to/nlweb.mdx
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,12 @@ sidebar:
5
5
order: 6
6
6
---
7
7
8
+
import { YouTube } from"~/components";
9
+
8
10
Enable conversational search on your website with NLWeb and Cloudflare AI Search. This template crawls your site, indexes the content, and deploys NLWeb-standard endpoints to serve both people and AI agents.
9
11
12
+
<YouTubeid="Az6NKLjSZMM" />
13
+
10
14
:::note
11
15
This is a public preview ideal for experimentation. If you're interested in running this in production workflows, please contact us at nlweb@cloudflare.com.
12
16
:::
@@ -26,9 +30,9 @@ You can deploy NLWeb on your website directly through the AI Search dashboard:
26
30
2. Go to **Compute & AI** > **AI Search**.
27
31
3. Select **Create**.
28
32
4. Select **Website** as a data source.
29
-
4. Follow the instructions to create an AI Search instance.
30
-
5. Go to the **Settings** for the instance
31
-
6. Find **NLWeb Worker** and select "Enable AI Search for your website".
33
+
5. Follow the instructions to create an AI Search instance.
34
+
6. Go to the **Settings** for the instance
35
+
7. Find **NLWeb Worker** and select "Enable AI Search for your website".
32
36
33
37
Once complete, AI Search will deploy an NLWeb Worker for you that enables you to use the NLWeb API Endpoints.
34
38
@@ -37,16 +41,16 @@ Once complete, AI Search will deploy an NLWeb Worker for you that enables you to
37
41
Choosing the NLWeb Website option extends a normal AI Search by tailoring it for content‑heavy websites and giving you everything that is required to adopt NLWeb as the standard for conversational search on your site. Specifically, the template provides:
38
42
39
43
-**Website as a data source:** Uses [Website](/ai-search/configuration/data-source/website/) as data source option to crawl and ingest pages with the Rendered Sites option.
40
-
-**Defaults for content-heavy websites:**Applies tuned embedding and retrieval configurations ideal for publishing and content‑rich websites.
44
+
-**Defaults for content-heavy websites:** Applies tuned embedding and retrieval configurations ideal for publishing and content‑rich websites.
41
45
-**NLWeb Worker deployment:** Automatically spins up a Cloudflare Worker from the [NLWeb Worker template](https://github.com/cloudflare/templates).
42
46
43
47
## What the Worker includes
44
48
45
49
Your deployed Worker provides two endpoints:
46
50
47
51
-`/ask` — NLWeb’s standard conversational endpoint
48
-
- Powers the conversational UI at the root (`/`)
49
-
- Powers the embeddable preview widget (`/snippet.html`)
52
+
- Powers the conversational UI at the root (`/`)
53
+
- Powers the embeddable preview widget (`/snippet.html`)
50
54
-`/mcp` — NLWeb’s MCP server endpoint for trusted AI agents
51
55
52
56
These endpoints give both people and agents structured access to your content.
@@ -56,9 +60,11 @@ These endpoints give both people and agents structured access to your content.
56
60
To integrate NLWeb search directly into your site you can:
57
61
58
62
1. Find your deployed Worker in the [Cloudflare dashboard](https://dash.cloudflare.com/):
59
-
- Go to **Compute & AI** > **AI Search**.
60
-
- Select **Connect**, then go to the **NLWeb** tab.
61
-
- Select **Go to Worker**.
63
+
64
+
- Go to **Compute & AI** > **AI Search**.
65
+
- Select **Connect**, then go to the **NLWeb** tab.
66
+
- Select **Go to Worker**.
67
+
62
68
2. Add a [custom domain](/workers/configuration/routing/custom-domains/) to your Worker (for example, ask.example.com)
63
69
3. Use the `/ask` endpoint on your custom domain to power the search (for example, ask.example.com/ask)
64
70
@@ -87,7 +93,6 @@ You can also use the embeddable snippet to add a search UI directly into your we
87
93
88
94
This lets you serve conversational AI search directly from your own domain, with control over how people and agents access your content.
89
95
90
-
91
96
## Modifying or updating the Worker
92
97
93
98
You may want to customize your Worker, for example, to adjust the UI for the embeddable snippet. In those cases, we recommend calling the `/ask` endpoint for queries and building your own UI on top of it, however, you may also choose to modify the Worker's code for the embeddable UI.
@@ -104,7 +109,7 @@ To do so:
104
109
2. Enter the name of your AI Search in the `RAG_ID` environment variable field.
105
110
3. Click **Deploy**.
106
111
4. Select the **GitHub/GitLab** icon on the Workers Dashboard.
107
-
4. Clone the repository that is created for your Worker.
108
-
5. Make your modifications, then commit and push changes to the repository to update your Worker.
112
+
5. Clone the repository that is created for your Worker.
113
+
6. Make your modifications, then commit and push changes to the repository to update your Worker.
109
114
110
-
Now you can use this Worker as the new NLWeb endpoint for your website.
115
+
Now you can use this Worker as the new NLWeb endpoint for your website.
Copy file name to clipboardExpand all lines: src/content/docs/ai-search/index.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,10 @@ You can use AI Search for:
48
48
</LinkButton>
49
49
</div>
50
50
51
+
:::note[Latest update]
52
+
New AI Search instances created after April 16, 2026 include [managed storage](/ai-search/configuration/data-source/built-in-storage/), vector index, and web crawling at no additional cost during the open beta. [View limits and pricing](/ai-search/platform/limits-pricing/).
Copy file name to clipboardExpand all lines: src/content/release-notes/ai-search.yaml
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,25 @@ productName: AI Search
4
4
productLink: "/ai-search/"
5
5
entries:
6
6
- publish_date: "2026-04-16"
7
-
title: AI Search namespace binding
7
+
title: Hybrid search
8
8
description: |-
9
-
The new `ai_search_namespaces` [Workers binding](/ai-search/api/search/workers-binding/) provides first-class access to AI Search from your Worker. Group instances into [namespaces](/ai-search/concepts/namespaces/) for isolation, create and manage instances at runtime, and upload documents through the [Items API](/ai-search/api/items/workers-binding/). The previous `env.AI.autorag()` binding continues to work.
9
+
AI Search now supports [hybrid search](/ai-search/configuration/indexing/hybrid-search/), combining vector and BM25 keyword search in a single query. Configure the tokenizer, keyword match mode, and fusion method per instance. Refer to [Search modes](/ai-search/concepts/search-modes/) for an overview.
10
+
- publish_date: "2026-04-16"
11
+
title: Built-in storage
12
+
description: |-
13
+
New AI Search instances come with [built-in storage](/ai-search/configuration/data-source/built-in-storage/) and a vector index. Upload files directly to an instance using the Items API or the dashboard without setting up external infrastructure.
14
+
- publish_date: "2026-04-16"
15
+
title: Relevance boosting
16
+
description: |-
17
+
Boost search results by metadata fields like timestamp or priority using [relevance boosting](/ai-search/configuration/retrieval/boosting/). Configure up to 3 boost fields per instance or per request.
18
+
- publish_date: "2026-04-16"
19
+
title: Cross-instance search
20
+
description: |-
21
+
Search across multiple AI Search instances in a single call using [namespace-level search](/ai-search/api/search/workers-binding/#namespace-level). Results are merged and ranked, with each chunk identifying which instance it came from.
22
+
- publish_date: "2026-04-16"
23
+
title: New AI Search Workers bindings
24
+
description: |-
25
+
Two new [Workers bindings](/ai-search/api/search/workers-binding/) for AI Search. The `ai_search_namespaces` binding gives access to all instances within a [namespace](/ai-search/concepts/namespaces/) and supports dynamic instance management at runtime. The `ai_search` binding binds directly to a single instance for simpler use cases.
0 commit comments