Skip to main content

How SimSwarm Differs from MiroFish and MiroShark

SimSwarm's intellectual lineage traces through two earlier projects — MiroFish and MiroShark — but today's engine does not bundle or depend on either of them. SimSwarm is a native, MIT-licensed rewrite that reimplements the ideas it found valuable in its own architecture, carrying over none of the upstream framework or structure — though a few specific algorithms (belief-update heuristics, AMM market math) were ported, as the engine source notes. This page explains where it came from and what actually changed.

The lineage

MiroFish is the original swarm-simulation engine (AGPL-3.0). It models agents posting and reacting across two social platforms (Twitter + Reddit), stores its interaction graph in a hosted graph service, and is built on the CAMEL-AI / OASIS agent framework with a Flask server that spawns a subprocess per simulation backed by per-run SQLite. Agents are effectively stateless between rounds. SimSwarm's earliest versions wrapped MiroFish directly as an AGPL submodule under vendor/.

MiroShark (github.com/aaronjmars/MiroShark) is an AGPL-3.0 fork of MiroFish that added the features SimSwarm cared about most: a belief-state system (per-agent stance, confidence, and trust), sliding-window round memory with LLM summarization to survive long runs, a prediction-market platform with a bridge coupling market prices and social sentiment, a self-hosted graph database, and task-level model routing (a strong model for reasoning, a cheap one for bulk work). SimSwarm migrated onto MiroShark's concepts during its second phase.

SimSwarm is the current native engine — a from-scratch rewrite (roughly 90% new code) that keeps the ideas validated by MiroShark (AMM market math, belief-update heuristics, effective prompts) while discarding the inherited framework and structure. A few proven algorithms were ported directly — the engine source marks where (for example, belief.py and the market modules carry "Ported from MiroShark" headers) — but SimSwarm no longer bundles or depends on the AGPL upstream and is published under the MIT license.

At a glance

DimensionMiroFishMiroSharkSimSwarm
LicenseAGPL-3.0AGPL-3.0MIT
RelationshipUpstream originFork of MiroFishNative rewrite — no shared framework/structure (some algorithms ported)
RuntimeFlask server + subprocess-per-sim + per-run SQLiteSame (forked)Async Python libraryawait engine.run(config) inside the GPU pod
LLM loopCAMEL-AI / OASIS frameworkCAMEL-AI / OASIS frameworkDirect vLLM /v1/chat/completions calls — no framework layer
Agent stateStateless between roundsBeliefState (stance/confidence/trust)BeliefState, reimplemented natively (see Beliefs & Stance)
Long-run memoryFull context each roundSliding-window LLM summarizationBounded round memory in the core loop
EnvironmentsTwitter + Reddit (hard-coded)+ prediction market + bridgePluggable environments — social, market, economic, custom (see Environments)
Cross-environmentIndependent platformsMarketMediaBridgeFirst-class cross-environment bridge
Scenario sweepsBuilt-in ScenarioSweep over parameter combinations
Model routingSingle modelTask-level dual-tierTier/role routing (fast loop vs. smart offline)

The columns describe each project's design, not a benchmark. SimSwarm does not bundle or depend on MiroFish or MiroShark at runtime.

What the rewrite changed

Three problems with the MiroShark-based engine (~37K lines across ~130 files) drove the rewrite:

  1. Opaque LLM loop. A heavy CAMEL-AI dependency meant debugging agent behavior required tracing framework internals. SimSwarm calls the model directly, so the entire request/response path is in code you can read.
  2. Inherited complexity. Two separate hard-coded social platforms, dozens of SQL schema files, prompts scattered across many modules, and an embedding model for feed ranking — much of it inherited from upstream and not load-bearing. SimSwarm collapses this into a small set of focused modules and pluggable environments.
  3. Architecture limits. Flask + subprocess + per-sim SQLite added IPC overhead, no shared state, and subprocess-spawning complexity. Because SimSwarm pods are ephemeral and run a single simulation, an in-process async library is simpler and fits the product direction (scenario sweeps, economic environments, structured policy inputs).

The result is documented in detail under Engine Internals.

Licensing: why MIT matters

MiroFish and MiroShark are both AGPL-3.0 — a strong copyleft license whose network-use clause requires anyone offering the software as a service to make their complete corresponding source available. SimSwarm reimplements these concepts in its own engine and no longer bundles the AGPL upstream, and is published under the MIT license: you can self-host, modify, and build on it — commercially or not — without copyleft obligations. See Open Source & Self-Hosting.

Acknowledgements

SimSwarm owes its conceptual direction to MiroFish and to MiroShark by aaronjmars. The belief dynamics, prediction-market mechanics, and long-run memory strategy were proven there first, and some algorithms were ported or adapted from MiroShark; SimSwarm's contribution is a native, MIT-licensed engine that makes those ideas easier to run, extend, and reason about.