What is this?
AI Town is an MIT-licensed starter kit for building a virtual town where AI characters live, chat, and socialize with each other.
Is this a ready product or a kit I customize?
It is a deployable starter kit meant to be forked and customized — you edit character data, maps, and background music rather than just running it as-is.
How do I get it running?
The two main steps are building and deploying it on top of Convex (the backend), then connecting it to an LLM. You can run it with a standard Convex cloud account, via Docker Compose with self-hosted Convex, a community one-click Pinokio install, or deploy to Fly.io.
Do I need an LLM API key to run it?
By default it uses Ollama for fully local inference with no key needed, but you can instead use OpenAI, Together.ai, or any other OpenAI-compatible API by setting the respective API key environment variable.
Any install pitfalls I should know about?
If you change the LLM provider or embedding model later, you must wipe your existing data since memory embeddings depend on matching vector dimensions. Also the simulation auto-pauses after 5 minutes if the browser window is idle.
Does it run on Windows too?
Yes, but Windows users need WSL2 with Ubuntu, plus NVM/Node 18 and Python installed inside WSL before following the standard setup steps.
Can I run a local LLM entirely offline?
Yes, Ollama is the default LLM backend, letting the whole simulation run locally with models like llama3 pulled via ollama pull llama3.
How do I customize the characters and map?
Character descriptions and spritesheet references live in characters.ts, and the town map can be built in Tiled, exported as JSON, and converted with the included convertMap.js script.
Can it generate background music?
Yes, optionally via Replicate — you set a REPLICATE_API_TOKEN and the app generates new background music periodically via a cron job defined in convex/crons.ts.
What rendering library powers the town view?
The visual simulation is rendered using PixiJS, with tilesheet and character sprite assets credited to several artists in the README.
What are similar projects?
sim, ruflo, open-intelligent-ui, doop, trueforge, NextChat, mike, LibreChat
Which topics is it in?
starter-kit, canvas, simulation, local-llm, chatbot, ollama, docker-compose, cloud, openai, react, npm, server