Plate I
The Agent Engine
Watch an AI agent turn one sentence into a change to a file. Open any part of the machine to see what it does, then break it on purpose.
Step 1 of 17
Load The harness writes the system prompt into the context.
Keys: ← → step, P play or pause, Home start. Select any part of the drawing to look inside it.
Select a part of the drawing, or pick one here:
Experiments
Change one thing and the machine runs again.
The ledger
The same run as text. It is complete without the animation, and each step can be opened.
- The harness writes the system prompt into the context.
- The harness describes the three tools the model may ask for. These descriptions take up context too.
- The harness finds AGENTS.md in the project and loads it before the request, so its rules apply from the start.
- Your request joins the context. The model has not seen anything yet.
- Turn 1. The model reads the whole context and replies with a tool request, not prose.
Data
{ "tool": "list_files", "input": {} } - list_files only reads, so the harness lets it run without asking you.
- The tool runs and its output is added to the context.
Data
AGENTS.md recipes/pancakes.md recipes/flatbread.md
- Turn 2. The model asks to read recipes/pancakes.md.
Data
{ "tool": "read_file", "input": { "path": "recipes/pancakes.md" } } - read_file only reads, so the harness lets it run without asking you.
- The tool runs and its output is added to the context.
Data
# Saturday pancakes My grandmother made these every Saturday in a pan older than my father. She never measured anything, so this recipe is my best guess from watching her. The trick is to stop stirring while the batter still looks a little lumpy. Let it rest while the pan heats. Nobody knows why that works, but it does. Flip once, when bubbles stay open on top. Never press them flat. Serve with butter and whatever fruit is about to go off. Serves 4. Takes 20 minutes. ## Ingredients - 2 cups flour (250 g) - 1 ½ cups milk (360 ml) - 2 eggs - 2 tbsp sugar (25 g) - 2 tsp baking powder (10 g) - ½ tsp salt (3 g) - 3 tbsp melted butter (45 g) ## Method 1. Whisk the dry ingredients. 2. Beat the eggs into the milk and butter. 3. Fold wet into dry. Stop while it is still lumpy. 4. Rest 5 minutes, then cook on a medium pan.
- Turn 3. The model asks to replace the serving line and amounts in recipes/pancakes.md.
Data
{ "tool": "edit_file", "input": { "path": "recipes/pancakes.md", "old_text": "Serves 4. Takes 20 minutes.\n\n## Ingredients\n- 2 cups flour (250 g)\n- 1 ½ cups milk (360 ml)\n- 2 eggs\n- 2 tbsp sugar (25 g)\n- 2 tsp baking powder (10 g)\n- ½ tsp salt (3 g)\n- 3 tbsp melted butter (45 g)", "new_text": "Serves 6. Takes 20 minutes.\n\n## Ingredients\n- 375 g flour\n- 540 ml milk\n- 3 eggs\n- 40 g sugar\n- 15 g baking powder\n- 5 g salt\n- 70 g melted butter" } } - Editing changes your files, so the harness stops and asks you. You allow it.
- The harness writes recipes/pancakes.md and returns the outcome to the context.
Data
Edited recipes/pancakes.md.
- Turn 4. Before answering, the model reads back the lines it changed.
Data
{ "tool": "read_file", "input": { "path": "recipes/pancakes.md", "offset": 9, "limit": 10 } } - read_file only reads, so the harness lets it run without asking you.
- The tool runs and its output is added to the context.
Data
Serves 6. Takes 20 minutes. ## Ingredients - 375 g flour - 540 ml milk - 3 eggs - 40 g sugar - 15 g baking powder - 5 g salt - 70 g melted butter
- The lines it read back match the lines it asked to write, so the model replies in words and the loop ends.
Data
Done. recipes/pancakes.md now serves 6. Amounts are in grams and ml, rounded as AGENTS.md asks.
Outcome: Done. recipes/pancakes.md now serves 6. Amounts are in grams and ml, rounded as AGENTS.md asks.