GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
UIST 2023

Generative Agents: Interactive Simulacra of Human Behavior

Twenty-five simulated townspeople with a memory stream, reflection and plans. The retrieval score behind them, recency plus importance plus relevance, became the template for agent memory.

Breakdown by FDE Interviews · 13 min read · Updated

About the original · 2023
AUTHORS
Park, O'Brien, Cai, Morris, Liang, Bernstein
FROM
Stanford University, Google Research, Google DeepMind
PUBLISHED
Apr 2023 · UIST 2023
CITED BY
6,019Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 22% of this breakdown.

01

The paper in one minute

Joon Sung Park, Michael Bernstein, Percy Liang and colleagues at Stanford and Google built Smallville, a small town in a sprite-based sandbox populated by 25 agents, each described by a paragraph of identity and relationships, all driven by gpt-3.5-turbo. Users can watch them, talk to them, or change their environment. The paper, presented at UIST 2023, is about the architecture that keeps those agents coherent over days, not just over a single reply.

The center is the memory stream: every observation an agent makes ("Isabella is setting out pastries", "the desk is unoccupied") is stored as a natural-language record with a timestamp. To decide what to put in the prompt, the agent retrieves memories by scoring each one on three things: recency, an exponential decay of 0.995 per game hour since the memory was last used; importance, a 1 to 10 poignancy rating the model assigns when the memory is created (brushing teeth is a 1, a breakup a 10); and relevance, the cosine similarity of the memory's embedding to the current query. Each component is scaled to the range 0 to 1 across candidates and the three are added with equal weight.

Two further mechanisms make the agents seem to think. Reflection runs when the summed importance of recent events passes 150, about two or three times a day: the model reads the 100 most recent memories, asks itself the three most salient questions it could answer, retrieves evidence for each, and writes five insights, with citations to the memories behind them, back into the stream. Reflections can build on other reflections, forming trees. Planning writes a day's agenda in five to eight broad chunks, then decomposes it into hour-long and then 5 to 15 minute actions, also stored in the stream, and re-plans when something happens.

In an evaluation, 100 people ranked agents' answers to interview questions for believability; the full architecture won, and removing reflection, then planning, then memory each made agents less believable. In the two-day simulation, news of a mayoral candidacy and a Valentine's Day party spread through conversations, relationships formed, and five agents turned up at the party.

THE IDEA, VISUALLY
MEMORY STREAM, RETRIEVAL, REFLECTION, PLANNING Perceive observations Memory stream text + timestamps Act plan → action Retrieve top-scoring memories Reflect importance > 150 reflections and plans are written back into the stream RETRIEVAL SCORE (ALL WEIGHTS 1) recency 0.995 ^ game hours since last access importance model's 1-10 poignancy, set once relevance cosine(memory, query) embeddings each min-max scaled to [0, 1] over the candidates, then summed Raw decay is slow (0.887 after a day), but min-max scaling stretches whatever range exists to [0, 1]: the oldest candidate always scores 0. With equal weights, a dramatic but unrelated memory can outrank the on-topic one (see Try it yourself). Built on gpt-3.5-turbo; 25 agents for two game days cost thousands of dollars in tokens and several days to run. BELIEVABILITY, 100 EVALUATORS (TRUESKILL) Full architecture 29.89 No reflection 26.88 No reflection, no planning 25.64 Crowdworker-written 22.95 No memory, reflection, planning 21.21 bars start at 18 · each rating ± about 0.7 WHAT EMERGED IN SMALLVILLE (25 AGENTS, 2 DAYS) knew of Sam's mayoral run 1 → 8 agents (4% → 32%) knew of Isabella's party 1 → 13 agents (4% → 52%) relationship network density 0.167 → 0.74 invited agents who came 5 of 12 hallucinated claims about others 6 of 453 answers (1.3%) Ablations reused the full agent's memories instead of re-simulating; evaluators ranked one question per category.
Generative agents keep every observation in a memory stream, retrieve by a weighted sum of recency, importance and relevance, periodically write reflections, and plan their days top-down. Each component raised believability in a human ranking study, and the town produced invitations, gossip and a party nobody scripted.
Research notes: the problem, approach and results
29.89 vs 21.21

TrueSkill believability of the full architecture against no memory, reflection or planning

4% → 52%

agents who knew about Isabella's Valentine's Day party, from 1 to 13 of 25, with no user intervention

150

summed importance of recent events that triggers a reflection; agents reflected two or three times a day

THE PROBLEM

Language models can produce a plausible response for a moment, but a character built on them forgets what it did an hour ago, eats lunch three times, and cannot draw conclusions from its own experience. Believable behavior over days needs memory and planning.

THE IDEA

Store every observation as a timestamped sentence in a memory stream. Retrieve by recency, model-rated importance and embedding relevance. When enough important things happen, reflect: ask what can be concluded and store the answers. Plan the day in broad strokes, then refine to minutes.

THE RESULT

In a ranking study with 100 people, the full architecture was judged most believable and each removed component lowered the rating. In a two-day simulation of 25 agents, a party invitation spread from one agent to 13 and 5 of 12 invitees showed up.

02

Why it matters to an FDE

You are unlikely to build a simulated town for a customer. You will build assistants and agents that remember interactions, and this paper's three-part retrieval score and its reflection step are the patterns most memory systems still use.

Retrieval is more than similarity. Recency and importance matter for memory in a way they do not for document search. A support agent should weigh last week's escalation above a routine ticket from last year, even when both match the query.

The weights decide behavior. Equal weights after min-max scaling can let a dramatic but irrelevant memory crowd out the relevant one. Our simulation below shows how easily it happens. Tune the weights on the customer's own questions.

Reflection is summarization with provenance. Writing conclusions back into memory, with references to the observations behind them, is a good way to keep long histories usable. Keep the citations so conclusions can be checked and corrected.

Cost scales with every agent and every step. Twenty-five agents for two game days cost thousands of dollars in tokens and took days to run. Budget memory operations per user before promising "remembers everything".

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The architecture's parts, the evaluation design, the emergent behavior, and misreadings to avoid

    Free account
  2. 04How it works

    The memory record, the scoring formula, the reflection and planning prompts, and the sandbox loop

    Premium
  3. 05The numbers that matter

    The ranking study, the emergent measures, the failure modes and the cost

    Premium
  4. 06Try it yourself

    The retrieval score on a synthetic memory stream: decay, scaling, weights, reflections

    Premium
  5. 07Where it breaks

    The limits the authors report and the ones in the evaluation design

    Premium
  6. 08Using it on a deployment

    Applying memory streams, scored retrieval and reflection to a customer assistant

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →