Skip to the page

Questions people ask

What a run costs, your own API keys, what the hosted demo keeps, the license, who builds Paracosm and how a run works. For anything this page does not answer, write to [email protected].

Cost and access

Is Paracosm free?

The engine is open source under Apache-2.0. Use it in commercial products without restriction: install from npm, fork the repo, build on it. You provide LLM API keys; running a 6-turn quality-preset run costs roughly $1-3 on OpenAI, $3-7 on Anthropic. The hosted demo at paracosm.agentos.sh/sim is free to try. It runs on the host's API keys with capped run size and a daily limit per IP address, and your own OpenAI or Anthropic key lifts both.

What does a typical run cost?

A six-turn run on a small scenario with default settings costs roughly tens of cents under economy and a few dollars under quality. Compile-from-seed adds ~$0.10 (cached to disk by seed signature). Tool reuse after turn three is the largest cost lever. Anthropic's prompt cache TTL hits the shared system prefix from turn 2 onward (10× input-cost reduction); OpenAI auto-caches any prompt over 1024 tokens. A run's cost field reports its spend in US dollars and its number of model calls; the cost breakdown on each streamed event carries the tokens, the prompt-cache reads and writes, and the USD the cache saved, per stage.

What LLM providers work with Paracosm?

OpenAI and Anthropic. OpenAI is the default for a dashboard run and for runSimulation and WorldModel.simulate; WorldModel.quickstart and the compile command default to Anthropic. The default OpenAI models for runSimulation and WorldModel.simulate are GPT-5.4 for the departments, GPT-4o for the commander, GPT-5.4 mini for the Event Director and the tool judge, and GPT-5.4 nano for agent reactions; the dashboard's model picker keeps those but sets the commander to GPT-5.4 mini. On Anthropic, Claude Sonnet 4.6 for the departments and Claude Haiku 4.5 for every other role. The hosted demo, on the host's keys, runs GPT-5.4 mini for the commander, the departments, the tool judge and the verdict, and GPT-5.4 nano for the Event Director and agent reactions. Each role (commander, departments, director, judge, agent reactions) is configurable independently. Cost presets quality and economy bundle sensible defaults; per-role overrides win. Paracosm auto-detects which API key is present in env and falls back between providers. Mini models are available for cost iteration but produce lower-quality structured output and trip the judge more often.

Does Paracosm need an internet connection?

Yes. Compiling a scenario and running it both call the OpenAI or Anthropic API. Web search is optional. Live search is off by default for a run, and department research then comes from the scenario's knowledge bundle.

The project

Who builds Paracosm?

Frame.dev, the team behind AgentOS, the agent runtime Paracosm runs on. AgentOS carries its agent orchestration, model calls, tool forging and memory. The source is on GitHub and the package on npm.

What license is Paracosm under?

The Apache License 2.0, in LICENSE. It lets you use, change and distribute Paracosm, in commercial products too, on its conditions, such as giving others a copy of the license and keeping its notices.

Can I use my own API keys?

Yes. Your own install reads OPENAI_API_KEY or ANTHROPIC_API_KEY from the environment or a .env file, and you pay your model provider for the runs you make.

In the hosted demo, enter your own OpenAI or Anthropic key in Settings. It lifts the demo's run caps and its daily run limit for a run you start, a Digital Twin run included. The tab keeps your key until it closes or you select Forget my keys, and each key goes only to the provider it belongs to.

What data does Paracosm keep?

A copy you install from npm or run from the repository loads none of this site's analytics tools. The hosted demo keeps what the Privacy page lists.

It saves finished runs for replay, and keeps your saved replay until ten newer runs are saved for your browser, with room for 50 unpinned replays in total. To apply its usage limits it keeps your IP address with a count of your requests until the next UTC midnight, or the next UTC hour for chat. It holds an API key you add in memory while in use and for up to 30 minutes afterward, then drops it. To run a simulation it sends the run's prompts to OpenAI or Anthropic.

How do I report a bug or contribute?

Search the existing issues, then use the issue forms to report a bug or propose a feature. Open an issue before a large change, so the approach is agreed before you write it. Report a security issue privately, as the security policy says, never in a public issue.

A contribution comes in under Apache-2.0, the license Paracosm goes out under; sign your commits with git commit -s where you can. CONTRIBUTING.md has the setup and the rules.

How do I reach the team?

Write to [email protected] about investment, partnerships, private deployment, custom scenarios and government work. Questions about using Paracosm go to Discord. The Contact page lists every way to reach us.

What it is

What is Paracosm?

An open-source TypeScript structured world-model engine for LLM agent swarms (npm install paracosm, Apache-2.0). You define or ground a world as a ScenarioPackage: departments, metrics, crisis templates, progression hooks. Paracosm runs a scenario as timelines from the same seed, roster and dice. An LLM event director writes each timeline’s unscripted crises from what happens in it, and you can compare outcomes after changing one thing, such as who leads or an event at a past turn. The npm package exports two scenarios, Mars Genesis and Lunar Outpost, and the repository's scenarios/ folder holds five more; you can compile new ones from a JSON draft, prompt, brief, or URL.

Positioning map: docs/positioning/world-model-mapping.md

What are the two kinds of "world model" and which one is Paracosm?

The phrase has been overloaded since 2024. Older lineages do most of the work: Dreamer (Hafner et al, V1 2019 → V3 2023) and MuZero (Schrittwieser et al, 2020) learn dynamics in latent space. MuJoCo, Brax, and Isaac Sim simulate physics deterministically. Both have been the substrate for robotics research for years. Yann LeCun's JEPA family (I-JEPA, V-JEPA) is explicitly anti-pixel — the architectural argument is that pixel reconstruction is wasteful and prediction should happen at the level of meaning. Newer pixel-generation entrants — Sora, Genie 3, World Labs Marble — get the headlines with a "world simulator" framing the older lineage rejects (LeCun on X: pixel generation here is "not only wasteful, it's doomed to failure"). Structured / LLM-based: typed scenario contracts plus deterministic kernels emit JSON state, decisions, and citations that agents can reason inside. Paracosm sits in the structured / LLM lineage. The split is surveyed in the Tsinghua FIB Lab world-model survey (ACM CSUR 2025) and the World Model for Robot Learning survey; critique in Xing 2025; counterfactual semantics in Kirfel et al, 2025.

Tsinghua FIB Lab. Understanding World or Predicting Future? A Comprehensive Survey of World Models (ACM CSUR 2025) · World Model for Robot Learning: A Comprehensive Survey (arXiv 2605.00080) · Xing E. P. Critiques of World Models (arXiv 2507.05169, 2025) · Is Sora a World Simulator? (arXiv 2405.03520) · Kirfel L. et al. Counterfactual World Simulation Models (AI & Ethics 2025) · Ha & Schmidhuber. World Models (arXiv 1803.10122, 2018)

How does Paracosm differ from MiroFish, OASIS, and other agent-based modeling stacks?

MiroFish and OASIS (CAMEL-AI) run open-ended social simulations with thousands to one million LLM-driven agents on social-media-shaped substrates and emit aggregate prediction reports. Paracosm runs timelines of one scenario from the same start, each with a top-down agent swarm and an LLM event director that writes unscripted crises from what happens in that timeline. You can compare outcomes after changing one thing, such as who leads or an event at a past turn. Different scale (~100 vs 1k-1M), different direction (top-down vs bottom-up emergent), different output (universal forkable RunArtifact vs aggregate forecast). Both are valid agent-swarm shapes; Paracosm's lane is replayable decision support and counterfactual analysis. Classical ABM (Mesa, NetLogo, MASON, ABIDES, AnyLogic) is rule-based and largely non-LLM; Paracosm threads LLMs into events and reasoning while keeping a deterministic kernel for state.

CAMEL-AI / OASIS · agiresearch/MiroFish · classical ABM stacks (Mesa, NetLogo) · the bridge survey is the Nature HSSC LLM-empowered ABM survey (2024) and MIT Media Lab's On the Limits of Agency in Agent-Based Models (arXiv 2409.10568, 2024).

What verticals does this apply to?

Any domain where testing decisions before making them reduces risk. Digital-twin medicine (model a patient under interventions, vary the physician HEXACO profile). Corporate strategy (M&A, market entry, RIF contingencies, leadership-style replays). Policy simulation (tax change, regulatory rollout, congestion pricing, healthcare reform). Defense / wargaming (commander HEXACO under shared starting conditions; replay any past run after a code change). Game design playtesting (procedural NPC civilizations, emergent narratives, runtime forge inside the sandbox). AI alignment red-teaming (pressure-test agent behavior under specific HEXACO weights; reproducible by construction). The engine is domain-agnostic; the scenario contract names the world.

How a run works

How does a single turn run end-to-end?

A turn takes 30-90 seconds and runs four phases in sequence. (1) Event Director reads world state, prior decisions, and tool intelligence; generates events that target weak points. (2) Department Analysis — five specialist agents (medical, engineering, agriculture, psychology, governance for Mars; configurable per scenario) analyze the events in parallel, can recall research, and may forge new computational tools. (3) Commander Decision — the leader weighs department input through their HEXACO profile and emits an action category, parameter set, rationale, and confidence score. (4) Kernel Resolution — the deterministic state machine applies the decision's effects: resources move, statuses change, agents are promoted or lost, HEXACO traits drift through leader-pull, role-activation, and outcome-reinforcement. The full per-turn record is appended to the RunArtifact.

