AI agents play Pokemon Red autonomously. The agent IS the player — no middleman scripts, no separate API calls. Your OpenClaw agent starts the emulator server, sees the screen, reads game state from RAM, and decides what to do.
Published on ClawdHub as pokemon-red — install the skill and play.
┌──────────────────────────────────────────────┐
│ OpenClaw Agent (You) │
│ │
│ curl /api/screenshot → image tool → decide │
│ curl /api/navigate → pathfinding │
│ curl /api/press → manual controls │
│ curl /api/state → HP, position, battle │
└──────────────┬───────────────────┬────────────┘
│ HTTP API │
┌──────┴───────────────────┴──────┐
│ Emulator Server (PyBoy) │
│ │
│ • Pokemon Red ROM (you provide) │
│ • RAM reading → structured JSON │
│ • A* pathfinding on scanned maps│
│ • Screenshot capture │
│ • Save/load states │
│ • Live dashboard at :3456 │
└──────────────────────────────────┘
git clone https://github.com/drbarq/Pokemon-OpenClaw.git
cd Pokemon-OpenClaw
pip install pyboy pillow numpy fastapi uvicorn requestsPlace a legally obtained Pokemon Red ROM at ./PokemonRed.gb
python scripts/emulator_server.py --save ready --port 3456Dashboard at http://localhost:3456
clawdhub install pokemon-redOr point your agent at skill/SKILL.md in this repo.
Your agent plays via HTTP API. The skill teaches it the full loop:
- Navigate to destinations with pathfinding
- Battle wild Pokemon and trainers
- Track quests and learn lessons
- Save progress between sessions
The skill (skill/SKILL.md) has everything you need:
- Start the server, check destinations, use navigate for travel
- Fall back to manual buttons for menus and interactions
- Battle strategy, HP management, quest tracking
- Session pattern: play 20-50 turns, save, report progress
| Endpoint | Method | What it does |
|---|---|---|
/api/state |
GET | Game state from RAM (position, party, badges, battle) |
/api/screenshot |
GET | PNG screenshot of the Game Boy screen |
/api/navigate |
POST | Pathfind to a named destination |
/api/destinations |
GET | List all navigation targets |
/api/maps |
GET | Which maps have pathfinding data |
/api/press |
POST | Send button presses |
/api/quest |
GET | Current quest objective |
/api/quest/complete |
POST | Advance quest, save lessons |
/api/knowledge |
GET | All lessons learned |
/api/command |
POST | Save/load/speed |
scripts/
emulator_server.py — PyBoy + FastAPI (the game engine)
game.py — Low-level emulator wrapper
navigator.py — Named-destination pathfinding
pathfinder.py — A* on scanned maps
map_scanner.py — Offline map scanning tool
skill/
SKILL.md — Agent instructions (the skill)
references/ — Game strategy guide
game_state/
quest.json — Quest progress
knowledge.json — Lessons learned
maps/ — 15 scanned map files
saves/ — Emulator save states
dashboard/ — Retro Game Boy web UI
- Character: SmokRob
- Pokemon: SMOG the Squirtle Lv6
- Location: Route 1
- Quest: Deliver Oak's Parcel → Viridian City
- Badges: 0/8
Multiple OpenClaw agents playing Pokemon simultaneously, posting progress to Moltbook, sharing strategies, and competing to beat the game first. Every agent gets their own save file, their own team, their own journey.
- Python 3.10+
- PyBoy, Pillow, NumPy, FastAPI, Uvicorn, Requests
- Pokemon Red ROM (.gb) — legally obtained, not included
- PyBoy — Python Game Boy emulator
- Claude Plays Pokemon — Original concept
- Pokemon Red RAM Map — Memory addresses
MIT