All frameworks
AI Agents

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.

linux-cliLinux CLI
Module 1

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.

6

Loop Body

easy1 / 2 solved

Tool Dispatcher

easy1 / 1 solved

Delta Assembler

easy1 / 1 solved

Non-Termination Guard

easy1 / 1 solved

Parallel Dispatch

easy1 / 1 solved

Hidden Multi-Tool Missions

easy1 / 1 solved
Module 2

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.

5

Schema Definition

easyNo attempts yet

Fence and Comma Cleaner

easyNo attempts yet

Repair Loop

easyNo attempts yet

Partial JSON Handler

easyNo attempts yet

Contract Extraction Live

easyNo attempts yet
Module 3

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.

6

SSE Endpoint

easyNo attempts yet

Interleaved Assembly

easyNo attempts yet

Split Character Handling

easyNo attempts yet

Mid-Stream Failure

easyNo attempts yet

Resume From Disconnect

easyNo attempts yet

Drop-Proof Token Pipe

easyNo attempts yet
Module 4

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.

6

Retry With Backoff

easy0 / 1 solved

Timeout Handling

easyNo attempts yet

Circuit Breaker

easyNo attempts yet

Provider Fallback

easyNo attempts yet

Truncated Stream Recovery

easyNo attempts yet

Provider Storm Drill

easyNo attempts yet