Skip to content

Free · 7 modules · 46 lessons

Master AI Agents in Production

We build a travel-planning agency of AI models that survives production, and we explain every choice as we make it, desk by desk.

  • 7 modules
  • 46 lessons
  • $0 price
  • 100% on GitHub

No payment, ever — not in the course, not in the product it builds.

What she sees, and what the agency does behind it

One trip in four screens: she asks, it routes to the right desk, the floor orchestrates a parallel search, and it books. By module 5 you will have built every desk on screen.

  1. Globtrotty Front desk

    She writes: a week in Portugal in September, near a beach, under €1,500 — and we’re bringing a toddler

    Behind the scenes: classified new_trip → Planning desk

    You ask

    A small, cheap model labels the message and routes it. No frontier model yet — this hop is effectively free.

  2. Globtrotty Planning desk

    The agency replies: Which city are you flying from, and are your dates flexible by a few days?

    She writes: Berlin — a few days either side is fine

    Behind the scenes: notebook ← budget · month · toddler

    Routed to Planning

    The planning desk owns the trip. Every fact is written down with who said it, so no tool can quietly relax a limit she set.

  3. Globtrotty The floor
    • Explorers · fares Berlin → Faro
    • Explorers · Algarve stays, crib filter
    • Scouts · brief the coast
    • Back office · rehydrate + check prices
    14 flights from €176 9 stays from €120 cars from €29 12 tours from €25

    Orchestration

    Explorers work in code, scouts work in words, and the back office re-checks every price. Four searches run at once.

  4. Globtrotty Cashier

    She writes: the TAP flight, Praia da Rocha, the T-Cross and the kayak tour

    Trip booked €1,740
    Flights
    Berlin ⇄ Faro · TAP direct
    Stay
    Praia da Rocha · 7 nights · crib
    Car
    VW T-Cross · 7 days
    Tour
    Benagil sea-cave kayak

    You choose — booked

    Each item is re-quoted on its own identity before booking. Her final click becomes a label the self-improving loop learns from.

From one API call to a loop that improves itself

Seven stages down one repository, each running on the code the last one left behind.

  1. Stage 01 7 lessons

    From one call to an agent

    Start from a single model call and grow it into a working agent. You learn the main shapes an agent can take, and build the first version of a travel-planning agency that answers a real request.

    Eight architectures hired into one agency
  2. Stage 02 7 lessons

    Harness foundations

    Build the foundation every later feature depends on: a database, background processing, a core engine that is easy to test, safe handling of money, and a running record of every model call and what it cost.

    The turn, the ledger, and the engine every desk runs on
  3. Stage 03 7 lessons

    Surviving crashes

    Make the agent reliable when things go wrong. You learn how a job survives a crashed worker, resumes exactly where it left off without repeating work it already paid for, and prove it against a real database.

    A turn that resumes after a killed worker, proven on Postgres
  4. Stage 04 6 lessons

    Suppliers, provenance, and gates

    Connect real flight and hotel data, and build the checks that keep the model honest. You learn how to guarantee every price a traveller sees came from an actual search, never from the model itself.

    Live suppliers, and gates that block any price the model invented
  5. Stage 05 7 lessons

    The fleet

    Bring the agent to life with real model calls. You give it tools, protect it from untrusted input, add a memory that lasts across conversations, and control exactly what the traveller sees.

    The first real model call, its tools, its memory, its fences
  6. Stage 06 6 lessons

    Evals

    Learn how to measure whether the agent is doing a good job. You grade both its answers and the path it took to reach them, using real test trips, a simulated traveller, and model judges you keep honest.

    The output and the path graded, judges calibrated to her decisions
  7. Stage 07 6 lessons

    The self-improving loop

    Close the loop so the agent improves over time. You turn the signals travellers leave behind, their edits, choices, and bookings, into safe changes that ship on a regular schedule.

    A loop that makes her fourth trip better than her first
Neciu Dan speaking at a conference
Who's teaching this

Hi, I'm Dan.

I'm a Senior Engineering Manager at Perk with 14+ years shipping production systems, and I host Señors at Scale, a podcast for senior engineers. I've given 30+ talks across 15 countries on frontend, architecture, and now agents.

I built this course the way I build at work: one real repository, every design decision defended against code that actually runs. No slideware, no toy snippets — the agency we build books real trips, and you can check out any lesson and run it yourself.

  • 14+years building
  • 30+conference talks
  • 15countries

Inside every module

What you build, what you learn, and the problem each module was written to solve. Every lesson is free once you sign in.

// Ten shapes an agent can take. We hire eight.
type Shape =
  | 'single-call'   | 'chain'
  | 'router'        | 'supervisor'
  | 'parallel-fan'  | 'reflection'
  | 'tool-loop'     | 'evaluator'

const AGENCY: Shape[] = pickEight(all)
Stage 01 7 lessons

From one call to an agent

Start from a single model call and grow it into a working agent. You learn the main shapes an agent can take, and build the first version of a travel-planning agency that answers a real request.

You build
The agency's org chart, and the eight architectures we hire into it.
You learn
When a chain, a router, or a supervisor beats a single model call.
The challenge
Pick the architecture before the wrong one is baked into everything.
7 lessons in this module
  1. The first call
  2. Seats
  3. Reading her numbers
  4. The first tool
  5. Bounding the loop
  6. Two desks
  7. The notebook
