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.

Intermediate11 min

maxInvocations does not count failed tool calls

The beeai-framework docs say onlySuccessInvocations affects forceAtStep. It also silently scopes maxInvocations, consecutiveAllowed, minInvocations and onlyAfter. Measured end to end on 0.1.31, with a control arm on every group.

Advanced14 min

SSRF: your AI agent's URL tool can reach your internal network (Node)

If your agent has a tool that takes a URL, the model chooses where your server connects. Measured end to end on Node 24 with no dependencies and no API key: the guard most people write fails four ways, including the IPv4-mapped IPv6 bypass behind CVE-2026-56266, which also defeated the first version of my own hardened guard.

Intermediate13 min

LangGraph "does not provide an export named 'LastValue'": ten classes declared but not exported

On @langchain/langgraph 1.4.19 the package root's type declarations export 212 names and its runtime exports 95. Ten of the gap are classes, tsc compiles the broken import without complaint, and one of the imports that fails is copied verbatim from the vendor's own JavaScript documentation.

Intermediate12 min

How to test a BeeAI ConditionalRequirement: onlyBefore is never read

ConditionalRequirement accepts onlyBefore, validates it five ways, and never consults it. A seven-arm harness measures the tool set a BeeAI RequirementAgent actually hands the model.

Intermediate12 min

How to test maxIter in AgentKit: 0 means one call, or no limit

On @inngest/agent-kit 0.13.2 the option maxIter exists on both Agent.run() and createNetwork(), both default to 0, and 0 means exactly one inference in the first and no limit at all in the second. A harness that measures both with no API key.

Intermediate11 min

How to test a VoltAgent guardrail bundle: the sanitizer runs last

The prompt injection guardrail is third in the bundle and the HTML sanitizer is fourth, so markup the sanitizer strips rejoins a banned phrase after the detector has already passed it.

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.

Agent frameworks

maxInvocations does not count failed tool calls

The beeai-framework docs say onlySuccessInvocations affects forceAtStep. It also silently scopes maxInvocations, consecutiveAllowed, minInvocations and onlyAfter. Measured end to end on 0.1.31, with a control arm on every group.

11 min read109
Agent security

SSRF: your AI agent's URL tool can reach your internal network (Node)

If your agent has a tool that takes a URL, the model chooses where your server connects. Measured end to end on Node 24 with no dependencies and no API key: the guard most people write fails four ways, including the IPv4-mapped IPv6 bypass behind CVE-2026-56266, which also defeated the first version of my own hardened guard.

14 min read188

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