AI Search - AI Search instances now include built-in storage and namespace Workers Bindings
Key Points
- Built-in storage and vector index for immediate indexing
- Namespace binding (ai_search_namespaces) for runtime instance management
- Cross-instance search returns a single ranked result list
Summary
New AI Search instances created after 2026-04-16 include built-in storage and a built-in vector index. You can upload files directly to an instance (via the Items API or dashboard), have them indexed immediately, and search them right away without configuring R2 or external data sources. A new Workers binding, ai_search_namespaces, replaces the previous env.AI.autorag() API and enables runtime creation, update, and deletion of instances. Namespace-level APIs also support cross-instance search that returns a single ranked list of results.
Key Points
- Built-in storage + vector index: upload and wait for indexing with
instance.items.uploadAndPoll(...), then query immediately withinstance.search(...). - Namespace Workers binding: add
ai_search_namespacestowrangler.jsoncand manage instances at runtime viaenv.AI_SEARCH.create({ id: "my-instance" })without redeploying. - Cross-instance search: call
env.AI_SEARCH.search({ ..., ai_search_options: { instance_ids: ["id1","id2"] } })to query multiple instances in one call and receive a single ranked result list. - No external buckets required: eliminates the need to set up R2 or connect external data sources before indexing.
- Migration note: update your Workers binding to
ai_search_namespacesand follow the Workers binding migration documentation for detailed steps.