Multi-Agent Society Simulator with economics — the first open-source AI civilization engine.
Project description
Maxim — Multi-Agent Society Simulator with Economics
The first open-source AI civilization engine with a working economy.
Agents don't just chat — they work, earn, spend, trade, marry, have children, age, and die. Run 100 years of civilization history in 30 minutes. Watch economies boom and crash, alliances form and break, and cultures emerge from nothing but a handful of AI agents and a set of rules.
Maxim = Multi-Agent Society: Interaction, eXchange & Multi-economy Modeler
Quick Start
pip install -e .
maxim run examples/village.yaml --no-llm # Rules-only (instant, free)
maxim run examples/village.yaml # With DeepSeek LLM (richer narrative, ~$0.40)
Requires DEEPSEEK_API_KEY in environment for LLM mode.
What Makes Maxim Different
| Feature | Stanford Generative Agents | AI Town (a16z) | Project Sid | Maxim |
|---|---|---|---|---|
| Working economy | No | No | Emergent roles only | Supply/demand market, wages, tax, GDP, Gini |
| Scale | 25 agents | ~10 agents | 500-1000 | 12+ (designed for 100+) |
| Lifecycle | Static | Static | Static | Birth, aging, marriage, death, inheritance |
| Cost per run | $$$$ | $$ | $$$$ | ~$0.40 for 100 years |
| Open source | Research artifact | MIT demo | Partial | Apache-2.0, pip-installable |
Architecture
Agent Needs (Maslow) → Rule-based intention selection (zero LLM cost)
↓
Game Master (LLM) → Arbitrates all intentions per tick (1 DeepSeek call)
↓
Economy Engine → Production, market clearing, wages, tax (pure math)
↓
Social System → Relationships, marriage, births, deaths, teaching
↓
Chronicle → Auto-detect milestones, export JSON for visualization
Key Design Decisions
-
Needs-driven behavior: Agents have Maslow hierarchy (survival → safety → belonging → esteem → actualization). Wealth and relationships feed back into needs. Behavior emerges from needs, not from prompts.
-
GM pattern (inspired by Concordia): One LLM call per tick arbitrates all agent intentions together. The GM considers traits, skills, economic constraints, and recent history. This keeps LLM costs at ~$0.40 per 100-year run.
-
Real economy: Supply/demand pricing, labor market, property, tax, treasury. GDP and Gini coefficient are calculated each tick. Economic crises and booms emerge naturally.
-
Full lifecycle: Agents age, marry (based on mutual affinity), have children (who inherit traits and grow up to work), and die (with wealth inheritance). The village is a living system.
Scenario Format
Scenarios are YAML files defining the initial world state:
name: "Willowbrook Village"
duration_years: 100
initial_currency: 150.0
tax_rate: 0.05
agents:
- id: farmer_li
name: "Li Wei"
age: 25
traits: [hardworking, cautious, kind]
occupation: farmer
skills: {farming: 0.7, cooking: 0.3}
# ... more agents
goods:
- name: food
base_price: 5
producers: [farmer, hunter]
# ... more goods
See examples/village.yaml for a complete 12-agent village.
CLI
maxim run <scenario.yaml> # Full simulation with LLM
maxim run <scenario.yaml> --no-llm # Rules only (fast, free)
maxim run <scenario.yaml> --export out.json # Export chronicle
maxim run <scenario.yaml> --quiet # Minimal output
maxim run <scenario.yaml> --verbose # Debug logs
Output
Each run produces:
- Terminal UI: Rich tables showing agent status, economy, milestones
- Chronicle JSON: Full event log, snapshots, GDP history (for visualization)
- Milestone detection: First trade, first marriage, population milestones, economic crises
- Web Dashboard: Interactive civilization dashboard with social graph, economy charts, and timeline playback
Dashboard
maxim dashboard chronicle.json # Open in browser
maxim run village.yaml --export out.json && maxim dashboard out.json
The dashboard shows:
- Social network (force-directed graph: node size = wealth, color = occupation, pink = marriage)
- Economy charts (GDP + Gini dual-axis, population over time)
- Citizen cards (click to see Maslow needs radar)
- Event feed + milestones
- Time slider with playback controls (1×/2×/4×)
Cost
| Mode | Cost | Speed | Quality |
|---|---|---|---|
--no-llm |
Free | <1 second | Deterministic, less narrative |
| Default (DeepSeek) | ~$0.40 / 100 years | ~10-15 minutes | Rich narrative, emergent drama |
Roadmap
- Dashboard: Web UI with social graph, economy charts, timeline
- Governance: Voting, laws, community resource allocation
- Variable speed: 1sec=1day to 1sec=1year
- Templates: Coffee town, campus, design studio presets
- Ome integration: Swap rule-based agents for full Ome instances
- SOAP integration: Agents in 3D spatial environments
Part of Omnity
Maxim is Layer 4 of the Omnity stack:
SOAP (spatial protocol) → Mindos (brain) → Ome (individual agent) → Maxim (society) → OmeTown (world)
License
Apache-2.0 — same as the Omnity monorepo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omnity_maxim-0.1.1-py3-none-any.whl.
File metadata
- Download URL: omnity_maxim-0.1.1-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63914b903335c08a4ad54f64f7a5312e1c9b99f2f0dc54228c7b2e37a0c68e2f
|
|
| MD5 |
bd8dcf8d197862de39fd6b7ed69adb1e
|
|
| BLAKE2b-256 |
7299b0e94f3ce6566b06b2896a63e59621be6a34214a71718d200b0501db9710
|