Turning Architecture Choices Into an RTS
After a year of building agent systems, I noticed I kept giving the same explanations. When do you route instead of investigate? Why does a critic beat a smarter generator? Why is "just add a human approval" the wrong answer to everything except the three cases where it's the only answer?
Blog posts about this exist. Nobody remembers them. So I built the thing people actually remember: a game that punishes you for getting it wrong.
AGENT EMPIRE is live at patterns.products.sayantan.sh. It's an 8-bit real time strategy game. You command an orchestrator base. Incidents spawn on the field — a 500K ticket storm, a checkout failure nobody can explain, a $1,000 refund that moves in one direction only — and they escalate in real time. You spend a regenerating token budget dispatching pattern-agents at them: Coordinator, ReAct, Hierarchy, Critic, HITL Gate, Saga, RAG, Agentic RAG, Vector DB, Reflect Loop, Sub-Agent. Eleven patterns. Every scenario is drawn from things that actually happened.

The wrong answer is the product
Here's the design decision I care most about: when you dispatch the wrong pattern, the game stops the clock.
The field dims, everything freezes, and a card explains the failure — not "wrong, try again," but the actual architectural reason:

✗ COORDINATOR FAILED — COORDINATOR routes known categories. An unknown cause has no category yet; there is nothing to route. 💡 This is finding a cause nobody knows yet — dispatch REACT.
There are 110 of these verdicts — every wrong pattern against every kind of work, each one a real argument I've had in a design review. The wrong picks are where the teaching lives. The game just makes you want to collect them.
What's in the box
- A campaign across three acts — routing and retrieval, then verification and human gates, then orchestration at scale — ending each act with a multi-stage boss that demands a full pipeline in the right order.
- Boss mode and a daily challenge seeded by the date, with a streak.
- A simulation lab where you assemble any pipeline against any target, free, and watch where it breaks.
- Lifetime mastery — correct dispatches accumulate per pattern across runs, and your end screen tells you which patterns you confused for which, with links into the field guide.
- A field guide — every pattern as a markdown card: what it answers, where it makes sense, where it fails. Adding a pattern to the game is dropping a
.mdfile in a folder.
No backend, no build step, no framework. Vanilla JS, CSS, WebAudio chiptunes, and localStorage. Vercel serves static files and the whole game fits in your browser tab.
Why a game, though
Because architecture judgment is pattern recognition under pressure, and that's exactly what games train. Reading "sagas pair every step with a compensating action" does nothing. Watching your five-step migration half-finish and corrupt both sides because you sent a planner instead — once — and you'll reach for compensators forever.
The model proposes. The patterns decide. Go play it.