define rate-limit --plain-english
Rate Limit
TLDR:Sooner or later your AI comes back with 429 Too Many Requests, and it feels like you broke something expensive.
Sooner or later your AI comes back with 429 Too Many Requests, and it feels like you broke something expensive. You didn't. You just knocked too fast.
The API is the drive-thru window your AI orders from. A rate limit is the window running it like a Costco sample table: "One at a time, pal. There's only twelve on that tray."
The window isn't being difficult. Think of that little sample table by the door: it'll hand you one, and it'll hand you another a few seconds later. But reach in and try to clear the whole tray of twelve at once and someone stops you: "one at a time, there's a line behind you." Nothing personal. The tray has to serve everyone walking by, not just you.
That's a rate limit: a cap on how many requests you can fire at a service inside a given window of time. Every API has one. It's how a service stops a single over-eager user, a runaway script, or someone trying to abuse it outright. Most APIs publish the actual number in their docs, so it's rarely a mystery you have to guess at.
Why agents trip it constantly. Take the Costco sample tray: a human takes one sample, wanders off, and maybe comes back later for another. An agent in a loop can reach for a hundred samples in a few seconds without blinking, clearing tray after tray faster than any person could. The window throws up a hand, and 429 is the standard, polite code for "slow down." It is not a flaw in your logic. It's a speed limit you hit because you're moving fast.
The fix is almost always patience, in one of two flavors:
Back off and retry. Wait a beat, then ask again. Good tools do this for you automatically, so the agent pauses and resumes and you barely notice it happened.
Batch smarter. Ask for 100 things in one order instead of placing 100 separate orders. One trip to the window beats a hundred.
One more angle, because it touches the bill. Rate limits usually scale with your plan. The free tier gets a slower window. Paid tiers get a faster one. So sometimes "we hit our rate limit" doesn't mean a bug at all. It means you outgrew your plan, and the fix is a checkbox, not code.
A 429 isn't a bug. It's the window telling you to slow down and wait your turn.