🎮 The Idea: An Agentic RPG
Two goals: (1) show how to integrate an agentic system into a game context, and (2) test how good MiniMax M3 is at complex programming. The meta layer: "I'll use Pi to drive MiniMax when building the system, and Pi under the hood inside the game to drive the agentic engine." 0:00
🧠 MiniMax M3 Architecture
Three frontier capabilities: (1) autonomous task decomposition + tool invocation + multi-step reasoning for long-running agentic tasks, (2) up to 1M-token context and native multimodal, (3) speed. 1:35
🔌 Connect MiniMax to Pi
The setup is three commands: install Pi, set the MiniMax API key, launch with pi --provider minimax --model minimax-m3. Then check the bottom-right shows "MiniMax M3." 4:31
🏗️ Building the Game
The prompt is deliberately simple: "Build a browser RPG that visualizes a coding agent solving GitHub issues. Use Phaser, React, TypeScript." Plus a pasted style-reference image. He leaves "all of this work up to MiniMax." 5:50
plan.md — it understood 'this is complicated, let me build a plan.'" It produced a client/server architecture: React + Phaser canvas client, WebSocket to a Node.js server that does "the agentic stuff." 7:03
It ran its own tests, found problems, and iterated — "the monster HP isn't being updated either." The token math was astonishing: "we're at 8% of our million-token context, and the equivalent cost is only 20 cents so far." 9:16
🐛 Multimodal Debugging
He has a skill called "agent browser" that opens the game and plays it, taking screenshots as it goes. "MiniMax is able to look at these images and reason about them — 'oh, victory again but the screen is stuck on victory' — it understands there's a problem from the screenshot and starts debugging." 9:45
🐙 Real GitHub Issues → Monsters
After the demo data works, he connects it to real GitHub issues via the gh CLI, against a demo project called "habit CLI" with four open issues. The instruction: "when we attack a monster, spin up Pi with MiniMax to fix that issue." 14:15
⚙️ The In-Game Agent Engine
The architecture: Vite + React + Phaser client ↔ WebSocket (bidirectional) ↔ Node.js server ↔ the Pi agent. The server is "where the actual agentic work happens." 24:49
createAgentSession to spawn a session in the working directory, then prompts it with a dynamically-built instruction: "Solve GitHub issue #{n}: {title}. Current working directory: {repo}. Explore the repo, find the relevant code, make changes, run the test suite, reply with the single word 'done' when tests pass. Be efficient." 27:00
gh pr create --base main --head {branch} --title ... --body ... — all via node:child_process. "We're just running raw terminal commands from our script. That's wild." 28:20
⭐ MiniMax M3 Performance
"Building games like this is really hard for agents — a genuinely challenging task. But when it got to the Pi stuff and the agentic backend, it crushed through it." His honest notes: 29:40
| Observation | Take |
|---|---|
| Speed | "Super fast at the start of an empty context" |
| Agentic backend work | "Crushed through it — no problem compared to game tweaking" |
| Game polish / UX | Needed steering (monster HP not draining, can't be injured, movement bugs) |
| No web search used | "This is key — I handicapped the model. It built everything from training data + inspecting the Pi source, no reference project." |
| Honesty | "I didn't cheat. Everything you saw is real." |
✅ Key Takeaways
- The game is a shell for an agent. The real system is the client/server + Pi agent engine — the RPG is just a compelling interface on top of real agentic work.
- Multimodal = visual debugging. Screenshots let the model diagnose ("screen stuck on victory") and iterate without you describing the bug.
- Autonomous decomposition is the differentiator. MiniMax wrote plan.md and split client/server without being asked.
- Watch the thinking, steer early. He stopped the agent twice — once for confusion, once to ban a wrong approach ("read the Pi source instead of using kitty").
- The PR pipeline is just child_process + gh CLI. "Real PR creation" = commit on a branch, run
gh pr create, merge — no magic. - MiniMax M3 held up on a hard task with no web search — and its token economics were ~20 cents at 8% of a million-token context.
🔗 Resources & Links
- 📺 Original video — ZazenCodes
- 💻 Source code — the minimax-dev-rpg