AIVenture: Master Agent Development and Vibe Coding Through a Dungeon Game

Google's open-source dungeon game that teaches AI agent development and Vibe Coding through gameplay.
AIVenture is an open-source retro dungeon game from Google that embeds AI engineering concepts — including Vibe Coding, agentic workflows, and tool calling — into interactive game levels. Built with Angular, Phaser.js, and Gemma open-weight models, it supports both fully local (via Transformers.js or Ollama) and cloud-based (Gemini API) deployment, making it a practical, hands-on resource for developers learning generative AI application development.
When Learning AI Development Becomes a Dungeon Adventure
For developers, learning to build agentic workflows and practice Vibe Coding typically means wading through documentation and wrestling with abstract concepts. Google's team has a completely different answer: AIVenture — an open-source retro dungeon adventure game that doubles as a hands-on generative AI course for developers.
What makes this project clever is that it embeds otherwise opaque AI engineering concepts into playable, interactive game levels. Instead of passively reading tutorials, developers gradually understand how models generate code, reason autonomously, and call tools — all by actually playing through the game. On the technical side, AIVenture is built with Angular and Phaser.js, powered under the hood by Google's Gemma open-weight models.
Angular is Google's enterprise-grade front-end framework, known for strong typing (TypeScript), dependency injection, and modular architecture — well-suited for building complex single-page applications. Phaser.js is the most popular HTML5 2D game development framework, built on WebGL and Canvas rendering, offering a complete toolkit for game development including physics engines, animation systems, and asset management. In AIVenture, Angular handles the application framework and state management, while Phaser.js takes care of game scene rendering and interaction. The two are connected through an interface layer with Gemma's inference results, forming a dual-engine architecture of "game engine + AI inference."

Level One: Experience Vibe Coding Firsthand
The game's first section focuses on Vibe Coding — a development paradigm where you describe what you want in natural language and AI directly generates the application. The concept was formally introduced by OpenAI co-founder Andrej Karpathy in early 2025, representing an extreme form of human-AI collaborative programming: developers shift from "code authors" to "requirement describers" and "result validators," with code generation fully delegated to AI models. Against the backdrop of rapid adoption of AI coding tools like GitHub Copilot and Cursor, Vibe Coding is seen both as a revolutionary paradigm lowering the barrier to software development and as a source of widespread industry debate around code quality, security, and developer skill atrophy.
In this level, players encounter a "chicken NPC" and simply prompt it in natural language to build a web app. Behind the scenes, the Gemma model writes HTML, CSS, and JavaScript in real time, rendering the results into a local iframe to verify whether the generated content meets the constraints.
Gemma is a series of open-weight large language models released by Google DeepMind in 2024, built on the same research and technology as Gemini but made available to developers and researchers at a lighter parameter scale (2B, 7B, etc.). Unlike the fully closed-source GPT series, Gemma provides downloadable model weights, allowing developers to deploy, fine-tune, and integrate locally — making it an important option for privacy-sensitive scenarios, edge computing, and offline applications.
This design makes the complete loop of "prompt → generate → render and validate" tangible. Developers can intuitively see how a natural-language intent gets translated by a large model into runnable front-end code, with immediate feedback in the browser. Compared to abstract discussions of Vibe Coding principles, this "what you see is what you get" level design dramatically lowers the learning curve.
Level Two: Building an AI Agent That Reasons Autonomously
If the first level demonstrates "generation," the second demonstrates "autonomous decision-making" — the core of what makes an Agent capable.

As the game progresses, players encounter a puzzle they can't physically cross, requiring them to prompt the "robot NPC" and trigger an autonomous thinking loop.
This loop provides a complete demonstration of how agents work:
- Evaluate game state: The Gemma model first analyzes the current situation and understands the player's predicament;
- Execute tool calls: The model proactively calls specific tools to locate a hidden switch;
- Interact with the environment: By interacting with the Phaser.js game engine, it ultimately solves the puzzle.
This "perceive-plan-act" closed loop is exactly the core paradigm of agentic workflows. The tool-calling mechanism works like this: the model outputs a structured function-call request, the host program executes the corresponding operation and returns the result to the model, which then decides its next action. This concept was heavily promoted by AI researchers like Andrew Ng and has become the underlying logic of mainstream agent frameworks like LangChain, AutoGen, and Google ADK. Wrapping this abstract agentic workflow into the experience of "solving a dungeon puzzle" is a remarkably insightful approach to engineering education.
Key Highlight: Complete Flexibility in Model Deployment

The project team believes AIVenture's greatest value lies in this: you have complete flexibility in how you serve the model. For working developers, this matters even more than the game itself.
Fully Local, Zero Server Cost
Using Transformers.js, you can run the Gemma model entirely in the browser with zero ongoing server overhead. Transformers.js is a JavaScript library developed by Hugging Face that uses WebAssembly (WASM) and WebGPU to bring Transformer model inference — originally running on Python servers — into the browser environment. This means data stays entirely on the user's device, naturally complying with privacy regulations like GDPR, and the app can run offline once the model is loaded. That said, browser-side inference has its limits — the initial load requires downloading model files (typically hundreds of MB), and the model scale is constrained by client hardware.

Alternatively, you can connect to local models via tools like Ollama or LM Studio. For scenarios that prioritize data privacy, cost control, or offline operation, this local-first architecture is extremely attractive.
Switch to Cloud Scale with One Config Change
When your workload demands more compute, a single simple configuration change routes requests to the Gemini API or Google Cloud.
This seamless "develop locally, scale in the cloud" switch is exactly what modern AI application architecture aspires to — rapid iteration with local models during development to compress costs, then a smooth transition to the cloud for production to handle high concurrency.
Why Developers Should Pay Attention
From an engineering education perspective, AIVenture offers a rare, complete example: it integrates Vibe Coding, agentic reasoning, tool calling, and multiple model deployment approaches — all the hottest topics of the moment — into a single open-source project you can run, play, and read the source code of.
For developers looking to systematically build up their AI toolchain skills, the learning path is clear and highly practical:
- Intuitively understand core concepts through the game levels;
- Head to the GitHub repository to read the full source code;
- Dive deeper with the official developer solution documentation.
At a time when generative AI tutorials tend to skew heavily theoretical or depend heavily on closed-source cloud APIs, AIVenture's combination of "open-source + local-first + gamification" offers a more grounded path to learning agent development. It proves that learning cutting-edge AI engineering doesn't have to be dull — one dungeon adventure might be all it takes to add a complete set of agent development skills to your toolkit.
Key Takeaways
Related articles

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites—It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI—they're copying shared prompts or scraping others' work. Learn AI coding tools' real limits.

Getting Started with AI Agent Development: A Complete Guide from Concept to Practice
A comprehensive guide to AI Agent architecture and development, covering automated marketing, intelligent customer service, and investment analysis scenarios with single and multi-agent collaboration.

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites — It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI — they're copying shared prompts or scraping others' work.