A lightweight system for turning event materials into structured graphs, agent populations, and inspectable social simulations.
Project Site Β· Architecture Β· User Guide Β· Examples
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.











