OpenAICloudflare Developer PlatformJul 2, 2026, 12:00 AM

AI Search - Manage AI Search sync jobs with Wrangler CLI

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

AI Search - Manage AI Search sync jobs with Wrangler CLI

Key Points

  • Trigger async sync jobs
  • Manage jobs via Wrangler CLI
  • Structured JSON output for automation

Summary

When you connect a data source to an AI Search instance, Wrangler can now manage sync jobs that keep the index up to date. Use wrangler ai-search jobs create <instance> to trigger an asynchronous sync (useful in CI/CD or automated pipelines). The job detects new, modified, and deleted files and sends them for indexing.

Key Points

  • Available commands:
    • wrangler ai-search jobs create — trigger a new async sync job (wrangler ai-search jobs create my-instance).
    • wrangler ai-search jobs list — list sync jobs for an instance.
    • wrangler ai-search jobs get — get details for a specific job.
    • wrangler ai-search jobs cancel — cancel a running job (prompts unless forced).
    • wrangler ai-search jobs logs — view log entries for a job.
  • Useful flags:
    • --namespace / -n (defaults to default).
    • --json — emit structured JSON for automation or AI agents.
    • --page and --per-page — pagination for list and logs.
    • -y / --force — skip confirmation when cancelling.
  • Practical tips:
    • Trigger jobs create from CI/CD pipelines to refresh an index after content pushes.
    • Parse --json output in automation scripts to handle job IDs, status, and logs programmatically.

For full usage and examples, refer to the AI Search Wrangler commands documentation.

Full Translation

Translations

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

openaijamodel: gpt-5-mini-2025-08-07

AI Search — Wrangler CLI で AI Search の同期ジョブを管理する

AI Search — Wrangler CLI で AI Search の同期ジョブを管理する

公開日: 2026-07-02

データソースを AI Search インスタンスに接続すると、AI Search はインデックスをコンテンツに合わせて最新に保つために同期ジョブを実行します。これらのジョブは現在、直接 Wrangler から管理できます。例えば、CI/CD や自動化パイプラインから同期ジョブをトリガーして、変更をプッシュしたときにインデックスを更新することができます。

ターミナルで次のように実行します:

wrangler ai-search jobs create my-instance

このコマンドは非同期の同期ジョブを作成し、データソースの変更をチェックして、新規/変更/削除されたファイルをインデックス化のために送信します。

利用可能なコマンドは次のとおりです:

  • wrangler ai-search jobs create — 新しい同期ジョブをトリガーします
  • wrangler ai-search jobs list — インスタンスの同期ジョブを一覧表示します
  • wrangler ai-search jobs get — ジョブの詳細を取得します
  • wrangler ai-search jobs cancel — 実行中のジョブをキャンセルします
  • wrangler ai-search jobs logs — ジョブのログエントリを表示します

すべてのコマンドは --namespace / -n(既定は default)と、オートメーションや AI エージェントが直接解析できる構造化出力用の --json を受け付けます。listlogs コマンドはページネーション用に --page--per-page をサポートし、cancel は確認プロンプトを表示します(-y / --force を渡すと確認をスキップします)。

詳細な使用方法については、AI Search Wrangler commands documentation を参照してください。