// The engine is pure: same inputs, same plan.
export function turn(state: TurnState, io: Deps): Step {
  const notebook = applyRequirements(state.notebook)
  const spend    = ledger.reserve(SEATS.front_desk)
  return decide(notebook, spend)   // no I/O in here
}
Stage 02 7 lessons

Harness foundations

Build the foundation every later feature depends on: a database, background processing, a core engine that is easy to test, safe handling of money, and a running record of every model call and what it cost.

You build
The turn, the pure engine, the money type, the notebook, the call ledger.
You learn
The primitives every desk shares, and why the engine stays pure.
The challenge
A deterministic harness wrapped around a non-deterministic model.
7 lessons in this module
  1. Persist first
  2. Four tiers with a clock each
  3. Engine and shell
  4. Money is never a bare number
  5. Record every call
  6. Control the money
  7. Fifty presses, one turn
$ npm test -- worker-resume

  ✓ a killed worker resumes from its last ledger row
  ✓ a poison loop trips the step cap, not the bill
  ✓ two workers cannot claim the same turn

  Tests  3 passed (3)  ·  real Postgres
Stage 03 7 lessons

Surviving crashes

Make the agent reliable when things go wrong. You learn how a job survives a crashed worker, resumes exactly where it left off without repeating work it already paid for, and prove it against a real database.

You build
A turn that resumes after a killed worker and a poison loop.
You learn
Durability, idempotency, and replay from the ledger it left behind.
The challenge
Crash-safe turns that never lose work and never double-charge.
7 lessons in this module
  1. The claim with a fencing token
  2. Heartbeats and leases
  3. Completion in one transaction
  4. The tool-call intent ledger
  5. The sweeper
  6. The worker loop assembled
  7. Building the harness with agents
// Every quoted amount must trace to a supplier row.
for (const price of quotedAmountsIn(reply)) {
  if (!corpus.backs(price))
    return refuse('unbacked', price)   // model invented it
}
return pass()
Stage 04 6 lessons

Suppliers, provenance, and gates

Connect real flight and hotel data, and build the checks that keep the model honest. You learn how to guarantee every price a traveller sees came from an actual search, never from the model itself.

You build
Live flight and hotel data, behind gates that check every number.
You learn
Provenance, grounding, and refusing a price that has no source.
The challenge
Stop a hallucinated price before it ever reaches the traveller.
6 lessons in this module
  1. The supplier port
  2. Live adapters
  3. The provenance corpus
  4. The rehydration gate
  5. Freshness, currency, slots, totals, budget, dates
  6. The cashier
const desk = loadDesk('planning')          // hashed prompt
const out  = await callModel(desk, {
  tools: DESK_TOOLS,                       // fenced
  memory: readUserMemory(user),            // per traveller
})
record(out)                                // every call ledgered
Stage 05 7 lessons

The fleet

Bring the agent to life with real model calls. You give it tools, protect it from untrusted input, add a memory that lasts across conversations, and control exactly what the traveller sees.

You build
The first real model call, its tools, its fences, its memory.
You learn
Tool use, context fencing, memory, and showing your work.
The challenge
Real capability without reading, or doing, the wrong thing.
7 lessons in this module
  1. The first real model call
  2. Tools are doors
  3. The front desk and the planning desk
  4. Staff
  5. The exits nobody counted
  6. Memory and context
  7. What she sees
scorecard (3 cases graded)
  must_include              3/3 (100%)
  every_number_has_search   2/2 (100%)
  call_count_fits_the_job   0/3   ← the desk over-asks
  questions_before_guesses  3/3 (100%)
  judge agreement           0.83  ≥ 0.80 floor
Stage 06 6 lessons

Evals

Learn how to measure whether the agent is doing a good job. You grade both its answers and the path it took to reach them, using real test trips, a simulated traveller, and model judges you keep honest.

You build
Golden trips, a simulated traveller, and judges calibrated to her.
You learn
Grading the output and the path that produced it, and taming variance.
The challenge
Measure an agent honestly when every run comes out different.
6 lessons in this module
  1. Why snapshot tests lie
  2. The gates are already evals
  3. Golden trips and the simulated traveller
  4. Pinning variance
  5. Trajectory grading
  6. The judge
// The loop writes data and proposes changes.
// A commit changes behaviour — never the model at runtime.
export const CADENCE = {
  weekly:    'npm run worst',      // read the worst traces
  monthly:   'npm run examples',   // refresh the prompt set
  quarterly: 'count, then decide', // fine-tune? usually no
}
Stage 07 6 lessons

The self-improving loop

Close the loop so the agent improves over time. You turn the signals travellers leave behind, their edits, choices, and bookings, into safe changes that ship on a regular schedule.

You build
The loop that turns the signals she leaves into changes that ship.
You learn
Conversions, example selection, release canaries, and cadence.
The challenge
Close the loop safely: data and proposals, one commit at a time.
6 lessons in this module
  1. The signal we already collect
  2. Three requirements
  3. The inversion bug
  4. Examples and memory
  5. Calibration and canaries
  6. The cadence

Build the agency with us

Forty-six free lessons, and a repository you can run the moment you finish module 3.