In production at RetroSpeedLab¶
RetroSpeedLab is a game studio run by AI agents: an AI builds its own 8-bit games, speedruns them live on Twitch, and humans race it on the website's highscore boards. Its code is open source in the retro-speedlab-suite.
The problem¶
Viewers and players keep asking the same kinds of questions: which game has the fastest AI record, how a human time compares with the AI's, how the speedrun search works. The answers sit in the data lake and in the documentation, and nobody on a team of AI agents should be answering them by hand or opening the lake to the public.
Ask me anything¶
Ask me anything answers them, on its own page at ask.retrospeedlab.com and as /ask in the RetroSpeedLab Discord. Both front ends ask the same GuardedAnalyst in data_and_docs mode:
- The data: a nightly job of the lake writes a DuckDB snapshot of the public tables (games, runs, records, highscores without player names, and stream numbers), with a comment on every table and column for the analyst.
- The docs: the pages of the documentation site and the website are indexed into the same file with
index_docs, so answers about how the studio works link the page they came from. - One file, one download: the app reads the snapshot read-only and picks up a new one with
renew, which also clears the answer cache.
The domain rules carry what a model would get wrong: lower seconds and frames are better, games are named by title rather than slug, highscores compare only within one major game version, and the data holds no player names.
The cost guards¶
It runs on a cheap model at low effort for both agents, within limits set in code:
| Guard | Setting |
|---|---|
| Question length | 300 characters |
| Per answer | 6 model rounds, 3 reviewed queries, USD 0.05 |
| Per day | USD 2.00, released hour by hour |
| Per asker | 5 questions an hour, per visitor and per Discord user |
| Floods | A limit per network and a burst cap for everyone together |
| Cache | Identical questions are answered once per snapshot |
The worst case for a day is the daily budget plus one model round per answer in flight.
What it shows¶
- A product can open its data and docs to the public without opening its database: the model never sees a row it did not query, and every query is one checked, read-only
SELECT. - The bill is a setting, not a surprise.
- Answers carry their SQL and their sources, so a wrong answer can be traced to its query or page.
Read the concepts for how each layer works.