Step-by-step agent tutorials

Build production agents, step by step.

Clean, copy-paste tutorials for building AI agents: first-class code blocks, real eval results, and no fluff. Follow a path or jump straight to the step you need.

$ npm i && copy-paste the next step

Learning paths

Curated tutorial sequences

Each path is an ordered run of copy-paste tutorials. Start at step one or drop in wherever you are.

Featured tutorials

Single, self-contained walkthroughs you can finish in one sitting.

Beginner5 min

Claude Structured Outputs in Python: Guaranteed JSON (2026)

A runnable Python guide to Claude structured output: the native output_config.format JSON path, Pydantic-driven schemas, strict tool use, a portable tool-use fallback, and the 400/truncation gotchas nobody covers.

Beginner7 min

Handle Claude API 429 and 529 Errors in a Python Agent Loop (2026)

A 429 is your rate limit; a 529 is Anthropic overloaded. Catch both, honor retry-after, back off with jitter, cap the retries, and never retry a 400. Full runnable Python wrapper for agent loops.

Beginner5 min

LangGraph Recursion Limit: Fix GraphRecursionError Properly (2026)

GraphRecursionError means you hit LangGraph's 25-superstep recursion limit. Raise it the right way, find the real infinite loop, and exit gracefully with RemainingSteps.

Beginner7 min

Evaluator-Optimizer: Build a Self-Correcting LLM Agent in Python (2026)

The evaluator-optimizer workflow puts a rubric-driven critic in the loop so a generator revises until it passes. A runnable Python build with real guardrails.

Beginner6 min

Parallelization Pattern in Python: Fan-Out LLM Calls (2026)

Run independent LLM calls at the same time in Python with asyncio.gather, cap them with a Semaphore, and survive 429 rate limits with backoff. Runnable code.

Beginner6 min

Orchestrator-Workers Pattern in Python: A Claude Tutorial (2026)

Build the orchestrator-workers agent pattern in Python with Claude: a planner that decides subtasks at runtime, parallel workers, and a synthesizer. Runnable code, July 2026.

Pick your stack

Tell us your model provider and runtime, and we'll surface the tutorials that match.

From the notebook

The latest tutorials, fresh off the press.

Found a bug or want a topic covered?

Found a bug in a tutorial, want a topic covered, or shipping something with these patterns? Send the details. Code snippets and repro steps welcome.

Get in touch