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 todefault).--json— emit structured JSON for automation or AI agents.--pageand--per-page— pagination forlistandlogs.-y / --force— skip confirmation when cancelling.
- Practical tips:
- Trigger
jobs createfrom CI/CD pipelines to refresh an index after content pushes. - Parse
--jsonoutput in automation scripts to handle job IDs, status, and logs programmatically.
- Trigger
For full usage and examples, refer to the AI Search Wrangler commands documentation.