Paper Breakdowns  /  Generative Agents
Paper 40~8 min readStanford / Google · 2023
Paper Breakdown

Generative Agents,
explained.

Twenty-five AI characters were placed in a pixel-art town with homes, a café, a bar, and one seeded idea: Isabella wants to throw a Valentine's Day party. Two simulated days later, invitations had spread through gossip, someone had asked someone on a date, and five agents walked into the café at the right hour. Nobody scripted any of it. The paper behind "Smallville" is really a paper about one question: what does it take for an LLM to stay in character for a lifetime?

Written breakdown
This one is a written deep-dive.
Paper, mechanism, worked math and a runnable version — all below ↓
01

Chatbots forget; characters can't

An LLM can play a barista for ten minutes. But a believable character has to remember Tuesday's conversation on Friday, hold opinions that build over weeks, keep a daily routine, and react when life interrupts it — all far beyond what fits in a context window. Stuff the raw history in and it overflows; summarize it and the texture of a life vanishes.

The authors' framing predates the agents boom and still cuts deepest: believability isn't a model property, it's an architecture property. The paper's three mechanisms — memory, reflection, planning — are the minimum machinery of a persistent self.

02

The memory stream: a life, logged

Everything an agent perceives becomes a timestamped natural-language record in its memory stream: "Isabella is decorating the café," "Klaus said he's researching gentrification," "the stove is on fire." Thousands of entries accumulate — a complete experiential log, none of it in context by default.

The stream is deliberately raw and complete. No premature summarization, no discarding — because the architecture's other two mechanisms (retrieval and reflection) decide later what matters. Storage is cheap; judgment is deferred to the moment it's needed.

03

Retrieval: recency × importance × relevance

At each decision, the agent pulls the handful of memories that should shape it, scored by a weighted sum of three signals:

Which memories surface
Recency
exponential decay since last access
+
Importance
LLM-rated 1–10 at write time
+
Relevance
embedding match to now
Top-k into context

The importance score is the quietly brilliant one: at write time, the LLM rates how notable the event is ("ate breakfast" = 1, "broke up with partner" = 9), so momentous memories keep surfacing months later while noise sinks. The triple — recency, importance, relevance — has since become the standard scoring recipe in agent memory systems.

Concretely, each memory's retrieval score is just the sum of the three normalized signals:

Because importance is fixed high for big events, a 3-day-old breakup still outscores this morning's breakfast — while a query about someone's work pulls the relevant memory to the top. The runnable version below shows exactly that flip.

04

Reflection: from events to beliefs

Raw observations alone make a diarist, not a person. Periodically — when recent importance accumulates past a threshold — the agent reflects: it asks itself the most salient questions about its recent experience, answers them, and writes the conclusions back as new memories citing their evidence.

Observations: Klaus reading at the café · Klaus discussing his paper · Klaus skipping lunch to write
Reflection: "Klaus is deeply committed to his gentrification research."
Later reflection, citing that one: "Klaus would rather talk about ideas than gossip."

Reflections cite reflections, building a tree of abstractions — the agent literally develops opinions about itself and others that no single observation contains. When Klaus is asked who he'd like at a dinner party, the answer comes from this tree, not from replaying a thousand café scenes.

05

Plans that bend without breaking

Coherent days need intent. Each agent drafts a day plan in broad strokes ("morning: open the café"), recursively decomposes it into hour- and minute-level actions, and stores the plan in the memory stream — where it competes with everything else. When the world interrupts (a burning stove, an unexpected conversation), the agent reacts, then re-plans the rest of the day around what just happened.

The key idea

Top-down plans + bottom-up reactions, reconciled through one memory system. That balance — routine without rigidity, reactivity without chaos — is what reads as "alive," and what pure prompt-loop agents never had.

06

The party, and the evidence

