Preview environment - you also see content that isn't published yet.
Workshops60 MIN

Build your first agent

From empty repo to tool-loop in one hour - a guided walkthrough.

What you'll be able to do

You'll have a running agent that calls a single tool, processes the result, and answers. That's the smallest unit of a real agent - and everything else builds on top.

What you need

  • Node 22 or newer
  • An Anthropic API key (Sonnet 4.6 is enough)
  • 60 minutes without interruption

The loop

An agent is fundamentally a while(true) with three phases:

  1. Observe - pack everything that has happened so far into the prompt.
  2. Decide - the LLM decides whether to call a tool or respond.
  3. Act - if tool-call: execute and append the result. Otherwise: done.

We'll build exactly that over the next hour - step by step.

// pro deepdive

This section belongs to the Pro tier. You get access to full code, deeper explanations, and rabbit-hole material.

See tiers →