AtlasBurn Edge Proxy

Zero-code, zero-latency observability and enforcement

The AtlasBurn Edge Proxy is a Cloudflare Worker that sits between your application and the AI provider (OpenAI, Anthropic, OpenRouter). It captures telemetry, enforces autonomous guardrails, and fails open by design — your app never crashes because of the proxy.

What it is

A stateless Cloudflare Worker deployed at the edge. It transparently forwards your AI requests to the upstream provider while reading kill flags from a global GUARDRAIL_FLAGS KV namespace on every request. If your organization has breached a guardrail, the proxy returns a 429 immediately — at the edge, before the provider is ever called.

Benefits over the SDK

  • Zero code changes — swap one base URL. No npm install, no monkey-patching.
  • Language-agnostic — works for Python, Go, Rust, Ruby, .NET, n8n, Zapier, LangChain, anything that speaks HTTP.
  • Native SSE streaming — streams pass through unmodified with token usage extracted from the final frame.
  • Server-side enforcement — guardrails are enforced before the request leaves your edge, not after the bill arrives.
  • Fails open (Law 4) — if AtlasBurn is unreachable, the proxy still forwards the request. Never crash the proxy.

Setup

The hosted proxy at proxy.atlasburn.com works out of the box — no deployment required. For self-hosting (e.g. compliance, custom regions), deploy the worker yourself:

  1. Initialize — from the atlasburn-proxy folder, run npx wrangler deploy.
  2. Create the KV namespacenpx wrangler kv namespace create GUARDRAIL_FLAGS.
  3. Bind the namespace — paste the returned id into wrangler.toml under [[kv_namespaces]] with the binding name GUARDRAIL_FLAGS, then redeploy.
wrangler.tomltoml
name = "atlasburn-edge-proxy"
main = "src/index.ts"
compatibility_date = "2026-01-01"

[[kv_namespaces]]
binding = "GUARDRAIL_FLAGS"
id = "<your-kv-namespace-id>"

[vars]
ATLASBURN_INGEST_URL = "https://api.atlasburn.com/api/ingest"
Deploybash
# 1. Initial deploy
npx wrangler deploy

# 2. Create the KV namespace
npx wrangler kv namespace create GUARDRAIL_FLAGS

# 3. Paste the returned id into wrangler.toml under [[kv_namespaces]]

# 4. Redeploy with the binding active
npx wrangler deploy

Routing client traffic through the proxy

Swap the baseURL on your existing AI client and append the AtlasBurn-API-Key header. No SDK install required.

OpenAItypescript
import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: "https://proxy.atlasburn.com/openai/v1",
  defaultHeaders: {
    "AtlasBurn-API-Key": process.env.ATLASBURN_API_KEY!,
  },
});
OpenRoutertypescript
import OpenAI from "openai";

const router = new OpenAI({
  apiKey: process.env.OPENROUTER_API_KEY,
  baseURL: "https://proxy.atlasburn.com/openrouter/v1",
  defaultHeaders: {
    "AtlasBurn-API-Key": process.env.ATLASBURN_API_KEY!,
  },
});

Supported Providers

  • OpenAI — https://proxy.atlasburn.com/openai/v1
  • Anthropic — https://proxy.atlasburn.com/anthropic/v1
  • OpenRouter — https://proxy.atlasburn.com/openrouter/v1
  • Google Gemini — https://proxy.atlasburn.com/gemini/v1beta

OpenRouter caveat

OpenRouter load-balances across providers, which can cause tokenizer fluctuations (e.g. 24 vs 48 tokens for the same prompt). Layer 2 (Exact Match) works reliably for OpenAI and Anthropic; for OpenRouter, rely on Layer 4 (RPS Burst Protection) as the ultimate safety net. See Autonomous Runtime Guardrails.

Next Steps