Change the wording, keep your experiment. Saved in this browser when storage is available.
Inside an AI agent / 01
How an AI agent
checks its work.
Play the shell game, follow its recorded AI-assisted build, and try the checks that caught lost progress.
Recorded build. Playable result.One otter. One good pebble. A game to make.
Shell pairs
0 of 4 pairs
0 moves
Best —
Use Tab or the arrow keys to move between shells. Enter or Space turns one over.
The shells are here. The game isn’t wired up yet.
The build, replayed
Recorded steps. No live AI.
- Model requests
- Tool acts
- Result returns to the model
“Make a shell-matching game.”
You give the model a task. It can ask tools to edit or check something. The software around it runs allowed requests and sends back what happened. That surrounding software is called a harness.Give the AI a goal. The model can request edits and checks. The surrounding program, called a harness, runs those tools and returns their results.
A miss should close.
A shell was open.
The upgrade closed it.
The board also reshuffled. The first checks had missed this.
Choose a check that would catch the lost progress
Fixed local reenactment using the game's rules. These choices do not call an AI or replay the old controller. The test board is separate from your game.
Choose a case and run the check.
A condensed account of this game’s development, with checks you can run.
The useful bit
How tool results guide the next edit
The helper needs to see what happened before deciding its next step. A failed check can lead to another edit. A limit on turns stops it from trying forever.An agent gets a result back before choosing what to do next. If a check fails, that result can lead to another edit. A turn limit gives the loop a stopping point.
Download the shell game
Save one HTML file to play offline and edit.
The finished game, not an AI agent. No account or API key.
What is real here?
You can play the game and run its checks here. The build story retells an earlier session made with AI assistance. It is not a live AI conversation and does not write new code as you watch.The game and the browser checks run on your device. The build steps are an edited account of an AI-assisted development session, not a live model conversation. The replay does not generate new code or adapt to new requests.
The saved-score change began as a second task. Review then caught a real bug: the upgrade reset an active round. A browser reproduction was returned to the author, who added a failing regression test and corrected the code. The replay summarizes that exchange; it does not show private model reasoning.
The harness is the software around a model: it supplies tools, runs allowed requests and sends results back. These teaching panels describe that relationship; they do not run a model harness.
Created by Jonathan Simone with AI assistance. Original artwork and game. Technical background: Building effective agents and the action and observation cycle.