Skip to content
ai-town logo

ai-town

Verified

An open-source starter kit for building interactive AI agent towns.

Autonomous AgentsAgent Frameworks 10.0kOpen source
View on GitHub
Updated 2026-06-15
ai-town GitHub repository

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

simulate ai characters socializing
run multi-agent interactions
integrate llms like ollama or openai
provide shared state and simulation engine
customize ai town worlds

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

Install
git clone https://github.com/a16z-infra/ai-town.git && npm install
Quick start
git clone https://github.com/a16z-infra/ai-town.git
cd ai-town
npm install
  1. 1Clone the repository with git and run npm install to set up dependencies.
  2. 2Log into a Convex account when prompted during the initial setup.
  3. 3Start the app using npm run dev to launch both frontend and backend.
  4. 4Connect an LLM such as Ollama or OpenAI by editing the configuration files.
  5. 5Open http://localhost:5173 in a browser to view and interact with the running town.

Works with

ConvexOllamaOpenAI APITogether.ai

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
Did you find this helpful?

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…

Sign in to review

Promote ai-town

Add this badge to your website, or share the tool.

DFeatured on Dhanasviai-town 1