ai-town
VerifiedAn open-source starter kit for building interactive AI agent towns.
What is ai-town?
AI Town creates a pixel-art virtual town populated by autonomous AI agents that chat, move, and build relationships over time. It draws from generative agent research to provide a ready-to-extend platform with built-in game engine, database, and vector search capabilities.
The system runs a continuous simulation engine on Convex while rendering interactions via PixiJS. Users connect their choice of LLM for agent dialogue and can customize world layout, character personalities, and behaviors through code edits.
It targets hobbyists, researchers, and indie developers who want a JavaScript-based foundation for multi-agent simulations rather than starting from scratch in Python frameworks.
Capabilities
What you can build with ai-town
Research prototyping
Test generative agent behaviors and social dynamics in a controlled, visual environment.
Game development experiments
Build small-scale multiplayer worlds with persistent AI NPCs that react to player actions.
Educational demos
Showcase how LLMs can drive believable character interactions for workshops or portfolios.
Install ai-town
git clone https://github.com/a16z-infra/ai-town.git && npm installgit clone https://github.com/a16z-infra/ai-town.git
cd ai-town
npm install- 1Clone the repository with git and run npm install to set up dependencies.
- 2Log into a Convex account when prompted during the initial setup.
- 3Start the app using npm run dev to launch both frontend and backend.
- 4Connect an LLM such as Ollama or OpenAI by editing the configuration files.
- 5Open http://localhost:5173 in a browser to view and interact with the running town.
Works with
ai-town: pros & cons
Pros
- +Strong backend foundation with transactions and global state via Convex
- +Flexible LLM support including local Ollama and cloud providers
- +JavaScript stack lowers barrier for web developers compared to Python simulators
- +Includes Docker and Fly.io deployment options for quick hosting
Cons
- –Requires Convex account for easiest cloud deployment path
- –Pixel art and music assets are limited to provided tilesets
- –Windows users need extra prerequisites before running
Frequently asked questions
Convex handles the game engine, database, and vector search for agent state.
User reviews
Verified reviews from the community shape this listing's rating.
Loading reviews…