A lightweight system for turning event materials into structured graphs, agent populations, and inspectable social simulations.
MicroWorld starts from raw event material: 📄 documents, 🖼️ images, 🎥 videos, and 🕸️ graph-ready context. It builds an event graph, derives platform-facing agent profiles, runs a multi-agent discussion process, and keeps the intermediate artifacts available for inspection after the run!
🎯 Why MicroWorld? It is built for cases where the final report is not enough on its own. The project keeps the graph 📊, prompts 💬, simulation inputs 🎬, action traces 👣, memory states 🧠, and report outputs 📑 tied to the same run.
MicroWorld is organized around four key stages:
- 📥 Ingestion and graph build: Convert event materials into ontology, entities, and relations.
- ⚙️ Simulation preparation: Derive topic keywords, cluster topology, and generate platform profiles.
- 🏃♂️ Runtime execution: Run the topology-aware simulation with directional influence and lightweight memory.
- 📈 Reporting and inspection: Collect logs, traces, configs, and reports from the same run.
💡 Efficiency Boost: Removes redundant updates and cuts token usage sharply as workloads grow. Keeps the simulation trajectory closer to the reference trend than the baseline run! 📉
|
|
| Removes redundant updates and cuts token usage sharply as workloads grow. | Keeps the simulation trajectory closer to the reference trend than the baseline run. |
The public example uses the LK-99 room-temperature-superconductor news cycle. It is a good fit for the project because it contains:
- 🧩 Mixed evidence types, including long-form text and videos.
- 🎢 A clear shift from early excitement to later scrutiny.
- 🗣️ Visible changes in narrative focus, participants, and discussion structure.
git clone https://github.com/d2i-cuhksz/MicroWorld.git
cd MicroWorldRequired:
- 🐍 Python 3.11+
- ⚡
uv
Recommended for video inputs:
- 🎞️
ffmpeg - 🎞️
ffprobe
(If
ffmpegandffprobeare not on your PATH, setMULTIMODAL_FFMPEG_PATHandMULTIMODAL_FFPROBE_PATHin.env)
cp .env.example .envSet at least:
LLM_API_KEY=your_key
ZEP_API_KEY=your_keyCommon defaults:
LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
LLM_MODEL_NAME=qwen-plus
MULTIMODAL_AUDIO_API_KEY=
MULTIMODAL_AUDIO_BASE_URL=uv syncuv run microworld-api(The backend uses
FLASK_HOST,FLASK_PORT, andFLASK_DEBUGfrom the environment. The default backend port is 5001.)
cp configs/full_run/full_run.template.json /tmp/microworld-run.jsonMinimal example:
{
"project_name": "My MicroWorld Run",
"graph_name": "My MicroWorld Graph",
"simulation_requirement": "Build entities, relations, and a two-platform social simulation from the input materials.",
"files": [
"/abs/path/to/event.md",
"/abs/path/to/video.mp4"
],
"pipeline": {
"chunk_size": 500,
"chunk_overlap": 50,
"batch_size": 3
},
"simulation": {
"enable_twitter": true,
"enable_reddit": true
},
"report": {
"generate": false
}
}(You can also leave
filesempty and providefiles_from, with one local path per line.)
uv run microworld-full-run \
--config /abs/path/to/microworld-run.jsonTo avoid the interactive clustering choice:
uv run microworld-full-run \
--config /abs/path/to/microworld-run.json \
--cluster-method thresholdGenerated data is written under: 📁
data/generated/output/simulations/output/reports/runs/
| Command | Description |
|---|---|
uv run microworld-api |
🔌 Start the API backend |
uv run microworld-local-pipeline --config <path> |
🔄 Run the local pipeline |
uv run microworld-parallel-sim --config <path> |
🏃♂️ Run parallel simulation |
uv run microworld-full-run --config <path> |
🌍 Run the entire MicroWorld flow |
A typical run exposes artifacts from several stages:
- 🏗️ Project build: Extracted text, parsed multimodal content, source manifests, ontology output.
- 🎭 Simulation preparation: Entity prompts, graph snapshots, social relation graph, simulation config.
- 🎬 Runtime execution: Platform profiles, action logs, memory states, topology traces.
- 📊 Reporting: Report outline, full report, agent logs, console logs.
MicroWorld/
├── 📄 pyproject.toml
├── 📁 src/
│ └── 📁 microworld/
│ ├── 🔌 api/
│ ├── 📱 application/
│ ├── ⌨️ cli/
│ ├── ⚙️ config/
│ ├── 🧩 domain/
│ ├── 🕸️ graph/
│ ├── 📥 ingestion/
│ ├── 🏗️ infrastructure/
│ ├── 🧠 memory/
│ ├── 📊 reporting/
│ ├── 🏃 simulation/
│ ├── 💾 storage/
│ ├── 📡 telemetry/
│ └── 🛠️ tools/
├── 📁 configs/
│ ├── 🏃 full_run/
│ └── 🎬 simulation/
├── 📁 data/
│ └── 🏗️ generated/
├── 📁 docs/
└── 📁 tests/
Want to contribute or run tests?
uv sync --group dev
uv run pytestMicroWorld is built on top of prior open-source efforts. We would like to thank MiroFish and OASIS for making their work publicly available. Our project extends and adapts ideas and implementation foundations from these repositories for a lightweight, topology-aware, multi-modal social simulation workflow.
If this repository is useful for your work, please cite our project.
@article{xu2026topology,
title={Topology-Aware LLM-Driven Social Simulation: A Unified Framework for Efficient and Realistic Agent Dynamics},
author={Xu, Yuwei and Zhang, Shulun and Zhou, Yingli and Zeng, Shipei and Lakshmanan, Laks VS and Ma, Chenhao},
journal={arXiv preprint arXiv:2604.18011},
year={2026}
}MicroWorld is released under the GNU Affero General Public License v3.0.











