Proxies and gateways

Pipelock vs Cloudflare AI Gateway

A self-hosted agent firewall on the agent's network path, next to a hosted gateway in front of the LLM API. Different boundaries, different evidence.

At a glance

Pipelock source Cloudflare AI Gateway
Job Agent firewall. Mediates HTTP, WebSocket, and MCP traffic routed through it, scans it for secret leaks, prompt injection, SSRF, and tool poisoning, and can emit signed action receipts for mediated decisions when a signing key is configured. Hosted gateway in front of LLM providers. Caching, rate limiting, retries and fallback, cost analytics, and guardrails on prompts and completions.
Enforcement point Network path, outside the agent process Cloudflare's edge, between the application and the model API
Source Open source, Apache-2.0 core; Enterprise under ELv2 Closed source, hosted service
Pricing shape Free core; paid Pro and Enterprise tiers Available on all Cloudflare plans; limits vary by plan and feature
Runs as Single Go binary, self-hosted; container and Helm Hosted only; the application points its SDK at the gateway URL
Pick Cloudflare AI Gateway

Your application is a chatbot, RAG pipeline, or copilot and the control point that matters is what goes into and comes out of the model API.

Pick Pipelock

Your agent calls tools, MCP servers, webhooks, or arbitrary HTTP, and you need inspection and a signed record for traffic routed through Pipelock, which never passes through the model API.

Run both

Cloudflare watches the model conversation and your token bill. Pipelock inspects the agent traffic routed through it, including the model call.

Want the runtime boundary, not just another checklist?

The short version

Pipelock is an open-source agent firewall. It scans HTTP, WebSocket, and MCP traffic routed through it for credential leaks, prompt injection, SSRF, and tool poisoning and can emit signed action receipts for mediated decisions when a signing key is configured. Single Go binary, self-hosted.

Cloudflare AI Gateway is a hosted gateway between an application and its LLM providers. The integration is a base URL change: the application calls the gateway endpoint instead of the provider directly, and Cloudflare relays the request upstream. The gateway adds caching, rate limiting, retries and provider fallback, analytics on token usage and cost, and two beta features, Guardrails and Data Loss Prevention, that inspect prompts and completions. It supports Workers AI, Anthropic, Google Gemini, OpenAI, Replicate, and other providers, and is available on all Cloudflare plans.

Pipelock inspects what the agent process sends and receives over the network when that traffic is routed through it. Cloudflare AI Gateway inspects what the application sends to and receives from the model API.

Feature comparison

FeaturePipelockCloudflare AI Gateway
ArchitectureNetwork proxy, single self-hosted binaryHosted gateway at Cloudflare’s edge
Enforcement pointAgent egress: HTTP, HTTPS CONNECT (payloads only with TLS interception on), WebSocket, MCP stdio, MCP HTTPModel API boundary: prompts in, completions out
Non-LLM HTTP egress scanningYesNo
WebSocket frame scanningYes, both directionsNot documented for arbitrary endpoints
MCP awarenessTool descriptions, arguments, and responses, both directionsNot documented
Credential scanning (DLP)65 built-in patterns with encoding normalizationDLP profiles on prompts and completions (beta)
Prompt injection and harmful contentDeterministic patterns on scanned responses, tool descriptions, and MCP responsesGuardrails flag or block harmful-content categories on prompts and responses (beta)
Tool poisoning and rug-pull detectionYesNot applicable, no MCP surface
SSRF and private-IP blockingYes, before DNS resolutionNot applicable
Response cachingNoYes
Retries and provider fallbackNoYes, configurable
Cost analytics on token usageNoYes, per provider
Per-decision evidenceSigned receipts plus a hash-chained flight recorder, verifiable offlineGateway logs in the customer’s Cloudflare account
Source availabilityApache-2.0 core; Enterprise features under ELv2Closed source
Self-hostedYesNo

When to pick Pipelock

Your threat model extends past the model call. An agent that calls MCP servers, fetches pages, opens WebSockets, or POSTs to third-party APIs is doing things a model-API gateway never sees. A leaked cloud key in a request to a logging service doesn’t traverse the LLM API. Neither does a poisoned tool description. Pipelock scans the traffic the agent actually emits.