Seed one intention — Isabella wants to host a Valentine's party — and let the simulation run. Over two days: Isabella invites customers; invitees remember and tell others; Maria asks Klaus on a date to the party; five agents arrive at the café at 5pm on the right day. Information diffusion, relationship formation, and coordination — none of it scripted.

Condition (human judges, interviews)Believability
Full architectureMost believable — beat even human-authored roleplay in the study
No reflectiondrops — agents stay shallow, no formed opinions
No planningdrops — days dissolve into wandering
No memory rankingcollapses — agents contradict their own history

The ablations are the scientific spine: remove any one mechanism and believability measurably degrades. Memory, reflection and planning aren't features — they're load-bearing.

07

Why it still matters

Smallville handed the field its memory architecture. The stream + scored retrieval + periodic reflection pattern runs, in some dress, inside most persistent assistants and agent frameworks today — and MemGPT systematized the storage side of the same problem months later. The importance-scored, self-reflecting memory is this paper's fingerprint on production systems.

It also opened the social simulation frontier: populations of agents as laboratories for studying information spread, coordination, and collective behavior — and as the engine behind character-driven games and worlds. And it left a warning the authors made explicitly: agents this believable invite parasocial attachment and manipulation. The more lifelike the simulacrum, the more the guardrails matter.

Read next

The trilogy's other panels: Reflexion (learning from failure) and Voyager (skills that compound). The production blueprint: Agent Memory System Design.

RUN IT YOURSELF

Score a memory stream

Which memories should surface right now? The paper's answer — copied into agent frameworks ever since — is a sum of three signals: recency (exponential decay), importance (an LLM rating 1–10), and relevance (match to the query). Run it over a little life-log and watch the flip: with no particular query, a 3-day-old breakup outranks this morning's breakfast because importance carries it; ask "what is this person researching?" and the gentrification memory leaps to the top on relevance. Change the ratings or the query.

CPython · WebAssembly
07

Why it still matters

The "Smallville" paper (25 agents living in a simulated town) is best known for its memory architecture, which became a template for believable long-running agents. Each agent keeps a memory stream of observations, then does three things a raw context window can't: retrieves relevant memories by a mix of recency, importance, and relevance; reflects to synthesize higher-level insights from raw observations; and plans its day from those reflections.

Retrieval scoring is the practical heart of it. Not everything in memory is equally useful at a given moment, so the agent ranks memories by how recent, how important, and how relevant to the current situation they are — and pulls the top ones into context. That three-factor score is a widely-copied recipe for deciding what an agent should "remember" right now.

Reflection is what kept the agents coherent over long runs. Periodically the agent asks itself what its recent observations imply ("I keep running into Sam about the election — I care about it"), stores those conclusions as new memories, and reasons over them later. Without reflection, an agent drowns in raw logs; with it, it builds a compressed, higher-level self-model — an idea now common in agents that summarize their own history.

The demonstration itself — agents forming relationships, spreading information, and coordinating a party with no scripting — showed emergent social behavior from the memory-reflect-plan loop alone. The lasting influence is architectural: the recency/importance/relevance retrieval and the reflection step are directly echoed in how today's long-running assistants and multi-agent systems manage memory and stay coherent across time.

Frequently asked

Quick answers

What is the Generative Agents paper?

25 LLM-driven characters in a simulated town, powered by a memory stream, scored retrieval, reflection and planning — producing believable, coordinated long-horizon behavior.

What is the memory stream?

A complete timestamped log of everything the agent experiences, retrieved at decision time by recency + importance + relevance.

What are reflections?

Periodic self-questions whose answers become new, higher-level memories citing their evidence — a growing tree of beliefs above raw observations.

What emerged in the simulation?

A seeded party intention spread via gossip into real coordination: invitations, a date, and five agents arriving on time — unscripted.

Generative Agents: Interactive Simulacra of Human Behavior · Park, O'Brien, Cai, Morris, Liang, Bernstein · Stanford / Google · 2023 · read the original paper on arXiv → · Vibe Engines · 2026
Finished this one? 0 / 111 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns