Agent Wranglers

Reliability Recommended

Tell clients their rate limit

Limit requests per client, and tell clients the limit, what is left and when it resets.

How to do it

Answer 429 with Retry-After when the limit is hit. The RateLimit and RateLimit-Policy headers come from the IETF draft draft-ietf-httpapi-ratelimit-headers, so mark them as such and follow its latest version. The website playbook's rate limits rule covers the mechanics.

How to check

Send requests past the limit. Answers carry the limit headers, and the first refused one is 429 with Retry-After.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/reliability/rate-limit-headers.