AI AGENTS
Cloudflare bandwidth spike investigator with cache-rule proposal
When Cloudflare egress bandwidth crosses a daily threshold, an agent pulls the top URLs and asset types driving the spike, identifies the worst-cached offender.
How it runs
The automated pipeline, trigger to output.
- TriggerDaily scheduled bandwidth check
- ActionFetch yesterday's egress vs baseline (Cloudflare GraphQL)Cloudflare
- LogicExit unless egress exceeds spike threshold
- ActionPull top URLs and content types by bytes + cache statusCloudflare
- ActionRank offenders and draft page ruleOpenAI
- OutputPost root cause + proposed cache rule to SlackSlack
What it does
Watches your Cloudflare bandwidth and, when a daily spike trips, figures out exactly which route or asset is burning egress and why it's missing cache. It then writes a specific page-rule recommendation (path pattern, edge TTL, cache level) instead of a vague "check your caching" alert.
When to use it
When a surprise Cloudflare bill or bandwidth alarm shows up and you want the root-cause URL plus a ready-to-apply fix, not a dashboard you have to dig through yourself.
How it works
- 1A scheduled check reads yesterday's Cloudflare bandwidth via the GraphQL Analytics API and compares it to a rolling baseline.
- 2A logic gate exits quietly unless egress exceeds the spike threshold.
- 3The agent queries Cloudflare for the top URLs and content types by bytes served, plus their cache-status breakdown (HIT vs MISS/DYNAMIC).
- 4An OpenAI reasoning step ranks offenders by uncached bytes and drafts a precise page rule for the top one.
- 5The root-cause summary and proposed cache rule post to Slack for an engineer to approve.
Set it up
What you configure once, before turning it on.
- 1Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
- 2Connect OpenAIModels, embeddings, files.
- 3Connect SlackChannels, DMs, threads, mentions.
- 4Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 5Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 6Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More AI Agents workflows
Custom Metrics Cardinality Spike Pager
A webhook from a Datadog monitor fires when custom-metric cardinality jumps; an agent pinpoints the offending metric and tag, estimates the added cost.
Sentry-to-Confluence Runbook Updater
When a Sentry issue is resolved, the agent finds the matching Confluence runbook page and proposes an inline update with the verified fix.
Stale Doc-PR Chaser for Runbook Gaps
On a daily schedule the agent finds runbook doc PRs that were opened from resolved incidents but never reviewed, summarizes what each one fixes.
Resolved Incident to Public Troubleshooting Doc
For customer-facing errors resolved in Sentry, the agent drafts a sanitized troubleshooting entry and opens a PR to your ReadMe documentation.
On-Call Runbook Gap Closer: Resolved Sentry Issues to Doc PRs
An agent reads each newly resolved Sentry issue, compares the actual fix against your existing runbook, and opens a GitHub PR adding the missing remediation steps.
Weekly On-Call Doc-Gap Digest
Each week the agent reviews every Sentry issue resolved in the last 7 days, ranks the ones whose runbook coverage is missing or thin.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
