Multi-agent emotional simulation built on TinyTroupe — models how a family communicates across WeChat groups and private messages after a car accident in Xinjiang.
-
Data collection: Used Spider_XHS (Xiaohongshu crawler) to scrape real accident survivors' social media posts, organized into 10 topic buckets (surgery decisions, hospital transfer, family conflict, medical staff perspective, etc.) as reference corpus for NPC dialogue.
-
11 agents: Each character has an independent SKILL.md defining their WeChat speaking persona — word choice habits, emotional baseline, and information access level. Covers family members, doctors, volunteers, and colleagues.
-
11 WeChat worlds: 5 group chats + 6 DMs, 193 injection nodes spanning 3 days.
-
Turn-taking mechanism: All nodes are globally sorted by timestamp and executed sequentially. At each node's time point, the corresponding speaker's LLM generates 1-3 WeChat messages based on current conversation history and that agent's episodic memory. Generated messages are injected into all relevant agents' memories.
-
Information asymmetry: Volunteer agent Zhou Ning is instructed to introduce bias at 3 key points (omitting conditions, rewording). Neurosurgeon Li Min corrects the record in subsequent nodes, creating a realistic information asymmetry loop.
cd sim
# Edit config.ini to set your API key
vim config.ini
# Run all 11 channels
python run_all_worlds.py
# Run specific channels
python run_all_worlds.py --channels G_病情同步,DM_外公
# Run with custom label
python run_all_worlds.py --label test1Output goes to sim/runs/{timestamp}_{label}/.
- Python 3.13
- TinyTroupe 0.7.0 (local fork at
ref/persona/TinyTroupe-main/) - OpenAI SDK (compatible with DeepSeek or any OpenAI-like API)
├── sim/ # Simulation engine
│ ├── run_all_worlds.py # Entry point
│ ├── run_orchestrator.py # Scheduler (LLM dispatch, retry, output)
│ ├── world.py # WeChat World simulator
│ ├── npc_registry.py # NPC registry
│ ├── setup.py # World builder
│ ├── config.ini # LLM configuration
│ └── nodes/*.py # 193 injection node definitions
├── skills/ # 11 NPC SKILL.md persona files
├── character-cards/ # Character background cards
├── ref/ # TinyTroupe fork
├── reference-materials/ # Raw accident reference materials (10 topics)
├── Spider_XHS-master/ # Xiaohongshu scraper
└── outline-timeline.md # Scenario timeline
MIT