Imagine a bustling virtual city where thousands of AI agents live, work, argue, and even vent their frustrations on social media, mirroring the complexities of human behavior.
Welcome to AgentSociety, the world’s first social simulation engine driven by large language model (LLM) agents, designed to revolutionize social science research. Built on sociological first principles, this framework creates a dynamic “sandbox” where bots think, survive, and occasionally lose their cool — just like humans.
A Living, Breathing Virtual Society
AgentSociety places over 10,000 AI agents in a meticulously crafted virtual urban environment. These agents don’t just exist—they engage in daily routines, hold jobs, navigate relationships, and even bicker in simulated social media comment threads. Powered by advanced LLMs, the framework emulates human-like decision-making and interactions, enabling researchers to observe emergent social behaviors in a controlled setting.
Unlike traditional simulations, AgentSociety’s agents operate in a world grounded in real-world data, including OpenStreetMap city layouts, economic systems with taxes and banks, and moderated social media platforms where bots face the same challenges and frustrations as humans.[](https://github.com/tsinghua-fib-lab/AgentSociety)
The framework’s scalability is staggering. It can handle up to 30,000 agents simultaneously, processing over 5 million interactions faster than real-time. This allows researchers to simulate complex societal dynamics at an unprecedented scale, offering insights that would take years and millions of dollars to achieve through offline experiments.
Human Psychology, Layered and Real
At the heart of AgentSociety lies a sophisticated cognitive architecture inspired by Maslow’s hierarchy of needs. Each agent is endowed with a three-layered psychological model encompassing emotions, needs, and aspirations. From basic survival concerns like “where’s my next meal?” to higher-level pursuits like self-actualization, these agents exhibit nuanced behaviors driven by their “human-like minds.”
The integration of LLMs enables natural language understanding, context-aware reasoning, and adaptive behaviors, allowing agents to engage in realistic dialogue and make decisions informed by their environment and past experiences.
Agents are divided into two primary types: Citizen Agents, who have homes, workplaces, and personal attributes, and Institution Agents, representing entities like businesses or government bodies. These agents interact within a spatial urban environment, participating in economic activities such as employment, spending, and wealth accumulation. Their memory systems — comprising static profiles for persistent traits and stream memory for episodic experiences—enable them to learn from past interactions and adapt to changing circumstances.
Replicating Real-World Phenomena
AgentSociety has already demonstrated its power by replicating and validating findings from real-world field studies, offering a cost-effective alternative to traditional research.
The framework has successfully simulated:
- Political Polarization: Experiments on immigration and gun control policies revealed how echo chambers amplify polarization (52% of agents developed more extreme views) while exposure to opposing viewpoints reduced ideological divides (89% shifted toward moderation).
- Spread of Hate Content: The framework modeled how toxic narratives propagate through social networks, mirroring real-world dynamics.
- Universal Basic Income (UBI): Simulations explored the societal impacts of UBI, confirming hypotheses about economic behavior and social stability.
- Human Behavior During Hurricanes: AgentSociety accurately captured how individuals respond to crises, from panic to cooperation.
These experiments, which would cost millions and span years in the real world, were conducted efficiently within the virtual sandbox, providing actionable insights for policymakers and researchers.
Also read:
- "Alien: Earth" Emerges as a Masterpiece, Scoring 90% on Rotten Tomatoes
- The Internet Runs on… Lava Lamps — And It’s No Joke
- Instagram’s Game-Changing Analytics Updates for Data-Driven Creators
A Playground for Social Scientists and Product Teams
AgentSociety’s modular design makes it a versatile tool for both social scientists and product teams. Its AgentToolbox equips agents with capabilities like environment sensing, message handling, and LLM-driven reasoning, while the framework’s Block system allows researchers to customize behaviors by combining pre-built or custom components.
The integration of real-world data — such as city maps, economic systems, and moderated social media — ensures that simulations reflect the complexities of human society.
For policymakers, AgentSociety offers a low-risk environment to “play out” reforms before implementing them in the real world. Product teams can use it to test user behaviors, model market dynamics, or simulate the impact of new features in virtual social networks.
The framework’s compatibility with various LLMs (e.g., OpenAI, Qwen, Deepseek) and its open-source nature under the Apache License 2.0 make it accessible and adaptable for diverse applications.
Why It Matters
AgentSociety represents a paradigm shift in social science research, moving from static, lab-based studies to dynamic, large-scale simulations.
By combining sociological rigor with cutting-edge AI, it offers a powerful platform for understanding human behavior and societal dynamics. Whether it’s testing the societal impact of a new policy, analyzing the spread of misinformation, or exploring economic interventions, AgentSociety provides a scalable, cost-effective, and realistic testing ground.
In a world where real-world experiments are costly and fraught with risks, AgentSociety’s AI-driven sandbox empowers researchers and innovators to explore, iterate, and refine solutions without burning their hands. As the framework continues to evolve — Version 1.3.0 was recently released with new features—it’s poised to become an indispensable tool for shaping a better understanding of human society.[](https://agentsociety.readthedocs.io/en/latest/)
For more details, check out the AgentSociety documentation or explore the code and examples on GitHub

