tool · draft
Generative Agents (Smallville)
Research code from Stanford for language-model characters that remember, reflect and plan, shown in Smallville, a small game town of 25 agents; a 2024 follow-up repository builds agents from interviews and survey answers and lets researchers put questions to them.
What is reusable: open sourcepartly open dataAPI unknownopen participation Apache-2.0The genagents repository ships a bank of over 3,000 agents seeded from General Social Survey demographics; the 1,000 interview-based agents are not public.
Generative agents are software characters driven by a large language model (LLM), the kind of model behind ChatGPT. Joon Sung Park, Joseph C. O'Brien, Carrie J. Cai, Meredith Ringel Morris, Percy Liang and Michael S. Bernstein described them in a 2023 paper presented at UIST '23, an ACM conference on user interfaces.1,2 Each agent keeps a running record of what it has seen, written in plain language.2 It periodically sums those memories up into higher-level reflections and draws on both to plan its day.2 In the paper's demonstration, 25 agents live in Smallville, a town styled after The Sims.2 Told only that one of them wants to throw a Valentine's Day party, the others spread invitations over two days, ask each other out and turn up at the right time.2
The code for that town is public on GitHub.1 It runs as two programs on your own machine: a Django web server that draws the map, and a Python simulation server that calls OpenAI's API.1 Each game step stands for ten seconds of town time.1 You can start from a three-agent or a 25-agent town, load your own histories for the characters, and replay a saved run in the browser.1 Renaming the characters or adding more than the map holds means editing the map in the Tiled map editor.1 The authors warn that runs could be costly, as of early 2023, and that the API can hang at its hourly rate limit.1 Nothing has been committed since August 2023, so it is a fixed research artefact, not a maintained tool.1
A second repository, genagents, followed in November 2024 from Stanford's HCI group.3 It turns the idea toward survey research: you build an agent from data about a person and ask it multiple-choice, numerical or open questions.3 The accompanying paper built agents for 1,052 Americans from two-hour interviews, from survey answers, or both.4 On held-out questions from the General Social Survey, a long-running US survey of attitudes, the agents reached 82 to 86 percent of the accuracy with which the same people repeated their own answers two weeks later, against 74 percent for agents given only demographics.4 Those agents are not public, for the participants' privacy.3 The README said the authors planned restricted research access.3 What ships is a bank of over 3,000 agents seeded from General Social Survey demographics, with fictional names and addresses, and one sample agent of an author.3
Both repositories are for studying the method, not for answering a town's planning question. Smallville has no real geography or population behind it, and the genagents bank reflects survey demographics rather than any particular place. The Smallville code is Apache-2.0 and genagents is MIT.1,3 Several of these authors went on to found Simile, a company selling simulations of this kind.5 Concordia and TinyTroupe are maintained libraries in the same family.
- form
- open-source research code
- group
- People and populations
- homepage
- https://github.com/joonspk-research/generative_agents
- licence
- Apache-2.0 (Smallville code); MIT (genagents)
- cost
- free code; runs need a paid OpenAI API key
does a similar job
-
Python library from Google DeepMind for building simulations in which language-model characters act and a "game master", borrowed from tabletop role-playing games, decides what their actions do.
open sourceopen participation
-
Experimental Python library from Microsoft that simulates people with set personalities, beliefs and jobs using a language model, for simulated focus groups, interviews and market surveys.
open sourceopen participation
alternative to
-
Python library from Google DeepMind for building simulations in which language-model characters act and a "game master", borrowed from tabletop role-playing games, decides what their actions do.
open sourceopen participation
-
Open-source Python package from Expected Parrot for running surveys and experiments on language models and simulated respondents with set traits, with tools to send the same survey to real people for comparison.
open sourceAPIopen participation
-
Experimental Python library from Microsoft that simulates people with set personalities, beliefs and jobs using a language model, for simulated focus groups, interviews and market surveys.
open sourceopen participation
used by
-
Company founded by the Stanford researchers behind generative agents that sells simulations of how customers, employees or populations would respond to a change, from models it says are trained on data about real people.
closed sourceclosed data
Tags: LLM agents, simulated people, social simulation, survey, Smallville, Stanford