Source-linked AI summary
Agentsensus: Consensus-Compressed Shared Memory for Multi-Agent Story Worlds
Yu Pan
TL;DR
Story-world simulations must track who learned what, when, and from whom, but private memory streams duplicate shared events. Agentsensus merges equivalent memories into a shared, owner-scoped store and links related records. Across four worlds, it writes fewer entries than the closest baselines and yields shared, linked memory at judged quality within noise of them.
Problem
Private character memory streams store shared events once per witness, creating duplication in story-world memory.
Source: §1 · p. 1Method
Agentsensus merges equivalent memories into one owner-scoped record, links statements split from deposits, and expands recall automatically along those links.
Source: §1 · p. 2Results
22–44% fewer entries than the closest baseline in each world, with 14–28% multi-owner records and 94–99% linked records; judged quality is within noise of the baselines.
Source: §5.1 · p. 6, §7 · p. 9Takeaways & Limitations
At the tested horizon and prompting regime, memory structure cannot be assumed to arise from agent-side curation because agents reliably used only remember and recall.
Source: §7 · p. 9Auto-expansion returns 1.6–8.8× the rows, and keeping the shorter merged text can remove named characters or the ordering party.
Source: §6 · p. 9
Abstract
from arXiv · showhide
A agentic story world is a dynamic system simulating who learned what, when, and from whom -- yet the standard design gives each character a private memory stream. A shared event is therefore stored once per witness, large duplication will be incurred in terms of storage. We present Agentsensus, a story-world simulation framework in which there is an unified long-term memory. Records of the same event merge into one owned by all its witnesses, and semantically relevant memory records are linked. We evaluate on four worlds -- two classical Chinese novels, Hamlet, and a real-world conflict timeline -- run for 40 to 80 rounds against three per-character memory designs under an equal-granularity protocol. Agentsensus writes 22-44% fewer entries than the closest baseline and is the only design whose memory becomes shared (14-28% of records held by more than one character, some by 10) and linked (94-99%), at judged simulation quality indistinguishable or even better than the baselines. An ablation attributes this to the merge itself: disabling it multiplies the store by 3.1x and takes sharing to exactly zero. Sharing also compounds with the horizon rather than saturating early, rising 6% to 9% to 14% as one world is re-run at 10, 20 and 40 rounds.
1 INTRODUCTION
Story-world simulations need memory to track who learned what, when, and from whom, but private streams duplicate shared events and leave related records fragmented. Agentsensus uses a shared, owner-scoped store that merges equivalent memories and links related records automatically.
1 INTRODUCTION
- Private, append-only character streams create three structural problems that worsen as the world grows: witness-multiplied redundancy, fragmented knowledge, and unused agent-managed maintenance.A shared experience is stored once per participant, while copies can drift and remain unconnected; agents made zero calls to discretionary memory-management actions across two models and four backends.Source: §1 · pp. 1–2
- Agentsensus merges equivalent records into one owner-scoped entry, unions witnesses, links pieces split from a deposit, and expands recall one hop without agent-built graphs.Agents recall only records they own; the mechanisms run inside remember and recall.Source: §1 · p. 2
- The framework combines a deterministic round-barrier scheduler, passive environments and information carriers, delayed conversation delivery, and full-system checkpoints.Its other contributions are consensus-compressed memory, an equal-granularity evaluation against three baseline reimplementations across four worlds, and a case-study method relating memory structure to story social structure.Source: §1 · p. 2
2 RELATED WORK
Prior work generally gives memory to one agent or shares records without merging duplicates. Agentsensus instead makes record ownership multi-agent and derives sharing through consensus compression.
Memory for a single agent
- Single-agent memory systems vary storage and maintenance, but keep memory owned by one agent; Agentsensus lets a record belong to several agents.Examples include private streams, context paging, forgetting curves, self-feedback, and evolving note networks.Source: §2 · p. 2
Multi-agent systems and shared state
- Task-oriented multi-agent systems share conversation state, but that transcript does not persist as a retrieval substrate across story worlds’ hundreds of rounds.The distinction is between completing a task and sustaining a long-running simulated world.Source: §2 · p. 2
Memory shared across agents
- G-Memory and Collaborative Memory preserve contributors’ records and mediate access; neither merges equivalent records across contributors.Consensus compression changes record count rather than visibility, and derives the owner-set access policy instead of configuring it.Source: §2 · p. 2
Deduplication and grounding
- Agentsensus adds witness ownership to semantic deduplication, while its graph is built incrementally at deposit time by agents unable to see the store.The paper distinguishes this from graph retrieval over static corpora indexed with global document knowledge.Source: §2 · p. 3
Story worlds and character agents
- Story-world research motivates novel-seeded societies, but Agentsensus tests the memory substrate rather than the resulting story.This contrasts with planning-based story generation and persona-focused character agents.Source: §2 · p. 3
3 THE AGENTSENSUS FRAMEWORK
Agentsensus keeps the simulation kernel common across memory backends and changes how long-term memory is represented and accessed. Its process seeds owner-tagged memories, merges equivalent deposits, and links split statements for owner-scoped recall.
3.1 WORLD MODEL AND ROUND-BARRIER KERNEL
- A round-barrier kernel steps awake agents against the same world state, so effects appear next round and outcomes do not depend on stepping order.Characters act; environments own memories without acting, while information carriers hold text characters can read.Source: §3.1 · p. 3
3.2 SEDIMENTATION
- Source text is sedimented into a cast, map, carriers, and a seeded memory store, with memories tagged by the agents who witnessed each event.This makes shared canonical events with multiple owners measurable.Source: §3.2 · pp. 3–4
3.3 THE CONSENSUS SHARED MEMORY
- Deposits are atomized into self-contained statements; semantic candidates are judged for equivalence, and matches merge owner and affiliation sets while retaining the shorter text.Statements from one deposit are mutually affiliated; owner-scoped recall expands one hop along affiliation links.Source: §3.3 · p. 4
3.4 HOW THE FOUR DESIGNS DIFFER
- Among the four backends, only consensus merges records across agents; the alternatives use private streams, interaction-and-insight tiers, or access-controlled stores.The graph backend retrieves at both interaction and insight levels, while Collaborative Memory partitions a shared store by access list.Source: §3.4 · p. 4
4 EXPERIMENTAL SETUP
The evaluation compares four memory backends across four story worlds using shared simulation components and an equal-granularity protocol. It measures store structure and judged continuation quality, while separating seeded history from simulation-written entries.
Experimental setup
- The four worlds are Three Kingdoms and Dream of the Red Chamber at 80 rounds, Hamlet at 40, and a Russia–Ukraine timeline at 40.The novels use chapters 1–40, Hamlet uses Acts I–III, and the timeline runs through 2024-04; each work’s remainder is held out as a continuation reference.Source: §4 · p. 4
- Three faithful baseline reimplementations share the kernel, personas, scenarios, and vector store, leaving the memory mechanism as the difference.The baselines are Generative-Agents-style streams, G-Memory, and Collaborative Memory.Source: §4 · p. 5
- Equal atomization makes simulation-written entry counts comparable, while excluding identical seeded history; consensus recall nevertheless returns a median 32 rows versus 5 for a baseline.This protocol equalizes what is written, not what is read.Source: §4 · p. 5
- Continuation quality is judged on grounding, trajectory, narrative, and goal pursuit, while structural quantities are deterministic.The first three quality measures use a rendered screenplay; goal pursuit uses the event log.Source: §4 · p. 5
- Table 2 reports sharing and linking across four worlds for consensus; all baselines are at exactly 0% on both columns by construction.No baseline merges records across agents or links atoms.Source: Table 2 · p. 6
- The consensus store stays below every baseline in simulation-written entries from the opening rounds, with the gap widening through 80 rounds in Three Kingdoms.Figure 3 also shows per-agent owned memories for the busiest six agents; the other three worlds repeat the growth pattern.Source: Figure 3 · p. 6
5 RESULTS
Across the tested worlds, consensus memory reduces storage while creating shared, linked records; judged continuation quality is a wash, and disabling the merge removes sharing.
5.1 FOOTPRINT AND STRUCTURE
- At equal granularity, consensus writes 22–44% fewer entries than the closest baseline in each world; 14–28% of records are multi-owner and 94–99% are linked.The deepest merge reaches 10 witnesses.Source: §5.1 · p. 6
5.2 GROWTH AND OPERATION LATENCY
- The footprint gap starts in the opening rounds and widens; writes take tens of seconds when they call a model, while reads stay under about a second for every backend.The latency profile repeats in the other three worlds.Source: §5.2 · p. 6, Figure 4 · p. 7
5.3 STRUCTURE COMPOUNDS WITH HORIZON
- Sharing rises with horizon: Red Chamber reaches 13%→20%→23%→24% at rounds 10/40/60/80, while Russia–Ukraine reaches 6%→9%→14% at rounds 10/20/40.The authors report that later deposits meet equivalents already in the store, so compression compounds rather than saturating early.Source: §5.3 · p. 6
5.4 CONTINUATION QUALITY
- Across 16 world-metric cells, consensus is best in 4 and trails elsewhere by margins comparable to the spread across three scorings of the same text.The authors characterize continuation quality as a wash; goal pursuit is ceiling-bound, but narrative is not.Source: §5.4 · pp. 6–7, Figure 5 · p. 7
5.6 AGENTS DO NOT MANAGE MEMORY
- Across four backends and both tested models, agents made zero calls to discretionary memory-management actions, so structure cannot be assumed to arrive through agent-side curation.Prompt prominence, incentives, and runs beyond 80 rounds were not tested.Source: §5.6 · pp. 7–8
5.5 THE MEMORY GRAPH TRACKS THE SOCIAL GRAPH
- Conversing agents overlap in memory an order of magnitude more than non-conversing agents, and cross-agent memory links run almost exclusively between conversing pairs.The ownership heatmap’s block structure reproduces conversational communities without the interaction log.Source: §5.5 · p. 7, Figure 6 · p. 8
5.7 ABLATION
- Disabling merging multiplies the store 3.1× and takes sharing to zero, while affiliation linking remains 94% versus 93% published.Quality columns do not separate by merge status; disabling the merge doubles remember time but leaves recall unchanged. Relevance and hybrid eviction preserve structural quantities, at 15–19% more wall-clock than FIFO.Source: §5.7 · p. 9
6 DISCUSSION AND LIMITATIONS
Consensus compression reduces memory footprint and creates shared structure without measurable loss in judged behaviour, but it carries costs and is evaluated at limited scale. The reported numbers come from a single stochastic run.
6 DISCUSSION AND LIMITATIONS
- The largest store contains 7,025 rows, so the evaluation establishes footprint and structure rather than retrieval feasibility at scale.Merging roughly doubles write latency; every reported number comes from a single stochastic run.Source: §6 · p. 9
- A single unverified LLM call judges equivalence over five candidates, making an incorrect merge permanent; five of 147 recoverable merges conflated distinct events.The manual check covered only merges recoverable for inspection.Source: §6 · p. 9
- Auto-expansion appends every affiliated sibling an agent owns, unranked and uncapped, returning 1.6–8.8× the rows.This payload grows with the merging that shrinks the store.Source: §6 · p. 9
- On the 13% of merges whose discarded side is preserved, the surviving text drops a named character in 30% of cases and the ordering party in 12%.The retained event can therefore lose its chain of command.Source: §6 · p. 9
7 CONCLUSION
Across four worlds, Agentsensus produces the smallest equal-granularity memory footprint and the only shared, linked structure among four backends, with judged quality within noise of baselines. The conclusion is bounded by the tested horizon and prompting regime.
7 CONCLUSION
- Across four worlds, Agentsensus has the smallest footprint at equal granularity and is the only backend with shared and linked memory, while judged quality remains within noise of baselines.Its emergent graph mirrors the story’s social structure.Source: §7 · p. 9
- Agents reliably used only remember and recall, so designs that wait for agent-side curation get no structure under the tested horizon and prompting regime..Source: §7 · p. 9
REPRODUCIBILITY STATEMENT
The authors release the framework, scenarios, backends, and pipeline scripts needed to reproduce the method. Because every stage calls an LLM, fresh runs differ in their particulars; reproduction targets the result pattern rather than the exact numbers.
REPRODUCIBILITY STATEMENT
- The release includes the framework, four memory backends, four scenarios with source texts and information carriers, and scripts for every pipeline stage.REPRODUCE.md gives the stages in order, their commands, and measured costs.Source: REPRODUCIBILITY STATEMENT · p. 10
- Hamlet at 40 rounds is the cheapest entry point that still shows every reported structural effect.Source: REPRODUCIBILITY STATEMENT · p. 10
- Run outputs are not released because they are large and regenerable, and fresh LLM calls make exact numbers vary; the expected reproducible pattern is fewer entries, sharing and linking exclusive to consensus, and sharing rising with horizon.One cell rerun under identical settings landed within 1% of its original.Source: REPRODUCIBILITY STATEMENT · p. 10
AI USE STATEMENT
The paper distinguishes LLMs used as part of the research from an LLM coding assistant used in preparing it. The authors say they checked the assistant’s outputs against underlying records and take responsibility for the paper.
AI USE STATEMENT
- The paper separates LLMs as the object of study from an LLM-based coding assistant used in preparation.Source: AI USE STATEMENT · p. 10
- The simulation is LLM-driven and continuation-quality metrics are LLM-judged; both are part of the method.Models, versions, and prompts are specified in the paper and appendix.Source: AI USE STATEMENT · p. 10
- A coding assistant drafted sections, wrote released analysis and figure scripts, and ran posthoc measurements; authors checked script outputs against records and take responsibility for the paper.Source: AI USE STATEMENT · p. 10
A IMPLEMENTATION DETAILS
The simulation infrastructure is shared across all four backends; only the long-term store differs. Characters act synchronously at round barriers, while memory, messaging, and short-term state follow defined rules.
A IMPLEMENTATION DETAILS
- Characters are the only schedulable agents; environments and information carriers are passive, and dead or absent characters retain recallable memories without being scheduled.Actions targeting passive entities resolve synchronously within the acting character’s apply step.Source: A IMPLEMENTATION DETAILS · p. 12
- A round has a decision phase against one shared world state, followed by action application; effects appear next round, making outcomes independent of agent step order.This round-barrier scheduler makes runs reproducible from their event logs.Source: A IMPLEMENTATION DETAILS · p. 12
- Asynchronous say and gesture messages arrive in the recipient’s inbox from the next round, with delivery delayed in proportion to distance.The kernel stores exchanges as conversation threads that either party can reread.Source: A IMPLEMENTATION DETAILS · p. 12
- The twenty-four-action repertoire includes six discretionary memory-management actions, none of which agents called.The six are forget, revise memory, add/remove/set affiliated, and get affiliated.Source: A IMPLEMENTATION DETAILS · p. 12
- Each character’s prompt includes a goal stack, a status register, and a cache of the twenty most recent action–result pairs.The published configuration evicts the oldest pair when the cache is full; relevance and hybrid alternatives are also described.Source: A IMPLEMENTATION DETAILS · p. 12
- The short-term cache’s eviction policy changes no structural quantity in the reported variation.The tested policies are FIFO, relevance, and a hybrid with α = 0.5.Source: A IMPLEMENTATION DETAILS · p. 12
B WHAT THE MECHANISM COSTS
This section examines the memory mechanism’s costs and use in operation, reporting retrieval and merge costs and observations about message styles. It also describes rendered screenplay scenes, their grouping, sedimentation and cast selection, and the language behavior of the reported runs.
B WHAT THE MECHANISM COSTS
- The query-string relevance proxy understates relevance when wording differs and is inapplicable to Hamlet’s clause queries, which show 0% in both columns.Hamlet issued only three recalls in forty rounds, too few to support an estimate; only the ratio of the two relevance columns is considered meaningful elsewhere.Source: B WHAT THE MECHANISM COSTS · p. 13
- 1.6–8.8× amplification occurs when recall appends every owned one-hop affiliate to five semantic hits, without ranking or a cap.In Red Chamber, the median row carries 4 affiliated siblings at one owner and 19 at four or more; Russia–Ukraine has almost no siblings or expansion. The proposed repair—rank affiliates into the candidate pool and truncate—was not run, and expansion’s benefit remains unmeasured.Source: B WHAT THE MECHANISM COSTS · p. 12, Table 4 · p. 13
- 44 of 147 observable merges (30%; 22–37% across worlds) lose a named character when the store keeps the shorter equivalent text.In 18 of 147 merges (12%), the lost name is the party who ordered, authorized or dispatched the act. The log exposes only a nonrandom subset; the defect is characterized, not fixed, and all reported runs used the shipped rule.Source: Table 4 · p. 13, B WHAT THE MECHANISM COSTS · p. 13
C WHAT AGENTS ACTUALLY CALL
- Remember and recall were used constantly, but agents invoked none of the six documented discretionary memory-management actions in any world or backend.Those actions were available every round and documented with worked examples and an id-free query interface.Source: C WHAT AGENTS ACTUALLY CALL · p. 13
D.1 ONE MESSAGE PER BACKEND
- Across selected excerpts, messages share an administrative register, while consensus lines tend to ask about changes to shared arrangements and baseline lines more often restate them.This is an observation, not a measurement; the backends were within each other’s error bars in §5.4. In the Russia–Ukraine run, 12% of memories are Chinese and 2% Russian.Source: HAMLET (40 ROUNDS, ENGLISH) · p. 15, RUSSIA–UKRAINE (40 ROUNDS, ENGLISH) · p. 15
D.2 THE RENDERED SCREENPLAYS
- The continuation-quality judge renders each run’s event log as a screenplay, constraining cast, locations and actions to the log while rewriting the wording.The supplied scenes include procedural exchanges about a night raid, household orders, and real-world briefings; they are examples of rendered outputs, not separate quality measurements.Source: §D.2 · p. 16, THREE KINGDOMS · p. 16, RED CHAMBER · p. 17
- In the rendered Hamlet scene, Gertrude urges caution and asks for evidence, while Hamlet says his father’s ghost named Claudius as the murderer.Hamlet then asks who controlled the king’s keys and medicines and which attendants could verify Claudius’s whereabouts.Source: HAMLET · p. 20
D.3 HOW THE SCENES WERE CUT
- Scenes group activity by place and round, with the twenty-round cap splitting busy locations and even a single action in Norway becoming its own scene.The figures also show recurring locations splitting into multiple scenes in Red Chamber and activity concentrating in a few capitals and headquarters in Russia–Ukraine.Source: §D.3 · p. 20, Figure 8 · p. 20, Figure 10 · p. 24
E SEDIMENTATION AND CAST SELECTION
- Russia–Ukraine extracts the fewest events but costs the most sedimentation tokens because entries name many institutional actors whose attributions must be resolved.Characters participate when they exceed a per-world sediment-memory threshold, while information carriers are always retained; two overrides retain Fortinbras and England for the continuation. Boundary-state finalization also archives characters who have died, left office, or otherwise ceased participating.Source: E SEDIMENTATION AND CAST SELECTION · p. 26
F LANGUAGE COMPOSITION OF THE RUNS
- 62% of Hamlet’s memories came out in Chinese, while Russia–Ukraine mixed Chinese and Russian into English despite the declared scenario languages.Screenplays were rendered into the scenario language for judging; a later content-language prompt directive yielded structural ablation numbers within 1% of those reported.Source: F LANGUAGE COMPOSITION OF THE RUNS · p. 26
G MERGE DEPTH, GRAPH DENSITY AND EXPANSION
The section characterizes how consensus memory structure varies across worlds, including merge depth and recall expansion. Russia–Ukraine reaches the deepest merge, while the worlds’ staging and deposit structure shape these patterns.
G MERGE DEPTH, GRAPH DENSITY AND EXPANSION
- Table 8 reports final-stage consensus structure, including entries with three or more witnesses, maximum merge depth, and measures of recall expansion.“Expanded” is the fraction of recalls returning at least one affiliated memory; “Linked/call” is the mean number of such memories per expanding call.Source: Table 8 · p. 26, G MERGE DEPTH, GRAPH DENSITY AND… · p. 26
- Institutional deposits are short and rarely split into atoms, while compound novel recollections produce many linked pieces through atomization.The section attributes Russia–Ukraine’s fewer siblings to its short deposits and the novels’ more numerous linked pieces to compound recollections.Source: G MERGE DEPTH, GRAPH DENSITY AND… · p. 27
- One Russia–Ukraine presidential air-defense directive is co-owned by ten institutional witnesses, the deepest record in the set.Merge depth reflects the world’s staging: Russia–Ukraine reaches ten witnesses, Hamlet three, and the novels six.Source: G MERGE DEPTH, GRAPH DENSITY AND… · p. 27
H GROWTH AND LATENCY IN THE OTHER WORLDS
Across the other worlds, consensus memory grows below every baseline from the opening rounds, while continuation-quality leadership varies by world and metric. The figures also describe the write-path cost and the graph views used to inspect the case studies.
H GROWTH AND LATENCY IN THE OTHER WORLDS
- In the remaining worlds, consensus memory grows below every baseline from the opening rounds, while reads stay under about a second and the write path bears the mechanism’s cost.Figures 12–14 repeat the growth and per-call latency readings for Red Chamber, Russia–Ukraine, and Hamlet.Source: H GROWTH AND LATENCY IN THE OTHER WORLDS · p. 27, Figure 12 · p. 27, Figure 13 · p. 28
J CASE-STUDY GRAPHS
- The three-layer analysis graphs conversations, shared memory ownership, and the combined agents–memories–ownership structure; Figures 17–19 render the remaining worlds’ data statically.The HTML graphs are interactive, while the PDF figures use the same layout as the figures in §5.1.Source: J CASE-STUDY GRAPHS · p. 28, Figure 17 · p. 30, Figure 18 · p. 31
- The equivalence judge adds a second LLM call on writes, roughly doubling deposit cost as the store grows; reads are unaffected because retrieval calls no model.Figure 15 plots mean seconds per remember and recall in five-round bins.Source: Figure 15 · p. 29
I CONTINUATION QUALITY IN THE OTHER WORLDS
- No backend leads on continuation quality everywhere, and no world has one leader across all four metrics.Table 9 gives the means summarized by the continuation-quality panels for all worlds and backends.Source: I CONTINUATION QUALITY IN THE OTHER… · p. 27, Figure 16 · p. 29, Table 9 · p. 30