News

Cloudflare Adds Identity-Aware AI Gateway and User Insights to Catch Rogue AI Behavior

Cloudflare's AI Gateway now supports identity-aware access control and behavioral baselining to detect anomalous AI usage by users and agents.

August 5, 2026· 3 min read· Source: The Cloudflare Blog
Cloudflare Adds Identity-Aware AI Gateway and User Insights to Catch Rogue AI Behavior

Cloudflare is rolling out two features for its AI Gateway that aim to solve a growing problem: knowing who is using AI and whether their behavior is normal. The company announced an open beta of identity-aware AI Gateway with Cloudflare Access, and the general availability of User Insights, a behavioral analytics tool that flags anomalous usage patterns.

The core idea is to attach a verified identity to every request that flows through AI Gateway, and then build a baseline of what normal looks like for that identity. This lets organizations spot when an employee's usage spikes 10x or an agent goes off the rails, before it becomes a surprise invoice or a security incident.

Identity-aware AI Gateway

The integration with Cloudflare Access allows organizations to put a custom domain in front of their AI Gateway and protect it with their existing identity provider, such as Okta or Entra. This eliminates the need for shared API keys and lets admins set fine-grained policies on who can access the gateway.

Every authenticated request now carries the user's identity as cf.user_id, which can be used to filter logs, analytics, and spend. Combined with spend limits, this enables per-user budgets: each user gets their own spending cap, and requests are blocked or routed to a cheaper model when the cap is hit.

Flexport, an early adopter, highlighted the pain of shared API keys. Max Baumgarten, Staff Security Engineer at Flexport, said the integration lets them apply existing identity policies at the gateway without building separate auth systems for every AI client.

User Insights: Behavioral baselining

User Insights is a new tab in AI Gateway that analyzes traffic to build a behavioral fingerprint for every account, whether it's a person or an agent. It scores sessions against the account's own history, using the 95th percentile (p95) session cost over the last 30 days as a baseline. Any session exceeding 2x that baseline is flagged as anomalous, provided it also crosses an account-level p99 ceiling to avoid alerting on small-dollar shifts.

The system is designed to distinguish between a heavy user who consistently spends $500 and an agent that normally costs $5 but suddenly jumps to $50. The latter is a 10x change that could indicate a compromised credential or a rogue agent. User Insights doesn't block anything or judge intent; it just surfaces the accounts that broke their own pattern so an admin can investigate.

Cloudflare says the feature works on existing traffic with no setup required, and it's available to all AI Gateway customers at no additional cost.

What's next

Cloudflare is working on task-based smart routing, which would analyze incoming requests and route them to the most cost-effective model that still meets quality requirements. They're also building prompt classification to categorize traffic into types like coding or writing, which would help organizations understand not just how much AI they use, but what they use it for.

The company frames this as a move from cost control to cost optimization, and from anomaly detection to understanding the 'why' behind usage patterns.

A sudden departure from an account's own usage is often the first observable sign of a compromised credential or an agent going off the rails.
Manul X Editorial