explaingit

joonspk-research/generative_agents

Analysis updated 2026-05-18

21,251Audience · researcherComplexity · 4/5LicenseSetup · moderate

TLDR

A research simulation where AI agents with memories and routines live in a virtual town and interact like humans, powered by OpenAI's API.

Mindmap

mindmap
  root((repo))
    What it does
      AI agents in town
      Social behavior sim
      Memory and routines
    How it works
      Django web server
      Backend sim server
      OpenAI API calls
    Use cases
      Study agent behavior
      Create demos
      Research interactions
    Tech stack
      Python
      Django
      OpenAI API
    Getting started
      API key needed
      Run game steps
      Watch agents move
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run a multi-agent simulation to study how AI agents with memory and routines interact in a shared virtual environment.

USE CASE 2

Create shareable demo animations of agent behavior by saving and replaying simulation states.

USE CASE 3

Research emergent social dynamics and believable human-like interactions in a controlled sandbox town.

What is it built with?

PythonDjangoOpenAI API

How does it compare?

joonspk-research/generative_agentsautomaapp/automasamber/lo
Stars21,25121,27121,227
LanguageVueGo
Setup difficultymoderateeasyeasy
Complexity4/52/52/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires OpenAI API key and Django setup, simulation runtime depends on API quota and response times.

Use freely for any purpose including commercial. Keep the notice and disclose changes to the patent grant.

In plain English

Generative Agents is the research code that accompanies the academic paper "Generative Agents: Interactive Simulacra of Human Behavior." It is a working simulation of small computational characters, the project calls them generative agents, that try to act in believable, human-like ways inside a tiny virtual town named Smallville. You can watch them move around the map, go about routines, and interact with each other. The point is to study how language-model-driven agents can produce plausible social behavior over long stretches of simulated time. Under the hood the project is split into two pieces that run side by side. One is a frontend environment server, built as a Django web project, which renders the town map in your browser. The other is a backend simulation server, a Python program called reverie.py, which actually drives the agents' thinking and decisions by calling out to OpenAI's API. You start both servers, pick a starting scenario (for example, a three-agent setup with Isabella Rodriguez, Maria Lopez, and Klaus Mueller), tell it how many in-game steps to run, and then watch the agents act. Each step represents about ten seconds of in-game time. Simulations can be saved, resumed from a checkpoint, replayed step by step in the browser, or compressed into a tidier demo version with proper character sprites. This is a research artifact rather than a polished product. It needs an OpenAI API key, was tested on Python 3.9.12, and the authors warn that runs can get costly when many agents are involved. It is best suited for researchers, students, or builders who want to study or experiment with simulated AI-driven social behavior.

Copy-paste prompts

Prompt 1
How do I set up and run the Generative Agents simulation with my own OpenAI API key?
Prompt 2
Show me how to modify the starter agents (Isabella, Maria, Klaus) or add new agents to the Smallville simulation.
Prompt 3
How can I save a simulation state and replay it later, or export it as a demo animation?
Prompt 4
What does each game step represent in terms of in-game time, and how do I control the simulation duration?

Frequently asked questions

What is generative_agents?

A research simulation where AI agents with memories and routines live in a virtual town and interact like humans, powered by OpenAI's API.

What license does generative_agents use?

Use freely for any purpose including commercial. Keep the notice and disclose changes to the patent grant.

How hard is generative_agents to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is generative_agents for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub joonspk-research on gitmyhub

Verify against the repo before relying on details.