CMASE (Computational Multi-Agent Society Experiment) is a research framework for studying the emergence and evolution of social structures, identities, and trust dynamics in generative multi-agent systems. The framework integrates generative agents, virtual ethnography, and reproducible experimental workflows, supporting both qualitative and computational analysis.
In response to the growing complexity of human–AI interaction and the demand for socially capable agents, CMASE introduces a researcher-as-participant paradigm. Human researchers embed themselves within a generative agent society to conduct immersive observation, participatory intervention, and cultural event triggering. This approach enables the study of language practices, power relations, trust mechanisms, and institutional emergence in virtual social fields.
CMASE supports configurable experimental environments and outputs both raw logs and structured data designed for virtual ethnographic analysis.
# Clone the repository
git clone https://github.com/armihia/cmase.git
cd cmase
# Install dependencies
pip install -r requirements.txtBefore running CMASE, you must configure your LLM settings. Open BaseLLM.py and update your keys and URLs in the LLM class:
class LLM:
def __init__(self):
self.api_version = "2024-12-01-preview"
self.openai_api_pool = [
{
"openai_api_4o": "Your API Key",
"azure_endpoint_4o": "Your Azure Endpoint"
}
]
self.ollama_server_url = "Your Ollama Url"
self.third_party_url = "Your Third Party LLM Url"
self.third_party_api = "Your Third Party LLM API Key"You must also build a map before running a simulation. Use the provided script:
python build_map_demo.pyA video demonstration of the environment setup is shown below:
29205072825-1-192.mp4
After building the map, you can start a demo simulation:
python start_demo.pyA video demonstration of the simulation execution is shown below:
29725690766-1-192.mp4
If you use CMASE in your research, please cite the project or related paper:
@article{zhang2025evolving,
title={Evolving Collective Cognition in Human-Agent Hybrid Societies: How Agents Form Stances and Boundaries},
author={Zhang, Hanzhong and Huang, Muhua and Wang, Jindong},
journal={arXiv preprint arXiv:2508.17366},
year={2025}
}Author: Hanzhong Zhang
Email: armihia@foxmail.com