ClaudeCloudflare Developer PlatformApr 16, 2026, 12:00 PM

AI Search - AI Search instances now include built-in storage and namespace Workers Bindings

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-haiku-4-5

AI Search instances now include built-in storage and namespace Workers Bindings

Key Points

  • Built-in storage eliminates R2 bucket setup
  • New namespace bindings for runtime instance management
  • Cross-instance search with unified ranked results

Summary

New AI Search instances now come with built-in storage and vector indexing capabilities, eliminating the need for external R2 bucket setup. Additionally, new Workers Bindings provide runtime instance management and cross-instance search functionality.

Key Points

  • Built-in Storage & Vector Index: Upload files directly via Items API or dashboard with immediate indexing and search capability
  • Namespace Binding: New ai_search_namespaces binding replaces the previous env.AI.autorag() API, enabling runtime instance creation, updates, and deletion without redeployment
  • Cross-Instance Search: Query multiple instances in a single call using the namespace-level Search and Chat API with ranked result aggregation
  • Simplified Setup: No external data sources or bucket configuration required for new instances
  • Runtime Management: Create and manage instances dynamically at runtime within a namespace

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-haiku-4-5

AI Search - AI Searchインスタンスに組み込みストレージとNamespace Workers Bindingsが追加されました

AI SearchインスタンスにBuilt-in StorageとNamespace Workers Bindingsが追加されました

2026年4月16日

本日以降に作成される新しいAI Searchインスタンスは異なる方法で動作します。新しいインスタンスには組み込みストレージとベクトルインデックスが付属しており、ファイルをアップロードして即座にインデックス化し、すぐに検索できます。さらに、AI Searchで使用できる新しいWorkers Bindingsが利用可能になりました。新しいNamespace Bindingを使用すると、ランタイムでインスタンスを作成・管理でき、Cross-instance Search APIを使用すると、1回の呼び出しで複数のインスタンスにクエリを実行できます。

Built-in StorageとVector Index

すべての新しいインスタンスには組み込みストレージが付属しており、Items APIまたはダッシュボードを使用してファイルを直接アップロードできます。R2バケットをセットアップする必要がなく、外部データソースを事前に接続する必要もありません。

const instance = env.AI_SEARCH.get("my-instance");

// upload and wait for indexing to complete
const item = await instance.items.uploadAndPoll("faq.md", content);

// search immediately after indexing
const results = await instance.search({
  messages: [
    {
      role: "user",
      content: "onboarding guide"
    }
  ],
});

Namespace Binding

新しいai_search_namespaces Bindingは、AI Bindingを通じて提供されていた以前のenv.AI.autorag() APIに代わるものです。Workerにnamespace内のすべてのインスタンスへのアクセスを提供し、再デプロイなしでランタイムでインスタンスを作成、更新、削除できます。

// wrangler.jsonc
{
  "ai_search_namespaces": [
    {
      "binding": "AI_SEARCH",
      "namespace": "default",
    },
  ],
}
// create an instance at runtime
const instance = await env.AI_SEARCH.create({
  id: "my-instance",
});

マイグレーションの詳細については、Workers binding migrationを参照してください。Namespaceの詳細については、Namespacesを参照してください。

Cross-instance Search

新しいAI Search Bindingでは、Namespace レベルでSearch and Chat APIにアクセスできます。インスタンスIDの配列を渡すと、1つのランク付けされた結果リストが返されます。

const results = await env.AI_SEARCH.search({
  messages: [
    {
      role: "user",
      content: "What is Cloudflare?"
    }
  ],
  ai_search_options: {
    instance_ids: ["product-docs", "customer-abc123"],
  },
});

詳細については、Namespace-level searchを参照してください。