Inspired by interactive-narrative directors (Riedl & Bulitko, Interactive Narrative: An Intelligent Systems Approach, AI Magazine 34(1), 2013).

What decides what happens, the dice or the model?

Seeded dice decide luck: who dies, who is born, who recovers and who is promoted, each against a chance a fixed formula sets, and whether the option a leader picks succeeds. The language model writes the events of the turns the scenario does not fix, the department reports, the leader's choice, the reactions and the verdict; the effects a leader adopts from the reports move only numbers the run holds, each by at most a set amount per decision, and an event's outcome moves what the scenario's own table for its category names. A rerun of the same seed rolls the same dice but makes new model calls, so it can go differently; the FAQ walks through each part with links to the code.

Is the simulation deterministic? How is replay verified?

The kernel is deterministic, seeded by Mulberry32 (a 32-bit pseudo-random number generator). Given the same seed, scenario, population and key personnel, a run starts with the same roster, and each person rolls the same dice for each cause each year whoever leads. What differs between two leaders' worlds comes from each leader's traits, which scale an event's outcome and pull the department heads' personalities, from what the model writes for each (events, department reports, choices), and from the states those leave. wm.replay(artifact) re-runs each between-turn step from the state the run started it from, without calling a model, and compares the result under canonical JSON with the state the run saved right after that step, before the turn's decisions; matches=false names the first divergence path. A run saved before the turn loop kept those snapshots gets an error saying replay cannot verify it, never a match or a mismatch; the FAQ says what replay proves. wm.forkFromArtifact(trunk, atTurn).simulate(altLeader) branches a counterfactual from any captured turn, the CWSM pattern.

PRNG methodology: Law & Kelton, Simulation Modeling and Analysis (5th ed., McGraw-Hill, 2015) · CWSM framing: Kirfel L. et al. (2025) · API surface: WorldModel.replay(), canonicalJson, firstDivergence in paracosm/runtime/world-model.

How does runtime tool forging work, and is it safe?

When a department agent needs a calculation the codebase doesn't provide, it writes one. A medical officer facing a radiation crisis writes a dose calculator. An engineer writes a structural load analyzer. The pipeline: specialist proposes a tool → Zod-validated input/output schema → JavaScript body authored by the LLM → run in QuickJS compiled to WebAssembly, in an instance of its own for each call, with a 10-second wall-clock limit and a 128 MB memory limit. The forge always rejects code that uses eval, Function, require, dynamic import, process, child_process or destructive fs.* calls, and paracosm grants forged code no network, file or crypto access. An LLM judge reviews the output against the specialist's stated intent — match approves, mismatch rejects. Approved tools land in a discoverable registry that subsequent turns and other actors pull from. Reuse via call_forged_tool costs tens of tokens; fresh forges cost full LLM tokens for proposal + body + scaffolding + judge. After turn three, most decisions invoke a previously-forged tool and total run cost flattens.

Implementation: AgentOS EmergentCapabilityEngine + EmergentJudge + ForgeToolMetaTool; the forged code runs in AgentOS's QuickJSExecutor behind paracosm's limits (forged-code-executor.ts), a WebAssembly instance of its own for each call.

What is the HEXACO personality model and why use it?

HEXACO is a six-factor framework with extensive cross-cultural validation: Honesty-Humility, Emotionality, eXtraversion, Agreeableness, Conscientiousness, Openness to Experience. It is a six-factor extension of the Big Five with Honesty-Humility split out as a separate axis. Each agent carries six continuous values in [0,1]; values drift across turns through three mechanisms encoded in the kernel (not in prompts): leader-pull (subordinate traits trend toward the commander's profile), role-activation (a chief engineer's conscientiousness creeps up), and outcome-reinforcement (a successful bold call reinforces openness). Personality biases which specialists are consulted, which decisions are accepted, and which tools get forged. Prompt-only personality dissolves under context pressure; kernel-encoded personality survives. The microbench is open at agentos-bench/HexacoEncodingBias.

Ashton, M. C. & Lee, K. Empirical, Theoretical, and Practical Advantages of the HEXACO Model of Personality Structure. Personality and Social Psychology Review, 11(2), 150-166 (2007). doi:10.1177/1088868306294907

Are leaders locked to human personality?

