An extensible multi-agent economic world simulation framework for simulating continuous decision-making, interactions, and emergent macro outcomes of large numbers of heterogeneous economic agents under dynamically evolving macro environments and institutional rules.
Core Goal: Observe how policies regulate resident consumption
./scripts/start.sh
python3 -m venv venv && source venv/bin/activatepip install -r requirements.txtpython3 scripts/init_db.pypython3 backend/app.pyhttp://localhost:5000./scripts/run_tests.sh
python3 examples/simple_simulation.py
cp config/config.yaml.example config/config.yaml
config/config.yaml and set your Ollama API key:
ollama:
api_key: "YOUR_API_KEY_HERE" # Replace with your actual Ollama API key
config.yaml are pre-configured and can be used as-ismodel field in ollama section sets the default LLM model (can be changed via frontend dropdown)Note: The config/config.yaml file is excluded from Git to protect your API key. Only config/config.yaml.example (template file) is tracked in the repository.
Percepta/
│
├── core/ # Layer 0: Simulation engine
├── world/ # World state and transitions
│ ├── state/ # Layer 1: World state components
│ └── transitions/ # Layer 5: State transitions
├── agents/ # Layer 2: Agents and state components
├── perception/ # Layer 3: LLM perception layer
├── decision/ # Layer 4: Decision models
├── metrics/ # Metrics and observations
├── backend/ # API service + database
├── frontend/ # Web interface
├── config/ # Configuration files
├── scripts/ # Utility scripts
├── tests/ # Test code
├── examples/ # Example code
└── docs/ # Documentation
For detailed structure, see PROJECT_STRUCTURE.md
✅ Core simulation engine
✅ World state component system
✅ Agent system (consumer)
✅ LLM perception integration (Ollama Cloud)
✅ PostgreSQL data storage
✅ Web frontend interface
✅ RESTful API
✅ Test framework
✅ Example code
✅ Complete documentation
Issues and Pull Requests are welcome!
MIT License