---
title: "Cloudflare toggle for AI-agent search, and you pay the bill | Daniel Segovia"
description: "Cloudflare added a toggle for AI agents to search your site. You pay the query bill. Good DX, new risks to budgets and privacy. Add access controls and limits."
url: https://danielsegovia.com/en/architecture/cloudflare-toggle-ai-agent-search-cost-privacy/
lang: en
author: "Daniel Segovia"
published: 2026-11-27T16:37:00.000Z
modified: 2026-11-27T13:04:37.322Z
section: "Architecture"
---

1.  [Home](https://danielsegovia.com/en/)
2.  [Architecture](https://danielsegovia.com/en/architecture/)
3.  Cloudflare toggle for AI-agent search, and you pay the bill

# Cloudflare toggle for AI-agent search, and you pay the bill

[Architecture](https://danielsegovia.com/en/architecture/) New By [Daniel Segovia](https://danielsegovia.com/en/about/) · November 27, 2026 · 3 min read

Cloudflare added a toggle for AI agents to search your site. You pay the query bill. Good DX, new risks to budgets and privacy. Add access controls and limits.

In this post

1.  [What happened](#what-happened)
2.  [Why it matters](#why-it-matters)
3.  [Risks I see](#risks-i-see)
4.  [What I’d do before flipping the toggle](#what-i-d-do-before-flipping-the-toggle)
5.  [Minimal gateway pattern](#minimal-gateway-pattern)
6.  [My take](#my-take)

Cloudflare added a way for AI agents to find and retrieve information from your site with a simple toggle. The key detail: the site owner pays for the queries. Great for fast integrations, also great for burning budgets and leaking data if you wing it.

## What happened

Cloudflare launched a feature that makes it easier for AI agents to search and consume content behind its network. Integration drops to a toggle and the query cost shifts to the domain owner. With limited public specifics, I’ll focus on architecture: what this changes for product, security, and finance.

## Why it matters

Until now, agents relied on scraping, APIs, or one-off deals. With a toggle, you can power conversational experiences that answer with your content in seconds. Awesome for DX and support. But:

-   **Budgets** are no longer driven only by human traffic. Agents and their query patterns now matter.
-   **Scope creep**: mixing public with semi-public areas becomes a real risk without strict boundaries.
-   **New surface** to observe: who queries, how much, from where, and for what.

This ties back to how the [harness defines what an agent can and cannot do](https://danielsegovia.com/en/architecture/ai-agents-harness-decides-capabilities-safety/), and to the value of telemetry and backpressure like I discussed when reviewing the [Perplexity Monitor API for scheduled search and webhooks](https://danielsegovia.com/en/artificial-intelligence/perplexity-monitor-api-scheduled-search-webhooks/). If you plan to orchestrate humans and agents later, a [headless coordination board for humans and agents](https://danielsegovia.com/en/architecture/vercel-board-headless-humans-agents-slack-github-linear/) helps once multiple pieces talk to each other.

## Risks I see

-   **Runaway costs**: traffic spikes from a popular agent can blow your monthly budget on a random Tuesday.
-   **Privacy/compliance**: accidental exposure of semi-public sections, previews, or docs that shouldn’t be in agent retrieval.
-   **Abuse/scraping**: a poorly configured agent is just another scraper with better branding.
-   **Weak observability**: without per-agent and per-path traces, you won’t know what to turn off when things go sideways.
-   **Answer quality**: if your content isn’t optimized for retrieval, the agent will answer poorly and you’ll still pay for it.

## What I’d do before flipping the toggle

1.  **Define scope**: map paths and content types. Don’t start with */\**. Begin small: `/docs`, `/faq`, `/status`.
2.  **Identity control**: require agent identification via a dedicated header and sign requests server-side when possible. No identity, no access.
3.  **Quotas and rate limiting**: global and per-agent limits. Daily/weekly budgets and a circuit breaker for anomalies.
4.  **Aggressive caching**: CDN + coherent `Cache-Control` per path. Serving 200 cache hits beats paying 200 dynamic ones.
5.  **Observability**: per-agent, per-path metrics: QPS, latency, cache ratio, and cost estimate. Alerts on 3x deviations.
6.  **Redaction/sanitization**: strip PII and unwanted metadata. Version content and expose sources for traceability.
7.  **Legal policy**: update TOS/robots-equivalent for agents, including usage caps and acceptable use.
8.  **Kill switch**: per-agent and global off switch with config rollback in minutes, not hours.

## Minimal gateway pattern

```yaml
# policy.yaml (pseudo)
agents:
  allow:
    - name: perplexity
      quota_daily: 500
    - name: partner-bot
      quota_daily: 200
paths:
  "/docs/*": public: true, ttl: 3600
  "/preview/*": public: false
```

```javascript
// edge (pseudo)
const agent = req.headers.get('AI-Agent-ID');
if (!allowlist.has(agent)) return resp(403);
if (quota.exceeded(agent)) return resp(429);
if (isPublicPath(req.path)) setCacheTTL(policy.ttl(req.path));
log(agent, req.path, cost.estimate());
forward();
```

## My take

I like the toggle because it reduces friction and speeds up product. But a toggle isn’t a strategy. Without access policy, limits, and observability, you’re inviting agents to dinner with a corporate card and no cap. Turn it on, sure—just do it with a clear harness, budgets, and a dashboard that tells you when to cut.

Question for the community: will you enable it site-wide from day one or pilot it by section and specific agents?

PS: the toggle is free; the bill isn’t.

## Tags

-   [#Cloudflare](https://danielsegovia.com/en/tags/cloudflare/)
-   [#AI Agents](https://danielsegovia.com/en/tags/ai-agents/)
-   [#Architecture](https://danielsegovia.com/en/tags/architecture/)
-   [#Data Privacy](https://danielsegovia.com/en/tags/data-privacy/)
-   [#Observability](https://danielsegovia.com/en/tags/observability/)

[See all tags →](https://danielsegovia.com/en/tags/)

## Related posts

-   [AI agents: the harness decides what they can do and how](https://danielsegovia.com/en/architecture/ai-agents-harness-decides-capabilities-safety/)
    
    The QCon keynote echoes what I see in teams: it's not the model, it's the harness. Invest in observability, access control and output validation before prod.
    
    3 min read
-   [Vercel Board: a headless board to coordinate humans and agents](https://danielsegovia.com/en/architecture/vercel-board-headless-humans-agents-slack-github-linear/)
    
    Vercel launched Board, a headless board to coordinate humans and agents and sync Slack, GitHub and Linear. How to integrate it and who approves PRs.
    
    4 min read
-   [OpenAI Pando: a Git backend for concurrent coding agents](https://danielsegovia.com/en/architecture/openai-pando-git-backend-coding-agents/)
    
    OpenAI’s Pando cuts median push latency by ~80% and serves ~1 PB/day by rethinking refs and packs. What does that mean for your CI and your agents?
    
    4 min read

## More categories

-   ### [Tutorials](https://danielsegovia.com/en/tutorials/)
    
    [How to create a TypeScript Lambda with AWS SAM](https://danielsegovia.com/en/tutorials/create-typescript-lambda-aws-sam/)
    
    How to create a TypeScript Lambda with AWS SAM. Initialize the project, compile with esbuild, test locally, and deploy to AWS in minutes without pain.
    
    New 5 min read
    
-   ### [News](https://danielsegovia.com/en/news/)
    
    [Huawei speeds chip design; Nvidia slows ASEAN server flows](https://danielsegovia.com/en/news/huawei-speeds-chip-design-nvidia-slows-asean-servers/)
    
    Huawei pushes its homegrown chip-design stack while Nvidia halts AI server shipments in ASEAN. If you bet on one vendor, map risk and ship a plan B.
    
    New 3 min read
    
-   ### [Artificial Intelligence](https://danielsegovia.com/en/artificial-intelligence/)
    
    [OpenAI/Anthropic lock data; China turns to Google and Meta](https://danielsegovia.com/en/artificial-intelligence/openai-anthropic-lock-data-china-google-meta/)
    
    OpenAI and Anthropic restricted data and Chinese players look to Google and Meta. Time to harden pipelines: clear licenses and a data plan B.
    
    New 3 min read
    
-   ### [Security](https://danielsegovia.com/en/security/)
    
    [GoodGuys phishing mimics brands to steal Google/Okta](https://danielsegovia.com/en/security/goodguys-phishing-google-okta-paid-interviews/)
    
    GoodGuys lures with paid interviews to steal corporate Google/Okta creds. Active since October. Priorities: FIDO MFA, phishing drills, and tight SSO control.
    
    New 3 min read
    
-   ### [Architecture](https://danielsegovia.com/en/architecture/)
    
    [Cloudflare toggle for AI-agent search, and you pay the bill](https://danielsegovia.com/en/architecture/cloudflare-toggle-ai-agent-search-cost-privacy/)
    
    Cloudflare added a toggle for AI agents to search your site. You pay the query bill. Good DX, new risks to budgets and privacy. Add access controls and limits.
    
    New 3 min read
    
-   ### [Business](https://danielsegovia.com/en/business/)
    
    [AI infrastructure spend could hit $1T in 2026: now what](https://danielsegovia.com/en/business/ai-infrastructure-spend-2026-1t/)
    
    AI infra investment could reach $1T in 2026. With a $1.8T funding gap through 2030, it’s time to lock budgets, renegotiate contracts and squeeze unit costs.
    
    New 3 min read

---

Sitio: https://danielsegovia.com/ · Índice para agentes: https://danielsegovia.com/llms.txt · Sitemap: https://danielsegovia.com/sitemap.xml
