Inspiration
Agent simulations are usually closed worlds with scripted behavior and fake economies. We wanted a living society where every agent reasons over the world state and the economy connects to real products through Shopify.
What It Does
Agent Town is an interactive pixel world where agents work for businesses, become politicians, bankers, merchants, or farmers, start companies, trade shares, vote, gossip, and build or lose trust. Players can talk to anyone, take jobs, spread rumours, and use real Shopify products to buy, resell, and become entrepreneurs.
How We Built It
We kept the architecture simple: Python and FastAPI manage the world, economy, and rules, while WebSockets stream updates to a canvas frontend. Each agent periodically uses an LLM to choose an action, but the world validates every decision so nobody can invent money, products, or authority.
Challenges We Ran Into
Free models produced rate limits and incomplete responses, so we added model fallback and stricter structured outputs. Agents could negotiate great deals but sometimes failed to execute them because quantities, inventory, and ownership existed in different parts of the simulation.
Accomplishments That We're Proud Of
Every coin moves through one controlled transaction system, keeping the economy consistent across wages, stores, loans, farming, and investments. Most importantly, relationships matter: agents remember interactions, gain or lose trust, and change their decisions when rumours or conflicts spread.
What We Learned
Emergent behavior comes from strong mechanisms, not longer prompts. Agents became convincing when actions had real consequences—prices changed, debts mattered, inventory ran out, elections shifted power, and damaged trust affected future deals.
What's Next for Agent Town
We want to add persistence so memories, debts, businesses, trust, and shareholdings survive restarts. Next, we will expand entrepreneurship, political campaigns, dynamic Shopify commerce, player-owned businesses, and larger societies with evolving laws and economies.
Log in or sign up for Devpost to join the conversation.