Module 2 · Tools, Knowledge, Memory & Research Design · scripted

Exercise: The Relay

45 minoutcomes: knowledge-systems, context-engineering

The goal: design what survives

Everything you just learned — teaching your future self, naming for the searching agent — has been advice. Now it becomes an experiment with numbers attached. In this exercise a chain of agents works through a scenario, one task each. Every agent is a fresh conversation: it has never seen the earlier tasks, and it dies when its task ends. The only thing that passes between them is a shared filesystem — and the only thing you control is the methodology: the standing instructions, injected into every agent's system prompt, for what to write down, where, and how. Bad methodology, and facts silently die between tasks. Good methodology, and the fifth agent answers a question only the first agent was ever told.

The relay

Agent 1fresh conversation → task 1 → writes files → dies
Agent 2fresh conversation → task 2 → reads + writes → dies
Agent Nfresh conversation → task N: needs a fact from task 1

The filesystem is the baton. Your methodology decides what's written on it.

The exercise at a glance

  1. 1
    Step 1: run the relay with the naive one-line methodology and read the wreckage.
  2. 2
    Step 2: design a real methodology, rerun the same pack, and compare the scoreboards.
  3. 3
    Step 3: inherit a polluted filesystem and see whether your methodology survives other people's files.

The exercise playground

This exercise needs its playground — The Relay — because it runs a chain of real agents over a shared filesystem, grades every task, and keeps every transcript. No chat tool can replicate the relay itself.

How the playground works

  1. 1
    Open it: /exercises/relay — or scan the QR code on the next card.
  2. 2
    Pick a task pack.
    A scenario whose tasks are chained: information arrives in one task's prompt and is demanded back, tasks later, by another.
  3. 3
    Write your methodology — the standing instructions injected into every agent's system prompt.
  4. 4
    Run the relay: one agent at a time (watching each work), or all the way through.
    Each agent's full transcript is kept: every search, read, write, and token. The filesystem is inspectable at any moment.
  5. 5
    Read the scoreboard, then Archive the experiment so you can compare runs.

Scan to open The Relay

Scan to open The Relay
ai-agents-seminar.vercel.app/exercises/relay

The tools every agent gets

list_files(path?)what exists
search_files(pattern, path?)grep: names + contents
read_file(path)the full text
write_file(path, content)create — or overwrite, but only after reading it
edit_file(path, pattern, replacement)targeted change, only after reading it

The read-before-write rule is real: an agent cannot blindly clobber a file it has never looked at.

What the numbers mean

The scoreboard

facts keptdid the agent's ANSWER contain the facts the task demanded? (graded automatically, per task)
callshow many tool calls the agent needed
tokensthe estimated cost of its whole conversation — every search result and file read, compounding
bootstrapsearches before the first read: the price of FINDING the entry point

Read the pairs together: an agent with many searches and a failed fact check got lost — your names didn't match its vocabulary. An agent with huge tokens and passing checks is paying a re-orientation tax — it survived by reading everything. The methodology you want scores high on facts and low on everything else.

Step 1 · The naive baseline

Pick The Participant Pipeline, leave the methodology at its one-line default, and run the whole relay. Then read the wreckage like an examiner: open the failed agents' transcripts. Find the moment an agent searched for something that was never written down, or confidently reported a stale fact because the correction never reached the file it read.

Capture — end of Step 1

💾 Save this before you move on

Copy into your course document and save:

  1. 1The scoreboard totals: facts kept, calls, tokens.
  2. 2The single best failure: which fact died, in which task it was born, and where the losing agent looked for it.

Step 2 · Design the methodology

Now write a real methodology, and let the lessons dictate its clauses: where things are recorded (containers that match the shape of the information); what names files carry (the words a task would search for); one concept, one name; an index or signpost a searching agent will hit first; and a correction rule — when a fact changes, the old value must not survive anywhere it could mislead (the edit tool exists for exactly this). Name it, save it, reset, and rerun the same pack. Archive both experiments and put the comparison side by side.

Capture — end of Step 2

💾 Save this before you move on

Copy into your course document and save:

  1. 1Your methodology, verbatim.
  2. 2The compare table: naive vs yours — facts kept, calls, tokens.
  3. 3The clause that earned its keep: one specific agent that succeeded BECAUSE of one specific line in your methodology.

Step 3 · Inherit the mess

Switch to the Inherit the Mess pack: the filesystem starts polluted — leftover procedures, a contradicting update, noise. The early tasks force the agents to decide which record to believe, and your methodology must handle a corpus it didn't create. This is the searching-agent trap with the stakes live: does your methodology tell agents how to mark what's stale, or only how to write what's new? Run it, read the transcripts of the tasks that touch the old files, and refine one more time if the first result embarrasses you.

Capture — end of Step 3

💾 Save this before you move on

Copy into your course document and save:

  1. 1What your methodology says about OTHER people's files.
  2. 2The moment an agent chose between the stale record and the current one — what it chose, and what made the difference.

Before we regroup

💾 Save this before you move on

Copy your three captures into your course document and save — plus your archived compare table. In the group comparison we build the leaderboard for each pack (facts kept against tokens spent) and read the winning methodologies aloud. Expect convergence: the winners will have independently rediscovered indexes, task-vocabulary naming, and a correction rule. That convergence is the finding.

Copy into your course document and save:

  1. 1All three captures above, in your course document.
  2. 2Your archived compare table: naive vs yours.

Be ready to discuss:

  • Whose methodology kept the most facts for the fewest tokens — and which single clause does the work?
  • Did anyone's methodology make agents write MORE and score WORSE? Where is the point at which recording becomes noise?
  • The correction tasks: append a new note, or edit the old record in place? What did each choice cost the later agents?
  • What would break first if the relay were 50 tasks long instead of 8?