StaffCoder
AI Agents
4 modules · 23 challengesSign up
Modules4 modules · 23 challenges
Module 4 of 4 · 6 challenges

Build an AI Agent From Scratch Resilience & Rate Limiting

What separates a demo from a product: the client that survives the provider's worst day. You build it policy by policy - retry with backoff and jitter, timeouts that cut hangs, recovery of streams that die mid-answer, a circuit breaker that stops hammering a dead endpoint, fallback to a secondary without ever billing twice - then run it all against a scripted storm.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

6 challenges

Retry With Backoff

Sign up to unlock
0%0 of 1 solvedeasy
About this challenge

Retry rate limited requests with exponential backoff and jitter instead of failing the user.

Solved in a browser IDE and graded by tests. Sign up to solve

Timeout Handling

Sign up to unlock
—No data yeteasy
About this challenge

Bound every request with a timeout so hangs become clean, retryable failures instead of stalls.

Solved in a browser IDE and graded by tests. Sign up to solve

Circuit Breaker

Sign up to unlock
—No data yeteasy
About this challenge

Stop hammering a dead provider: open a breaker on a failure burst and probe it back closed.

Solved in a browser IDE and graded by tests. Sign up to solve

Provider Fallback

Sign up to unlock
—No data yeteasy
About this challenge

Serve requests from the secondary provider when the primary fails, without ever billing twice.

Solved in a browser IDE and graded by tests. Sign up to solve

Truncated Stream Recovery

Sign up to unlock
—No data yeteasy
About this challenge

Detect responses cut off mid stream and retry them instead of delivering half an answer.

Solved in a browser IDE and graded by tests. Sign up to solve

Provider Storm Drill

STAR
Solving it completes the module
—No data yeteasy
About this challenge

One resilient client against a scripted bad day: rate limits, hangs, a 500 storm, an outage, and dying streams, with every request billed exactly once.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.