MiroShark: The Swarm Engine That Forks Public Reality

From one seed document, it builds grounded agents, runs them across social platforms and prediction markets, and lets you inspect the timeline when the world changes.

9 min read • View on GitHub • More from aaronjmars

A seed document feeds a branching machine that splits into social posts, market prices, and a connected memory graph. One lever triggers two diverging timelines, showing how a single scenario can become multiple futures.
MiroShark turns one scenario into a replayable world with branching outcomes, grounded memory, and market feedback.
Key Takeaways

A Scenario Engine for Public Reality

MiroShark is not trying to be a chatty demo of synthetic people. Its real trick is that a seed, like a press release or policy draft, becomes a living social world with memory, incentives, and a timeline you can split. That makes it feel less like a chatbot swarm and more like a playtest engine for public reaction.

Simulate anything, for $1 & less than 10 min — Universal Swarm Intelligence Engine

aaronjmars, Project Maintainer · aaronjmars/MiroShark - GitHub

That framing matters because it changes the question. Instead of asking whether an LLM can imitate a person, MiroShark asks whether a scenario can be rehearsed before it escapes into the real world. For PR, policy, and market narrative work, that is the more useful test.

Why the Fork Matters

The most interesting mechanic in the repo is the fork. A simulation can run forward, absorb a breaking event, then split into alternate futures. That is a counterfactual machine, not just a feed generator.

Two timelines split from the same event, with one side stabilizing and the other side fracturing after a sudden shock. The image explains how a simulation can branch when new information changes the world state.
A fork is not a reset. It is a branch that preserves shared history and lets the next event diverge from the same starting truth.

That is why the project is more interesting than a single-run sentiment simulator. It can show how the same seed reacts under a new shock, then preserve both branches for comparison. In practice, that makes the timeline itself part of the product.

Grounded Agents, Not Free-Form Personas

The repo leans on a graph-first memory model. Source text is chunked, entities are extracted, and a Neo4j-backed world model holds the relationships. Agents then inherit that structure, which keeps them anchored to the seed instead of drifting into generic roleplay.

This loop is the core mental model: grounded text becomes a graph, the graph becomes agents, and the agents evolve through social and market feedback before a run can fork.

The important distinction is not that agents get prompts. It is that they get a world model. That world model is what lets a reaction feel informed, inconsistent, or sudden for a reason instead of because the model was improvising.

How a Simulation Run Actually Works

At a high level, the flow is straightforward: ingest the seed, build the graph, generate personas, run rounds, track actions, and emit a report. The repo’s services make that sequence explicit, especially around SimulationState, the runner, and tracked AgentAction events.

# Simplified lifecycle
state = SimulationState(seed=doc)
graph = GraphBuilderService.build(doc)
personas = SimulationManager.generate_profiles(graph)
run = SimulationRunner.start(personas)

while run.active:
    actions = run.step()
    state.record(actions)
    if breaking_news:
        run.fork(new_event)

report = run.finalize()
  1. Seed text is normalized and turned into a graph of entities and claims.
  2. Persona generation uses that graph to create grounded agents with distinct viewpoints.
  3. The runner advances the simulation in rounds across Twitter, Reddit, and Polymarket.
  4. Each action is recorded so the run can be inspected, replayed, or forked.

That structure is what makes the system legible. You can see where a run begins, where it changes, and what each agent did in between. For a simulation product, that audit trail is half the value.

Why Polymarket Changes the Story

Prediction markets turn the simulation into something more than social theater. Agents are not only expressing beliefs. They are also responding to price, implied conviction, and uncertainty.

DimensionFocus groupsSentiment toolsMiroShark
InputModerator prompts and recruited peoplePublic posts and keyword streamsSeed scenario plus grounded source text
MemoryHuman recall in the roomUsually shallow or absentGraph-backed world model in Neo4j
Interaction modelSmall group discussionPassive observationAgents act across Twitter, Reddit, and Polymarket
Branching / counterfactualsManual scenario variantsNot nativeBuilt-in forked timelines
Market feedbackNoneNonePrediction-market loop shapes behavior
AuditabilityNotes and recordingsDashboards and aggregatesAction logs and trace interviews
Best use caseQualitative explorationTrend monitoringNarrative rehearsal and scenario stress tests

That market layer is the difference between a simulation of opinions and a simulation of incentives. Prices make certainty visible. They also give the agents something to react to when the narrative starts to move.

Trace Interviews Turn the Swarm Into an Investigable System

The trace interview feature is the observability layer that keeps this from becoming mystical. You can ask why an agent acted, what it believed, and how that belief changed over time. In other words, the swarm is not only generative. It is inspectable.

You bring a scenario. MiroShark builds the world around it. Hundreds of grounded agents. Twitter, Reddit, and a prediction market. Hour by hour.

aaronjmars, Project Maintainer · aaronjmars/MiroShark - GitHub

That matters for trust. If a simulation is going to inform a decision, you need a way to examine its internal story, not just its output. Trace interviews make the system useful as evidence, not just as entertainment.

What MiroShark Is Really Replacing

MiroShark is not a survey tool with a new coat of paint. It is closer to a dynamic rehearsal space for narratives, with memory, incentives, and reversible history. That puts it in a different category from focus groups, single-platform sentiment tracking, or naive persona prompts.

QuestionTraditional focus groupsNaive persona simulatorsMiroShark
What happens if the message changes?A new session has to be runThe model improvises a responseThe timeline can fork from a shared past
What does the system know?What participants remember in the roomMostly the prompt and chat contextA graph of entities, claims, and relations
How do reactions spread?Slowly, and only in conversationNot realisticallyAcross Twitter, Reddit, and a prediction market
Can I inspect the reasoning?Only through notes and transcriptsUsually not in a reliable wayYes, through trace interviews and action logs
What is it for?Qualitative feedbackRoleplay and ideationScenario rehearsal and narrative stress testing

That is the real thesis. MiroShark does not promise truth. It gives you a faster, more structured way to ask how truth might travel once people, feeds, and markets start responding to it. In some domains, that is the question that matters.