No. Paracosm ships a pluggable TraitModel registry with two built-ins: hexaco (Ashton-Lee six-axis human personality) and ai-agent (six axes for AI-system leaders: exploration, verification-rigor, deference, risk-tolerance, transparency, instruction-following). Each model declares its axes, drift table, and prompt cues. Custom models register in a single call: traitModelRegistry.register({...}). The same agent under two different leaders, on the same seed, becomes a measurably different entity by turn 12.

Ashton & Lee, PSPR 11(2), 2007 (HEXACO) · ai-agent v1 calibrated by Frame.dev, 2026 · Registry source: paracosm/engine/traits

Build with it

Can I build my own scenario?

Three paths. (1) Write a ScenarioPackage in TypeScript with custom hooks for progression, crisis generation, milestones, and politics — full control. (2) Write a scenario JSON draft and run it through compileScenario() — zero-code authoring, $0.10 per compile, caches to disk. (3) Pass a brief, paper, or URL to WorldModel.fromPrompt() and let an LLM draft the JSON contract first — the path the live demo uses. All three produce the same canonical ScenarioPackage and route through the same runtime. An Antarctic station, a submarine crew, a corporate org, a generation ship: different world contract, same engine, different future.

How does grounded compile work? What sources can I feed in?

Pass a brief, paper, URL, or JSON draft into the compiler. An LLM extracts topics, facts, and search queries; AgentOS WebSearchService fans out to Firecrawl, Tavily, Serper, and Brave in parallel; results pass through semantic dedup, RRF fusion, and Cohere Rerank v3.5 for neural relevance scoring. The resulting KnowledgeBundle ingests into an AgentOS sqlite-backed memory store. Every department analysis can recall semantically and cite the same sources you fed in. The orchestrator guarantees provenance: when the LLM omits citations, the research packet is auto-attached so the report always carries the sources the agent saw. Compile cost is roughly $0.10 and caches to disk by seed signature.

CLI: paracosm compile --seed-text / --seed-url · Library: compileScenario() / WorldModel.fromPrompt() in paracosm/engine/compiler · Reranker: Cohere Rerank v3.5

How is paracosm architected? Three layers, why?

Three layers, strict boundaries, no circular dependencies. Engine layer owns types and the deterministic kernel: SimulationKernel, SeededRng, ScenarioPackage types, Effect/Metric registries (~71 source files, TypeScript, Mulberry32, Apache-2.0). Runtime layer orchestrates simulations via 6 scenario hooks: Orchestrator, Director, Departments, Batch Runner, scenario-agnostic via progression and prompt hooks (~43 files, AgentOS, generateText(), SSE). CLI layer serves the dashboard, batch runner, and HTTP server (~30 files plus the React/Vite/Tailwind dashboard). The engine never imports from runtime; the runtime never imports from CLI. Underlying it all: @framers/agentos — agent() API, EmergentCapabilityEngine, EmergentJudge, ForgeToolMetaTool, AgentMemory.

Source layout: github.com/framerslab/paracosm/src · AgentOS: github.com/framerslab/agentos

Can I model a single subject (digital twin)?

Yes. The paracosm/digital-twin subpath is the curated entry: supply a SubjectConfig + InterventionConfig, get the same Zod-validated RunArtifact shape with artifact.subject and artifact.intervention populated for traceability. artifact.trajectory.timepoints[t].worldSnapshot carries per-timepoint metrics (e.g. HbA1c, weight, BMI for a clinical scenario; engagement, churn, ARPU for a product scenario). The kernel is domain-agnostic — the scenario contract names the world. Worked examples: Maria Chen, T2D, 12-week semaglutide protocol for clinical, SaaS mid-tier pricing introduction for product, Coastal congestion-pricing pilot for policy.

API: DigitalTwin.fromJson(scenarioJson).intervene({ subject, intervention, actor }) · Live route: POST /api/quickstart/simulate-intervention · Counterfactual semantics: Kirfel et al, AI & Ethics (2025); AXIS interrogation framework: arXiv 2505.17801 (May 2025).

Where can I see real input and output JSON?

Every method in the public API has its real input JSON and real output JSON captured in docs/COOKBOOK.md. One run threads through seven public surfaces: prompt-to-world, quickstart parallel leaders (runMany), branch at turn N (wm.forkFromArtifact), kernel replay (wm.replay), HTTP /simulate endpoint, digital-twin intervene(), batch dispatch (runBatch). Every JSON committed. Plus scripts/cookbook-e2e.ts in the repo runs the full pipeline against your scenario / leader profiles / seed and captures live fingerprints + per-metric deltas.

Cookbook: docs/COOKBOOK.md · End-to-end: scripts/cookbook-e2e.ts