SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.08691 · 2025

AgentSociety: Large-Scale Simulation of LLM-Driven Generative Agents Advances Understanding of Human Behaviors and Society

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2502.08691.json · badge: /api/ran/2502.08691.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
tsinghua-fib-lab/AgentSociety community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
agent_profile Ran
ran on a synthesized input
tsinghua-fib-lab/AgentSociety/packages/agentsociety/agentsociety/storage/model.py
code served (permissive licence) · get_code("4bdeaed1ea564bda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from sqlalchemy import TIMESTAMP, Boolean, Column, Float, Integer, MetaData, String, Table, JSON, UUID

def agent_profile(table_name: str):
    """Create agent profile table"""
    metadata = MetaData()
    return (Table(table_name, metadata, Column('id', Integer), Column('name', String), Column('profile', JSON)), ['id', 'name', 'profile'])

ARGS = {
    'table_name': 'agent_profiles'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sqlalchemy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
agent_status Ran
ran on a synthesized input
tsinghua-fib-lab/AgentSociety/packages/agentsociety/agentsociety/storage/model.py
code served (permissive licence) · get_code("5e91e55b1beb4792")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from sqlalchemy import TIMESTAMP, Boolean, Column, Float, Integer, MetaData, String, Table, JSON, UUID

def agent_status(table_name: str):
    """Create agent status table"""
    metadata = MetaData()
    return (Table(table_name, metadata, Column('id', Integer), Column('day', Integer), Column('t', Float), Column('lng', Float, nullable=True), Column('lat', Float, nullable=True), Column('parent_id', Integer), Column('action', String), Column('status', JSON), Column('created_at', TIMESTAMP(timezone=True))), ['id', 'day', 't', 'lng', 'lat', 'parent_id', 'action', 'status', 'created_at'])

ARGS = {
    'table_name': 'agent_status_test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sqlalchemy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
agent_survey Ran
ran on a synthesized input
tsinghua-fib-lab/AgentSociety/packages/agentsociety/agentsociety/storage/model.py
code served (permissive licence) · get_code("dda0baaf291d7301")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import uuid
from uuid import UUID

def agent_survey(table_name: str):
    """Create agent survey table"""
    from sqlalchemy import TIMESTAMP, Boolean, Column, Float, Integer, MetaData, String, Table, JSON, UUID as SQLA_UUID
    
    metadata = MetaData()
    return (Table(table_name, metadata, Column('id', Integer), Column('day', Integer), Column('t', Float), Column('survey_id', SQLA_UUID), Column('result', JSON), Column('created_at', TIMESTAMP(timezone=True))), ['id', 'day', 't', 'survey_id', 'result', 'created_at'])


ARGS = {
    'table_name': 'agent_survey_test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sqlalchemy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
main Ran
ran on a synthesized input
tsinghua-fib-lab/AgentSociety/extension/runtime/agentsociety/bin/ags.py
code served (permissive licence) · get_code("90fa4d60b1313975")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import os
import subprocess
import sys
from pathlib import Path
from unittest.mock import MagicMock, patch

# Setup: minimal valid arguments for main()
def setup_args():
    # The function main() takes one parameter: argv
    # argv is list[str] | None
    # When None, it uses sys.argv[1:]
    # When list[str], it parses those directly
    
    # Test case 1: Simple call with a valid tool and no extra args
    argv_simple = ['run-experiment']
    
    # Test case 2: Call with workspace override
    argv_with_workspace = ['run-experiment', '--workspace', '/tmp/workspace', '--config', 'test.yaml']
    
    # Test case 3: Call with no tool (should print help)
    argv_no_tool = []
    
    # Test case 4: Call with unknown tool (should error)
    argv_unknown = ['unknown-tool']
    
    # We'll use a minimal setup that won't fail on missing script files
    # by mocking the subprocess.run call
    
    # For the actual ARGS dict, we provide the simplest valid input:
    # argv=None will use sys.argv[1:], so we need to mock that
    # OR we can provide an empty list which triggers the help output
    
    return argv_simple

# Mock dotenv_values since it's conditionally imported in the original code
import sys
from unittest.mock import MagicMock

# Create a stand-in for dotenv_values
def mock_dotenv_values(path):
    return {}

# Inject mock into the module namespace
sys.modules['dotenv'] = MagicMock()

# Now define ARGS with a valid argv parameter
ARGS = {
    'argv': []  # Empty argv triggers help printing (returns 0)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Understanding human behavior and society is a central focus in social sciences, with the rise of generative social science marking a significant paradigmatic shift. By leveraging bottom-up simulations, it replaces costly and logistically challenging traditional experiments with scalable, replicable, and systematic computational approaches for studying complex social dynamics. Recent advances in large language models (LLMs) have further transformed this research paradigm, enabling the creation of human-like generative social agents and realistic simulacra of society. In this paper, we propose AgentSociety, a large-scale social simulator that integrates LLM-driven agents, a realistic societal environment, and a powerful large-scale simulation engine. Based on the proposed simulator, we generate social lives for over 10k agents, simulating their 5 million interactions both among agents and between agents and their environment. Furthermore, we explore the potential of AgentSociety as a testbed for computational social experiments, focusing on five key social issues: polarization, the spread of inflammatory messages, the effects of universal basic income policies, the impact of external shocks such as hurricanes, and urban sustainability. These five issues serve as valuable cases for assessing AgentSociety's support for typical research methods -- such as surveys, interviews, and interventions -- as well as for investigating the patterns, causes, and underlying mechanisms of social issues. The alignment between AgentSociety's outcomes and real-world experimental results not only demonstrates its ability to capture human behaviors and their underlying mechanisms, but also underscores its potential as an important platform for social scientists and policymakers.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2502.08691")
get_code_for_paper("2502.08691")
have("2502.08691")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2502.08691.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2502.08691.svg)](https://syntology.ai/paper/2502.08691)

Connect an agent — have() is free.