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

Build an AI Agent From Scratch Streaming Agents

The pipe that makes tokens appear live: an SSE gateway between the model's messy stream and the user's browser. You build it failure by failure - framing the browser actually accepts, text flowing while tool calls assemble, multibyte characters split across chunks, upstream deaths turned into clean error frames, reconnects that resume from the right word - then compose it all into one drop-proof gateway.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

6 challenges

SSE Endpoint

Sign up to unlock
—No data yeteasy
About this challenge

Build the endpoint that streams tokens to the browser as they are generated.

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

Interleaved Assembly

Sign up to unlock
—No data yeteasy
About this challenge

Stream text to the user while assembling tool calls from the same stream.

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

Split Character Handling

Sign up to unlock
—No data yeteasy
About this challenge

Handle multibyte characters split across network chunks so every script renders clean.

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

Mid-Stream Failure

Sign up to unlock
—No data yeteasy
About this challenge

Turn an upstream failure into a clean error message instead of a spinner.

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

Resume From Disconnect

Sign up to unlock
—No data yeteasy
About this challenge

Let a dropped client reconnect and continue from the exact word it left off.

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

Drop-Proof Token Pipe

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

Compose everything into one gateway that survives splits, failures, and disconnects.

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.