AI AGENTS

Cache-hit-ratio collapse escalator

When Cloudflare's cache-hit ratio drops below a floor in real time, an agent confirms the regression, identifies the route that lost caching and the deploy that likely caused it.

CategoryAI Agents
Enginepaperclip
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerFast-interval cache-ratio check
  • ActionRead current Cloudflare cache-hit ratioCloudflareCloudflare
  • LogicFire only on sustained sub-floor drop
  • ActionFind route with largest HIT-to-MISS swingCloudflareCloudflare
  • ActionAttribute to recent Vercel deploy + draft incidentOpenAI
  • OutputTrigger PagerDuty incident for on-callPagerDutyPagerDuty

What it does

Treats a sudden cache-hit-ratio collapse as the leading indicator of a runaway bill and pages on-call before the cost lands. It confirms the drop isn't noise, finds the specific route that stopped caching, and points at the deploy that changed its cache headers.

When to use it

When a cache misconfiguration can quietly 10x your origin and CDN cost within hours, and you want a real-time page with the root-cause route rather than a next-day cost surprise.

How it works

  1. 1A scheduled fast-interval check reads the current Cloudflare cache-hit ratio.
  2. 2A logic gate fires only when the ratio falls below the floor and stays there across two consecutive samples.
  3. 3The agent queries Cloudflare for routes with the largest HIT-to-MISS swing in the window.
  4. 4It cross-references the timing against the most recent Vercel deployment to attribute the regression.
  5. 5An OpenAI step writes a tight incident summary with the offending path and a rollback or cache-header hint.
  6. 6A PagerDuty incident is triggered for the on-call engineer.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  2. 2
    Connect VercelDeploys, runtime logs, analytics.
  3. 3
    Connect OpenAIModels, embeddings, files.
  4. 4
    Connect PagerDutyIncidents, on-call, escalations.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.