Gamified Agentic Coding — Vibe Coding on Steroids
Turn your coding tasks into RPG battles where AI agents fight kernel-level enemies.
AgentArena transforms the agentic coding experience into a gamified terminal RPG. Your AI agents — CodeSmith, BugSlayer, Architect, TestKnight, DeployMage, and DocScribe — battle against task enemies with HP, defense, and boss mechanics. Every coding subtask is a quest, every module is an enemy to defeat, and token efficiency determines your victory rank.
# Install
pip install -e .
# Run the demo battle
python run_demo.py
# Or use the CLI
arena battle
arena party
arena versionBuilt on research-backed foundations:
- Predictive Coding — Agents learn via local prediction errors (Hebbian updates), not global backprop
- MaxEnt Belief Engine — Random Worlds / Maximum Entropy for rational task dispatch
- TLPlan Temporal Logic — Temporal constraints ensure correct quest ordering (no deploying before testing!)
- Octalysis Reward System — 8 core drives mapped to gamification mechanics
- InfoRM Anti-Reward-Hacking — Information bottleneck prevents gaming the token budget
- 5-Layer Context Defense — Input filtering, memory pointers, observation masking, drift detection, Merkle checkpoints
| Agent | Tier | Style | Role |
|---|---|---|---|
| 🗡️ CodeSmith | S | DPS/Offense | Code generation, refactoring, feature implementation |
| 🔪 BugSlayer | A | Assassin | Debug tracing, hotfixes, root cause analysis |
| 🏰 Architect | S | Tank/Strategy | System design, schema definition, dependency analysis |
| 🛡️ TestKnight | B | Shield/Defense | Unit tests, integration tests, coverage scanning |
| 🧙 DeployMage | A | Support | Docker builds, CI/CD pipelines, health checks |
| 📜 DocScribe | C | Utility | API docs, README generation, changelogs |
Token efficiency = winning strategy:
| Rank | Token Usage | XP Multiplier | Reward |
|---|---|---|---|
| S | < 30% | 5.0x | Legendary |
| A | 30-60% | 3.0x | Epic |
| B | 60-80% | 1.5x | Rare |
| C | 80-100% | 1.0x | Common |
| F | > 100% (YIELD!) | 0.0x | FAIL |
agentarena/
├── src/agentarena/
│ ├── models/ # Agent, Enemy, Quest, BattleState, Scratchpad
│ ├── engine/ # BattleEngine (combat loop, damage calc, XP)
│ ├── tui/ # Rich TUI (battle screen, panels, victory)
│ ├── agents/ # LangGraph agent integration (Phase 2.5)
│ ├── rag/ # Agentic RAG engine (Phase 2.5)
│ ├── config/ # Configuration and knowledge base
│ └── cli.py # Typer CLI entry point
├── tests/
├── docs/
├── run_demo.py # Quick demo runner
└── pyproject.toml
| Version | Codename | Focus |
|---|---|---|
| v0.1.0 | Genesis | Concept, agent tiers, architecture |
| v0.2.0 | Sentinel | Context defense, RAG, scratchpad |
| v0.3.0 | Theorist | First principles, predictive coding, MaxEnt, TLPlan |
| v0.4.0 | Builder | Working prototype — battle engine, TUI, demo |
MIT