Rightshold™ Sign up

Answers · agent controls

How do I set per-agent rate limits and quotas that do not throttle human browsers?

Last updated

TL;DR: Split traffic into two quota buckets before you count anything. Verified agents (a short-lived credential id, a Web Bot Auth signer URL, or another cryptographic identity you checked) get identity-bound limits: requests per minute, per day and a parallel-call ceiling keyed to that agent, not its IP. Human browsers stay on the ordinary IP, cookie or session bucket you already use for people, so a bursty shopping agent cannot starve shoppers sharing a NAT, and a shared office IP cannot lock out every agent behind it. Cloudflare's rate-limiting docs warn that applying rate limits to verified bots can hurt SEO, and Advanced Rate Limiting can count by headers or cookies while lower plans mostly count by IP — so put agent quotas at your origin or API gateway once identity is known, and keep search crawlers on a separate allow path. Return 429 with Retry-After to agents; never fold them into the human challenge path that would block real users.

What should I check, step by step?

1. Decide the identity for agents before the counter runs: a verified agent credential id (crd_...), a Web Bot Auth Signature-Agent URL after signature check, or your own API key issued per agent. Do not key agent quotas only on User-Agent or client IP.

  1. Keep humans on a separate bucket: IP (with NAT-aware options where you have them), session cookie or logged-in account id. Do not put browser traffic into the agent counter.
  2. At the edge, classify first: verified search crawlers (Googlebot and peers) stay on their allowlist; unverified automation can be challenged or blocked; only traffic that presents a checked agent identity enters the agent quota path.
  3. Set agent windows that match abuse, not human browsing: requests per minute for loops, requests per hour or day for scrape volume, and a max concurrency so one agent cannot open hundreds of parallel connections.
  4. When an agent is over quota, return HTTP 429 with Retry-After and a stable machine-readable body. Do not send that agent through a CAPTCHA or browser challenge meant for people — that burns human challenge budget and still fails headless clients.
  5. Exempt or soft-limit honest search crawlers separately from marketplace agents. Cloudflare documents that rate-limiting verified bots can affect SEO; prefer allowlists and crawl-delay style controls for them.
  6. Log which bucket each request used (human_ip, human_session, agent_credential, bot_signer, unverified) so a throttled homepage is diagnosable without guessing.
  7. Test with a shared-NAT scenario: many humans behind one IP plus one looping agent. The agent should hit 429 while browsers on the same IP keep loading.

Why one IP bucket throttles the wrong clients

Agents and people often share egress: cloud NATs, corporate proxies and mobile CGNAT mean many humans look like one IP, while one agent farm can rotate many IPs. Counting only by IP either locks out a whole office when an agent misbehaves, or lets a rotating agent ignore the limit.

Identity-bound agent quotas vs browser buckets

Agent path: require a short-lived scoped credential or a valid Web Bot Auth signature (HTTP Message Signatures, RFC 9421, with tag web-bot-auth). Key the counter on credential id or signer URL. Apply rpm/rph and concurrency. Revoke the credential or drop the signer from the allowlist when abuse continues.

What to return so agents slow down without harming humans

RFC 6585 defines 429 Too Many Requests; include Retry-After in seconds. Agents can back off; humans hitting a soft IP limit can get a gentler page or a challenge — those are different UX paths.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Issue a short-lived credential for my marketplace buyer agent so I can put per-agent rate limits on that id without touching human browser quotas.”

One-click setup

{
  "tool": "issue_agent_credential",
  "arguments": {
    "agent": "marketplace-buyer",
    "public_key_pem": "<Ed25519 PEM>",
    "config": {
      "model_id": "provider/model@version",
      "system_prompt_sha256": "<hex>",
      "tools": [
        "catalog.read",
        "order.create"
      ],
      "code_version": "v1.0.0"
    },
    "scope": [
      "marketplace:read",
      "marketplace:order"
    ],
    "ttl_hours": 24,
    "signature": "<agent key signs the CredentialRequest>"
  }
}

Rightshold verifies and records agent credentials and guard decisions. It does not sit as your CDN or count raw HTTP requests to your origin; put high-volume request counters in your gateway once identity is known. Not legal advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'