You need MCP content awareness. Pipelock parses MCP framing, flags poisoned tool descriptions, detects drift when a trusted tool changes mid-session, and scans arguments and responses. Cloudflare AI Gateway’s documented surface doesn’t extend into MCP.

You want evidence you can verify without the vendor. Pipelock’s receipts are signed by the deployment’s own key, outside the agent process, and the shipped verifier checks them offline. That’s a different trust model from reading gateway logs through a vendor’s dashboard. It’s still the operator’s key, so it proves what the mediator decided, not that the operator is honest.

You want to run the whole stack yourself. No hosted service, no API key to a third party, no telemetry leaving the host.

When to pick Cloudflare AI Gateway

Your application is a chatbot, RAG pipeline, or copilot. The control point that matters is what enters and leaves the model. The gateway sits exactly there.

You want one line of code to add observability. Switch the base URL and token counts, request volumes, error rates, and per-provider cost show up in the dashboard.

You want resilience patterns you’d otherwise build by hand. Retries on transient errors, fallback from one provider to another, response caching, and gateway-side rate limits.

You want a hosted, edge-distributed service. Nothing to run; latency is your existing distance to a Cloudflare POP.

Architecture differences

Cloudflare AI Gateway asks: is this model request well-formed, cacheable, within the rate limit, and free of content the guardrail policy flags? Anything outside the model-API path, meaning MCP traffic, HTTP to non-model services, arbitrary WebSocket egress, is outside the control surface.

Pipelock asks: what is moving across the mediated agent network boundary, and is any of it unsafe? Routed request bodies are checked for leaked credentials. Routed tool descriptions are checked for poisoning and drift. Scanned responses are checked for injection. SSRF checks run before DNS resolution. With a signing key configured, Pipelock can emit signed action receipts for mediated decisions.

Run both when you want edge-scale observability for the model bill and self-hosted enforcement for the agent’s actions.

A note on evidence

Cloudflare AI Gateway records gateway logs in the customer’s account: payloads, token counts, costs, and the decisions Guardrails and DLP took. You read them through Cloudflare’s dashboard and APIs.

With a signing key configured, Pipelock can emit signed action receipts for mediated decisions, containing the action, the policy hash, the decision, and a hash link to the previous receipt. The shipped verifier checks a receipt chain against the deployment’s public key offline, without contacting the Pipelock service, the agent, or any application code. The action receipt format is public.

The difference is where the evidentiary anchor sits, not which product is better. For incident response and compliance work that needs records produced outside the process that acted, the signer’s location matters.

Further reading

Sources checked

Third-party descriptions on this page come from the public materials below, read on the dates shown. Features and pricing change; check the current documentation before you decide.

Third-party product names and marks belong to their owners. PipeLab is not affiliated with, sponsored by, or endorsed by the makers of any product compared on this page. Descriptions of other products come from their own public materials on the dates listed above and reflect PipeLab's reading of them. If something here is wrong or out of date, tell us and it will be corrected.

Frequently asked questions

What's the difference between Pipelock and Cloudflare AI Gateway?
Pipelock runs on the agent’s side and scans HTTP, WebSocket, and MCP egress routed through it for credential leaks, prompt injection, SSRF, and tool poisoning, and can emit signed receipts when a signing key is configured. Cloudflare AI Gateway sits at Cloudflare’s edge between an application and the LLM provider and adds caching, rate limiting, retries, cost analytics, and guardrails on prompts and completions. One covers the routed agent traffic. The other covers the model API conversation.
Does Cloudflare AI Gateway scan MCP traffic or arbitrary HTTP egress?
Its documented surface is the model-provider path: requests to supported LLM providers routed through the gateway URL. MCP tool calls, webhooks, and HTTP requests to non-model services don’t traverse it. Pipelock scans those paths when they are routed through it.
Can I run Pipelock and Cloudflare AI Gateway together?
Yes. Point the agent’s model SDK at the gateway for caching, analytics, and guardrails, and route the agent’s network traffic through Pipelock for inspection and receipts. They enforce at different boundaries.

Want the runtime boundary, not just another checklist?

See all comparisons →