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...

    Interface SimulationState

    interface SimulationState {
        agents: Agent[];
        environment: Record<string, number | string | boolean>;
        eventLog: TurnEvent[];
        metadata: SimulationMetadata;
        metrics: WorldMetrics;
        politics: WorldPolitics;
        statuses: Record<string, string | boolean>;
    }
    Index
    agents: Agent[]
    environment: Record<string, number | string | boolean>

    Environment conditions from world.environment declarations (external context: market growth pct, radiation, depth, etc.). Keys are scenario-declared; always present (empty object when the scenario declares no environment fields).

    eventLog: TurnEvent[]
    metrics: WorldMetrics

    Numerical world state. The WorldMetrics fields below (population, morale, foodMonthsReserve, powerKw, etc.) are Mars/space heritage conveniences. Any scenario extends the bag via the [key: string]: number index signature without touching these defaults. Was colony pre-0.5.0, then systems 0.5.x-0.6.x, now metrics aligning with WorldSnapshot.metrics from the universal schema.

    politics: WorldPolitics
    statuses: Record<string, string | boolean>

    Categorical state from world.statuses declarations (governance state, faction alignment, funding round, etc.). Keys are scenario-declared; always present (empty object when the scenario declares no statuses).