Idea · Oct 4, 2026
Stroke Budget
An AI agents lab where students design the painting tool API an LLM agent uses to reproduce a target image under a fixed stroke budget, then see how tool design, not prompting, changes the result.
What it would do
Inspired by the Show HN 'Giving Opus 5.5 a simulated paint canvas' (stillwet.art), this tool makes tool design the object of study in an AI agents unit. The instructor provides target images (a flag, a simple still life, a pixel sprite) and a simulated canvas with wet-paint physics. Students define the agent's tools as JSON schemas: maybe a single 'stroke(points, color, width)', maybe higher-level 'fill_region', 'gradient' or 'erase' tools, maybe a 'look' tool that returns a downsampled view of the canvas. The agent runs a loop with a hard budget of tool calls, and the app scores the result against the target with SSIM and a perceptual color distance. A run viewer replays every call with the agent's stated intent beside it, so students can see where the agent misread the canvas or wasted strokes. A class leaderboard ranks tool sets (not prompts) on the same targets, and the instructor can lock the system prompt so that tool design is the only variable.
Key features
- Simulated canvas with brush, fill and wet-blend primitives rendered on HTML canvas
- Student-authored tool schemas validated before a run, with a locked or editable system prompt
- Hard tool-call budget and token accounting per run
- Similarity scoring (SSIM plus perceptual color distance) against the target image
- Step-by-step replay showing each tool call, its arguments and the agent's stated intent
- Class leaderboard comparing tool sets across a shared set of targets