a16z-infra/ai-town
A MIT-licensed, deployable starter kit for building and customizing your own version of AI town - a virtual town where AI characters live, chat and socialize.
What it solves
AI Town is a deployable starter kit for creating virtual towns populated by AI characters who can live, chat, and socialize. It provides a foundation for developers to build scalable, multi-player simulations of human-like behavior, moving away from Python-based simulators to a JS/TS framework.
How it works
The project uses a simulation engine and a backend that supports shared global state and transactions. It integrates with Large Language Models (LLMs) via providers like Ollama (for local inference), OpenAI, or Together.ai to power character interactions. The environment is rendered using PixiJS, and the world state is managed via Convex, which handles the database and vector search for character memories.
Who it’s for
It is designed for developers who want to build AI-driven social simulations, multi-player games, or interactive virtual worlds using TypeScript and JavaScript.
Highlights
- Flexible LLM Integration: Supports local inference via Ollama as well as cloud APIs like OpenAI and Together.ai.
- Customizable World: Allows users to define their own characters, stories, and map environments using Tiled JSON exports.
- Full-Stack Starter Kit: Includes a complete stack featuring Convex for the backend/database and PixiJS for the frontend rendering.
- Dynamic Audio: Optional integration with Replicate's MusicGen for daily background music generation.
Related
- Project
- Project
- Project
- Project