π€ A simulation framework designed to study complex social dynamics using generative agents powered by LLMs
This repository contains a Generative Agent-Based Modeling (GABM) framework that integrates Large Language Models (LLMs) into agent-based simulations. It enables the study of emergent social behaviors in complex environments such as social networks, content virality, and opinion dynamics.
This framework adopts a modular, phase-based approach to simulate and analyze interactions within a social environment. The simulation workflow is divided into several phases, each contributing to the realistic modeling of agent interactions. Agents dynamically evolve within the simulated social network, making autonomous decisions based on memory, personality, and environmental feedback. More details can be found in our published papers cited below.

- Python: Core programming language (Python)
- PyAutogen: LLM-powered agent automation (PyAutogen)
- Pandas: Data manipulation and analysis (Pandas Documentation)
- ChromaDB: Vector database for memory management (ChromaDB Documentation)
- HuggingFace: Open-source provider of NLP technologies (HuggingFace Documentation)
- LM Studio: To download and run local open-source LLMs (LM Studio)
- LLM-Powered Generative Agents: Agents dynamically reason and adapt to the environment.
- RAG-Driven Responses: Combines powerful retrieval systems with generative models to provide different content recommendations to agents.
- Memory Mechanisms: Agents retain and prioritize past interactions.
- Emergent Social Phenomena: Agents naturally replicates real-world social phenomena.
If you use our framework in research, please cite our papers:
- [Jan 2025] "Agent-Based Modelling Meets Generative AI in Social Network Simulations", Paper
- [Feb 2025] "Can Generative Agent-Based Modeling Replicate the Friendship Paradox in Social Media Simulations?", Paper
Check out our LLM-Agents-For-Simulation repository, a collection of resources that showcase the intersection of simulation and LLM-agents!
This project was developed as part of PhD research at the University of Naples Federico II. Special thanks to my supervisor Professor Vincenzo Moscato and my co-tutor Valerio La Gatta for their invaluable contributions and support.
Please create an issue if something isn't working for you. We'll be happy to help.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.