Build an AI Agent From Scratch
Build a working AI agent from bare HTTP calls - no frameworks, no SDKs. You write the loop that lets a model use tools, make its output machine-readable, stream it live, and keep it alive when providers fail. Finish and you have an agent you built entirely yourself - and nothing inside LangChain will ever look like magic again.
Tool Calling & Agent Loop
The heart of every agent: the loop that sends messages, runs the tools the model asks for, and feeds results back until an answer. You build it piece by piece - dispatch that survives malformed calls, assembly of streamed fragments, a guard against endless loops, parallel execution - then prove it on hidden tasks against a live model.
Loop Body
Build the agent loop that runs the tools the model asks for until it answers.
Tool Dispatcher
Build the dispatcher that turns bad tool calls into error results instead of crashes.
Delta Assembler
Assemble complete tool calls from streamed fragments before anything runs.
Non-Termination Guard
Add the stop conditions that end a conversation the model never would.
Parallel Dispatch
Run a turn's tool calls in parallel so one hanging tool cannot stall the rest.
Hidden Multi-Tool Missions
Run your full agent against a live model on unseen multi tool tasks.
Structured Output
The bridge from model text to data your system trusts: a schema that rejects junk with errors the model can act on, a cleaner that strips fences and stray commas without touching the payload, a repair loop that feeds validation errors back until the output is valid, and a salvager that recovers what truly arrived when a stream dies - then prove the full stack extracting real documents against a live model.
Schema Definition
Define the record schema and the validator that keeps junk out of the database.
Fence and Comma Cleaner
Clean fenced, comma broken model responses into parseable JSON.
Repair Loop
Feed validation errors back to the model until its output passes.
Partial JSON Handler
Recover every complete field from JSON cut off mid stream.
Contract Extraction Live
Run your full extraction stack on real documents against a live model.
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.
SSE Endpoint
Build the endpoint that streams tokens to the browser as they are generated.
Interleaved Assembly
Stream text to the user while assembling tool calls from the same stream.
Split Character Handling
Handle multibyte characters split across network chunks so every script renders clean.
Mid-Stream Failure
Turn an upstream failure into a clean error message instead of a spinner.
Resume From Disconnect
Let a dropped client reconnect and continue from the exact word it left off.
Drop-Proof Token Pipe
Compose everything into one gateway that survives splits, failures, and disconnects.
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.
Retry With Backoff
Retry rate limited requests with exponential backoff and jitter instead of failing the user.
Timeout Handling
Bound every request with a timeout so hangs become clean, retryable failures instead of stalls.
Circuit Breaker
Stop hammering a dead provider: open a breaker on a failure burst and probe it back closed.
Provider Fallback
Serve requests from the secondary provider when the primary fails, without ever billing twice.
Truncated Stream Recovery
Detect responses cut off mid stream and retry them instead of delivering half an answer.
Provider Storm Drill
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.
About this path
This path has you build an AI agent from plain HTTP calls, without a framework or SDK: the tool-calling loop, structured output, streaming, and resilience. You should be comfortable writing code that sends HTTP requests and handles JSON. No earlier experience with agents or LLM APIs is needed. The resilience module keeps your agent running when a provider fails, with retries, timeouts, a circuit breaker and a fallback provider.
From the blog
1Frequently asked questions
4>What will I practice in this path?
4 modules: Tool Calling & Agent Loop, Structured Output, Streaming Agents and Resilience & Rate Limiting.
>How many challenges are there, and how hard are they?
23 challenges, all easy.
>What does this path run on?
Challenges run on Linux CLI.
>Do I need to install anything?
No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.
