Skip to content

[AI Search] Namespace binding docs, API restructure, and managed storage#29601

Open
aninibread wants to merge 6 commits intoproductionfrom
anni/ais-namespace-binding
Open

[AI Search] Namespace binding docs, API restructure, and managed storage#29601
aninibread wants to merge 6 commits intoproductionfrom
anni/ais-namespace-binding

Conversation

@aninibread
Copy link
Copy Markdown
Contributor

Summary

  • Documents the new ai_search_namespaces Workers binding with full API reference for Search, Instances, and Items APIs
  • Restructures the AI Search docs under a unified api/ section
  • Updates the overview page, get-started guides, and service API token docs for managed storage (no R2 prerequisite)

Changes

New pages

  • Namespace concepts (concepts/namespaces.mdx): Explains namespaces, bindings, default namespace, multi-namespace usage
  • API section (api/): Unified section with Search, Instances, Items, and Migration sub-sections
    • Search API: Workers binding (search, chatCompletions, streaming), REST API, public endpoint, MCP
    • Instance API: Workers binding (get, list, create, delete, update, info, stats), REST API
    • Items API: Workers binding (upload, uploadAndPoll, list, delete, get), REST API
    • Migration: Workers binding (autorag → namespace binding) and REST API (autorag → ai-search endpoints)
  • How-to examples: Multi-language search, build a knowledge base, per-tenant search
  • Changelog: April 16 entry for namespace binding

Updated pages

  • Overview (index.mdx): New positioning, description, and feature cards (metadata filtering, MCP + UI snippets, similarity caching)
  • Get started (dashboard): Simplified flow, data source is optional, new Items tab upload section
  • Get started (API): Simplified to 3 steps (create token → create instance → upload content), R2 prerequisite removed
  • Service API token: Clarified as only needed for R2 connections, includes full API creation flow
  • Wrangler config reference: Added ai_search_namespaces section
  • Config pages (reranking, system-prompt, retrieval): Updated code examples to namespace binding
  • How-to pages (BYOM, simple search engine): Updated code examples to namespace binding
  • Create instance params: Added index_method (replaces hybrid_search_enabled), type/source now optional

Structural changes

  • Moved usage/api/search/
  • Moved instances-api/api/instances/
  • Extracted Items API into api/items/
  • Moved migration docs to api/migration/
  • Added redirects for all moved pages
  • Updated 40+ cross-references across 21 files

Binding naming

  • Uses env.AI_SEARCH as the standard binding name throughout (clear, unambiguous)
  • Examples use BLOG, TENANTS, PROD_DOCS/STAGING_DOCS where contextually appropriate

aninibread and others added 5 commits April 5, 2026 13:35
Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com>
Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com>
…update overview

- Add ai_search_namespaces binding documentation with full API reference
- Restructure docs under api/ section: Search, Instances, Items, Migration
- Add namespace concept page under concepts/
- Add Items API documentation (upload, uploadAndPoll, list, delete, get)
- Add how-to examples: multi-language search, knowledge base, per-tenant search
- Update overview page with new positioning and feature cards
- Update get-started pages for managed storage (no R2 prerequisite)
- Update service API token page (only required for R2 connections)
- Update wrangler configuration reference with ai_search_namespaces
- Update all cross-references and add redirects for moved pages
- Update code examples across config and how-to pages to use namespace binding
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /ai-search/usage/
  • /ai-search/how-to/migrate-from-autorag-api/
  • /ai-search/usage/mcp/
  • /ai-search/usage/public-endpoint/
  • /ai-search/usage/rest-api/
  • /ai-search/usage/workers-binding/

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/public/__redirects @cloudflare/content-engineering, @cloudflare/pcx-technical-writing
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/ai-search/ @rita3ko, @irvinebroque, @aninibread, @cloudflare/pcx-technical-writing
/src/content/docs/workers/wrangler/ @cloudflare/wrangler, @irvinebroque, @cloudflare/pcx-technical-writing
* @cloudflare/pcx-technical-writing

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Preview URL: https://1dd0e0ef.preview.developers.cloudflare.com
Preview Branch URL: https://anni-ais-namespace-binding.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/ai-search/get-started/api/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/get-started/api/
https://developers.cloudflare.com/ai-search/api/instances/workers-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/instances/workers-binding/
https://developers.cloudflare.com/ai-search/api/items/workers-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/items/workers-binding/
https://developers.cloudflare.com/ai-search/usage/workers-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/usage/workers-binding/
https://developers.cloudflare.com/ai-search/api/search/workers-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/search/workers-binding/
https://developers.cloudflare.com/ai-search/api/workers-binding-legacy/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/workers-binding-legacy/
https://developers.cloudflare.com/ai-search/configuration/service-api-token/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/configuration/service-api-token/
https://developers.cloudflare.com/ai-search/api/migration/workers-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/migration/workers-binding/
https://developers.cloudflare.com/ai-search/concepts/namespaces/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/concepts/namespaces/
https://developers.cloudflare.com/ai-search/how-to/build-a-knowledge-base/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/how-to/build-a-knowledge-base/
https://developers.cloudflare.com/ai-search/api/instances/rest-api/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/api/instances/rest-api/
https://developers.cloudflare.com/ai-search/how-to/per-tenant-search/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/how-to/per-tenant-search/
https://developers.cloudflare.com/workers/wrangler/configuration/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/workers/wrangler/configuration/
https://developers.cloudflare.com/ai-search/get-started/dashboard/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/ai-search/get-started/dashboard/
https://developers.cloudflare.com/changelog/2026-04-16-ai-search-namespace-binding/ https://anni-ais-namespace-binding.preview.developers.cloudflare.com/changelog/2026-04-16-ai-search-namespace-binding/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants