AgentSociety: The AI-Powered Social Sandbox Redefining Human Behavior Simulation

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

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

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.

- 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.

- "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

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

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