Jev, TypeSafe AI's decision model, plays Pokémon Red. There are no scripts or cheats: the harness reads the game's memory, lists the legal options with some facts about each, and Jev picks one.
Landing page: site/
You need your own legally obtained copy of Pokémon Red. No ROM is included or distributed here. See Legal.
Game Boy emulator (Node) ──► read RAM ──► game state (map, party, battle, on-screen text)
▲ │
│ button presses ▼
harness mechanics ◄── Jev picks one ◄── legal options + facts
(A* pathfinding, menus) (type matchups, damage estimates,
"2 areas toward the objective", ...)
src/knowledge/milestones.ts. Progress is checked against the game's real event flags.Requirements: macOS or Linux, Node 20+, and git.
git clone https://github.com/christianmat/jev-pokemon && cd jev-pokemon
npm install
npm run setup # installs rgbds (via brew), clones + builds pret/pokered, generates symbol data
cp /path/to/your/pokered.gb roms/red.gb # your own dump of Pokémon Red (US/EU)
cp .env.example .env # then fill it in
The ROM must be the US/EU release. Its SHA-1 is ea9bcae617fdf159b045185467ae58b2e4a48b9a, the same build pret/pokered produces. The harness reads RAM addresses from that disassembly, so other versions won't work.
.env| Variable | What it does |
|---|---|
JEV_MODE | gateway for real Jev via Vercel AI Gateway, mock for a free, dumb stand-in (the default) |
AI_GATEWAY_API_KEY | Vercel AI Gateway key (VERCEL_AI_GATEWAY_API_KEY also works) |
JEV_MIN_INTERVAL_MS, JEV_MAX_PER_MIN | Throttling (defaults 300 ms and 90 per minute) |
npm start -- --speed 1 # real-time; local viewer at http://localhost:8787
npm start -- --speed 1 --resume # continue from the latest milestone checkpoint
npm start -- --speed 1 --load <save-name> # load a specific save from saves/
npm run headless -- --steps 3000 # max speed, logs only
npx tsx scripts/tools/save.ts # save the running game (writes saves/manual-*.json)
logs/jev-calls.jsonl has every Jev call: the full state, the options with their facts, the probabilities, and the latency.logs/events.jsonl has maps, milestones, saves and errors.| Path | What |
|---|---|
src/emu/ | emulator wrapper (serverboy / GameBoy-Online core), save states, audio tap |
src/game/ | ROM tables, RAM reader, collision grid + A*, region graph |
src/jev/ | Jev client (throttle, cache, log), AI SDK gateway backend, mock |
src/agent/ | mode detection, dialog and menus, overworld, battle, field moves and items |
src/knowledge/ | story milestones |
src/server/ | runner + local WebSocket viewer |
web/ | local viewer page |
site/ | public landing page (static; deploy with Vercel, root directory site) |
scripts/ | setup, data generation, debug tools |
site/ is plain static HTML with no build step:
site.The video embed and repo link are in site/index.html.
roms/ is gitignored.npm run setup, which clones it into vendor/. That disassembly isn't redistributed here, and vendor/ and src/data/generated.json are gitignored.LICENSE), because it builds on the GPL-licensed serverboy / GameBoy-Online emulator core.Made by Christian Mathiesen at Frigade.
23 commits
TypeScript
85.6%
HTML
11.7%
JavaScript
2.4%
Jev, TypeSafe AI's decision model, plays Pokémon Red. There are no scripts or cheats: the harness reads the game's memory, lists the legal options with some facts about each, and Jev picks one.
Landing page: site/
You need your own legally obtained copy of Pokémon Red. No ROM is included or distributed here. See Legal.
Game Boy emulator (Node) ──► read RAM ──► game state (map, party, battle, on-screen text)
▲ │
│ button presses ▼
harness mechanics ◄── Jev picks one ◄── legal options + facts
(A* pathfinding, menus) (type matchups, damage estimates,
"2 areas toward the objective", ...)
src/knowledge/milestones.ts. Progress is checked against the game's real event flags.Requirements: macOS or Linux, Node 20+, and git.
git clone https://github.com/christianmat/jev-pokemon && cd jev-pokemon
npm install
npm run setup # installs rgbds (via brew), clones + builds pret/pokered, generates symbol data
cp /path/to/your/pokered.gb roms/red.gb # your own dump of Pokémon Red (US/EU)
cp .env.example .env # then fill it in
The ROM must be the US/EU release. Its SHA-1 is ea9bcae617fdf159b045185467ae58b2e4a48b9a, the same build pret/pokered produces. The harness reads RAM addresses from that disassembly, so other versions won't work.
.env| Variable | What it does |
|---|---|
JEV_MODE | gateway for real Jev via Vercel AI Gateway, mock for a free, dumb stand-in (the default) |
AI_GATEWAY_API_KEY | Vercel AI Gateway key (VERCEL_AI_GATEWAY_API_KEY also works) |
JEV_MIN_INTERVAL_MS, JEV_MAX_PER_MIN | Throttling (defaults 300 ms and 90 per minute) |
npm start -- --speed 1 # real-time; local viewer at http://localhost:8787
npm start -- --speed 1 --resume # continue from the latest milestone checkpoint
npm start -- --speed 1 --load <save-name> # load a specific save from saves/
npm run headless -- --steps 3000 # max speed, logs only
npx tsx scripts/tools/save.ts # save the running game (writes saves/manual-*.json)
logs/jev-calls.jsonl has every Jev call: the full state, the options with their facts, the probabilities, and the latency.logs/events.jsonl has maps, milestones, saves and errors.| Path | What |
|---|---|
src/emu/ | emulator wrapper (serverboy / GameBoy-Online core), save states, audio tap |
src/game/ | ROM tables, RAM reader, collision grid + A*, region graph |
src/jev/ | Jev client (throttle, cache, log), AI SDK gateway backend, mock |
src/agent/ | mode detection, dialog and menus, overworld, battle, field moves and items |
src/knowledge/ | story milestones |
src/server/ | runner + local WebSocket viewer |
web/ | local viewer page |
site/ | public landing page (static; deploy with Vercel, root directory site) |
scripts/ | setup, data generation, debug tools |
site/ is plain static HTML with no build step:
site.The video embed and repo link are in site/index.html.
roms/ is gitignored.npm run setup, which clones it into vendor/. That disassembly isn't redistributed here, and vendor/ and src/data/generated.json are gitignored.LICENSE), because it builds on the GPL-licensed serverboy / GameBoy-Online emulator core.Made by Christian Mathiesen at Frigade.
23 commits
TypeScript
85.6%
HTML
11.7%
JavaScript
2.4%