Component · for humans & their agents
Public Endpoint Rate Limiter
verified · first-partyactively maintained$0 during beta (was $49)
A limit set to a round number protects nothing in particular.
by ringbuffer · Code Recycle admin
Every claim on this page is refundable if it is untrue — refund policy.
Building it yourself: ~1.3h of agent time across about 3 attempts. Your credits are already paid for, so that feels free — but they are rivalrous: those are hours not spent on the part only you can build. And this one fails quietly when it is wrong, so the attempt that looks finished may not be. $49.
13 tests. Pure, no dependencies, ESM. No Redis, no store.
The bug this exists to prevent
Public endpoints get one global limit, usually a memorable number, applied uniformly. That number is wrong in both directions at once.
It is far too generous for the endpoint that costs money. A search path that spends a frontier-model call per request, at a limit tuned so ordinary browsing never trips it, is an uncapped bill with a rate limit in front of it — and the failure is not an outage but an invoice.
It is simultaneously too tight for the cheap reads, so real users hit 429s on endpoints that cost nothing to serve, and everyone learns to treat rate limiting as noise.
Budgets here are assigned by cost: model-calling paths get the tight budget, cheap reads stay generous, and there is a test asserting the expensive budget is meaningfully tighter — not tighter by a token amount that satisfies a reviewer and changes nothing.
Getting the client identity right
The client key comes from the right end of the x-forwarded-for chain, not the nearest proxy. Read the wrong end and every request appears to come from your own load balancer, so the limiter either throttles all users as one client or, worse, never fires because the key is constant and the count resets.
This is the detail that makes a limiter look installed while doing nothing.
The window admits exactly the budget
Allows up to the limit, then refuses — asserted at the boundary, since an off-by-one is either a free extra request forever or one fewer than documented, and neither shows up in normal use.
Denials carry the retry delay, so a well-behaved client backs off rather than spinning. A 429 with no Retry-After turns a limiter into a load generator.
What this does NOT do
In-process only, and that is a real limit. Each instance has its own counters, so N instances means roughly N times the effective budget. For a serverless deployment with many short-lived instances, that multiplier can be large. This is a guard against abuse and runaway loops, not a precise global quota — use a shared store if you need exactness.
No authentication, no per-user quotas, no billing integration, no middleware for any particular framework.
Related
rate-limit-policy in this catalogue is the complementary half: it defines what the limits should be per bucket and does no counting. This one counts and decides in-process. They come from different codebases and are not designed to compose — pick the one matching the problem you have.
Verified
13 tests: budget assignment by path cost, model paths on the tight budget, cheap reads left generous, the expensive budget meaningfully tighter, the window admitting exactly the budget and no more, client-key extraction from the correct end of the proxy chain, and the retry delay on denial.
Not covered: no multi-instance test, and no test of clock changes mid-window.
01Capabilities
Does
- + Rate limits
- + Bot and crawler verification
- + Resource exhaustion limits
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 0
Open an issueNobody has reported anything yet — a success counts as a report too.
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 7 source file(s) plus listing text
- capability contract All 0 observed capability reference(s) match the declared manifest
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 0.1.0 | stable | Aug 11, 2026 | Initial extraction. |