Skip to main content

Edge Guardrails Pilot on Cloudflare

Local mirror of Confluence page Edge Guardrails Pilot on Cloudflare.

Confluence page ID: 5548573323 Parent folder ID: 6018662571 Remote version: 4 Last remote update: 2026-03-03T15:18:43.668Z

Context

Today, several guardrail capabilities run in centralized cloud environments, such as AWS-based services and external model endpoints. This can add latency, cross-provider dependencies, and operational complexity when applying consistent guardrail behavior across multiple ADC solutions.

Cloudflare proposes an edge-native AI execution model where inference and application logic run close to users and systems.

Key proposition:

  • Run AI inference at the edge with low-latency execution.
  • Use serverless AI APIs that are OpenAI-compatible for easier integration.
  • Leverage Cloudflare performance work on efficient inference engine design.
  • Keep workloads inside one edge platform to reduce data movement and simplify architecture.

The Problem We Want to Solve

The current guardrail approach can be fragmented across providers and runtime locations.

Key pain points:

  • Higher end-to-end latency when guardrail checks are remote from the calling application.
  • Operational overhead from stitching together multiple cloud/model services.
  • Limited portability of guardrail behavior across products.
  • Reduced control over where and how guardrail logic executes.

Goal

Validate whether core guardrail capabilities can move to Cloudflare Edge and operate as a shared internal platform service for multiple ADC solutions.

By the end of the pilot, answer:

  • Can the guardrail pipeline run reliably on Cloudflare Edge with acceptable latency and throughput?
  • Can dependency on external guardrail infrastructure be reduced while preserving quality and safety coverage?
  • Can one edge-native guardrail service be reused across multiple ADC use cases with minimal integration effort?
  • What are the cost, observability, and operational tradeoffs versus current cloud-hosted patterns?

What We Are Proposing

Build a pilot guardrail system that runs directly on Cloudflare Edge with Workers and Workers AI-compatible integration patterns, instead of relying primarily on AWS-hosted guardrail components or externally orchestrated model services.

Pilot proposal:

  • Create an edge-native guardrail gateway that receives model requests from ADC applications.
  • Execute policy checks at the edge, including input/output moderation, prompt policy enforcement, safety filters, and rule-based controls.
  • Support pluggable model backends while keeping guardrail orchestration inside Cloudflare.
  • Expose a unified API contract so multiple ADC products can adopt the same guardrail layer.
  • Instrument latency, policy hit rates, blocked/allowed outcomes, and operational cost for comparison with baseline architecture.

Expected value:

  • Lower latency for guardrail decisions.
  • Improved architectural control and consistency across solutions.
  • Faster rollout of shared policy updates.
  • A concrete decision basis for broader migration beyond pilot scope.

References