EdgeProxy: spend limits and loop detection for AI agents on Cloudflare Workers
Edgeproxy-ai/edgeproxy is an open-source Cloudflare Workers proxy for Anthropic and OpenAI that stops runaway agents with loop detection and per-run dollar budgets before they rack up provider bills. Free to self-host.
- Products
- Workers
- Source
- Community resourceGitHub
- Author
- Edgeproxy-ai
Key points
- The README demo shows a repeating agent stopped by loop detection around $0.05 and another stopped by a $0.05 run budget around $0.06 against the Anthropic API.
- This caps the upstream model bill proxied through Workers; it is not Cloudflare’s own Workers spend policy.
Original sources
Published
EdgeProxy: spend limits and loop detection for AI agents on Cloudflare Workers
Open original sourceEdgeproxy-ai/edgeproxy is an open-source Cloudflare Workers proxy for Anthropic and OpenAI that stops runaway agents with loop detection and per-run dollar budgets before they rack up provider bills. Free to self-host.
More to read
Feng Yi: After Observability is billed by write volume, capture all errors and sample only 1%–10% of successful requests; put the body in R2 and set a 7-day expiry
On 2026-11-20, X user @Michael_liyang (Feng Yi), replying to @AdrianPunk115's reminder that from 1 December logs and request tracing will be billed by the volume of data written and stored, wrote: once billing is by write volume, this will change to "capture all errors and sample 1%–10% of successful requests"; a trace keeps only request_id/route/status/duration, and the raw body and prompt go in R2 with a 7-day expiry. The author cautions: estimate bytes written per day before launch, and don't wait for the bill to find that tracing costs more than the business.
459655151lw: charged $12.29 USD for a domain transfer that the previous registrar did not approve; a full refund requested.
Cloudflare Community user 459655151lw says Cloudflare charged $12.29 USD (including tax) on November 14, 2026 for a domain transfer that the previous registrar did not approve and that has not completed. The author does not want to retry the transfer and requests a full refund of $12.29 USD, and could not find a Billing or Registrar ticket form. A Community MVP replies that failed transfers should be refunded in due course depending on when the transfer fails and the bank applies the refund, and explains how to reveal the ticket button. That MVP reply is not treated as an official Cloudflare outcome.
Six free allowances and four kinds of cost: estimating a Cloudflare bill line by line
Su (@Sukiea1008) lists six common Cloudflare free allowances and four kinds of cost — separately bought items, hard stops at free limits, metered usage on enabled services, and other services such as models and email — and walks through a PDF summariser to show why each line must be estimated in its own unit.