Rate Limiter

Rate Limiting for AI Agents

Protect APIs from agent overload. One call to check, one to count.

What it does

Wrap any outbound API call with rate limiting. Your agent checks before calling an external API — if the limit is exceeded, it gets a 429 response with a retry-after hint. Fixed-window and sliding-window algorithms supported.

Why agents need this

Get started in 30 seconds

One API call. No SDK. No configuration.

cURL

# Check if allowed
curl "https://www.agent-utils.com/api/rate-limit/check?key=stripe-api&limit=100&window=60" \
  -H "x-api-key: au_your_key"

# Response: {"allowed": true, "remaining": 73, "resetAt": "2025-01-15T10:01:00Z"}

Python

import requests

headers = {"x-api-key": "au_your_key"}

# Check rate limit before calling external API
resp = requests.get(
    "https://www.agent-utils.com/api/rate-limit/check",
    headers=headers,
    params={"key": "stripe-api", "limit": 100, "window": 60},
)
result = resp.json()["data"]

if result["allowed"]:
    # Safe to call the API
    call_external_api()
else:
    print(f"Rate limited. Retry after {result['resetAt']}")

JavaScript

const res = await fetch(
  "https://www.agent-utils.com/api/rate-limit/check?key=stripe-api&limit=100&window=60",
  { headers: { "x-api-key": "au_your_key" } }
);
const { data } = await res.json();

if (data.allowed) {
  await callExternalAPI();
} else {
  console.log(`Rate limited. Retry after ${data.resetAt}`);
}

Use cases

LLM API protection

Prevent agents from burning through OpenAI/Anthropic API rate limits

Third-party API quotas

Wrap calls to Stripe, GitHub, or any rate-limited API

Multi-agent coordination

Shared rate limits across multiple agents using the same credentials

Cost control

Cap daily/hourly API call volumes to control spending

AgentUtils vs. alternatives

Traditional tools like Upstash Ratelimit, Redis Rate Limiting, Cloudflare Rate Limiting require SDK integration, credential management, and infrastructure setup. AgentUtils replaces all of that with a single HTTP call.

AgentUtilsAlternatives
Setup time30 secondsHours to days
SDK requiredNo (REST API)Yes
Credentials to manage1 API keyMultiple keys/tokens
InfrastructureZero-configProvision + configure

Related tools

All AgentUtils tools

Start building for free

500 free API calls per month. No credit card required.