PARACOSM AGENTOS | API Reference v0.9.1035
Home Simulation API Docs GitHub npm
Home Simulation API Docs GitHub npm AgentOS Discord
paracosm - v0.9.1035
    Preparing search index...

    Module paracosm/swarm

    paracosm/swarm — focused API surface for the agent-swarm view of a paracosm run. Pairs with paracosm/schema (types) and root WorldModel static helpers; use this module when you only need swarm inspection without pulling the full WorldModel surface.

    import { getSwarm, swarmByDepartment, moodHistogram } from 'paracosm/swarm';

    const swarm = getSwarm(runArtifact);
    if (swarm) {
    console.log(`${swarm.population} agents`);
    console.log(swarmByDepartment(runArtifact));
    console.log(moodHistogram(swarm));
    }

    Every function is a pure projection over the public RunArtifact shape. No I/O, no side effects, no live LLM calls.

    aliveCount
    deathCount
    departmentHeadcount
    getSwarm
    moodHistogram
    swarmByDepartment
    swarmFamilyTree
    SwarmAgent → SwarmAgent
    SwarmSnapshot → SwarmSnapshot