Simulations are the core resource of the Kairos API. You can create them from pre-built scenarios or custom configurations, advance them tick-by-tick or in bulk, retrieve their full execution trace, and control agent policies and playback in real time.
All simulation endpoints require authentication. Write operations require the simulation:write scope; read operations require simulation:read.
Creates a new simulation instance. Provide either a scenarioId (to use a pre-built scenario) or an inline scenario object — not both.
Field Type Required Description scenarioIdstringOne of ID of a pre-built scenario scenarioobjectOne of Inline scenario configuration scenario.seednumberYes Random seed scenario.agentsAgent[]Yes Agent configurations scenario.initialStateobjectYes Starting state organizationIduuidNo Organization to bill against engineVersionstringNo Pin a specific engine version
"id" : " a1b2c3d4-e5f6-7890-abcd-ef1234567890 " ,
"scenarioId" : " capability-divergence " ,
"engineVersion" : " 1.4.4 " ,
curl -X POST https://api.anankelabs.ai/v1/simulations \
-H " X-Api-Key: krs_... " \
-H " Content-Type: application/json " \
-d ' {"scenarioId": "capability-divergence"} '
POST /v1/simulations/from-domain
Creates a simulation using a domain adapter. Domain adapters translate domain-specific input (e.g., AI Safety vocabulary) into the engine’s native scenario format.
Field Type Required Description domainstringYes Domain adapter identifier (e.g., "ai-safety") inputobjectYes Domain-specific input payload organizationIduuidNo Organization to bill against engineVersionstringNo Pin a specific engine version
Same shape as Create Simulation .
Status Code When 404NOT_FOUNDUnknown domain adapter
Creates and executes a simulation in a single request, returning the complete trace. This is the most convenient endpoint for batch workloads.
Field Type Required Description scenarioIdstringOne of Pre-built scenario ID domainstringOne of Domain adapter identifier inputobjectWith domain Domain-specific input payload ticksnumberYes Number of ticks to simulate (1–10,000) organizationIduuidNo Organization to bill against engineVersionstringNo Pin a specific engine version
Set Accept: application/x-ndjson to receive the trace as newline-delimited JSON, where each line is a trace step. This is useful for large simulations that would be expensive to buffer in memory.
"simulationId" : " a1b2c3d4-... " ,
"engineVersion" : " 1.4.4 " ,
"policy" : { "lambda" : 0.5 , "gamma" : 0.3 }
curl -X POST https://api.anankelabs.ai/v1/simulations/run \
-H " X-Api-Key: krs_... " \
-H " Content-Type: application/json " \
-d ' {"scenarioId": "capability-divergence", "ticks": 500} '
curl -X POST https://api.anankelabs.ai/v1/simulations/run \
-H " X-Api-Key: krs_... " \
-H " Accept: application/x-ndjson " \
-H " Content-Type: application/json " \
-d ' {"scenarioId": "capability-divergence", "ticks": 500} '
Returns a paginated list of simulations accessible to the authenticated identity.
Parameter Type Default Description organizationIduuid— Filter by organization (JWT users only; API keys use their own org) limitinteger50Results per page (1–200) offsetinteger0Pagination offset
"scenarioId" : " capability-divergence " ,
"organizationId" : " org-uuid " ,
"createdAt" : " 2025-06-15T10:30:00.000Z " ,
curl " https://api.anankelabs.ai/v1/simulations?limit=10 " \
Returns the current state of a single simulation.
Parameter Type Description iduuidSimulation ID
"scenarioId" : " capability-divergence " ,
"organizationId" : " org-uuid " ,
"createdAt" : " 2025-06-15T10:30:00.000Z "
Status Code When 401UNAUTHORIZEDNot authorized to access this simulation 404NOT_FOUNDSimulation does not exist
POST /v1/simulations/{id}/step
Advances an existing simulation by a given number of ticks.
Parameter Type Description iduuidSimulation ID
Field Type Required Description ticksnumberYes Number of ticks to advance (1–10,000)
curl -X POST https://api.anankelabs.ai/v1/simulations/a1b2c3d4-.../step \
-H " X-Api-Key: krs_... " \
-H " Content-Type: application/json " \
GET /v1/simulations/{id}/trace
Returns the full execution trace for a simulation that has been run. Supports both JSON and NDJSON streaming via the Accept header.
Parameter Type Description iduuidSimulation ID
"policy" : { "lambda" : 0.5 , "gamma" : 0.3 }
Field Type Description ticknumberThe simulation tick number movestringThe move that was applied stateobjectFull simulation state at this tick warningobject | nullWarning if stability threshold was crossed lossobject | nullBasin loss event, if one occurred agentsAgent[]Per-agent state and policy snapshot
Status Code When 404NOT_FOUNDSimulation not found or trace not yet available
curl https://api.anankelabs.ai/v1/simulations/a1b2c3d4-.../trace \
-H " X-Api-Key: krs_... " \
-H " Accept: application/x-ndjson "
PUT /v1/simulations/{id}/agent-policy
Updates the policy parameters for a specific agent within a running simulation.
Parameter Type Description iduuidSimulation ID
Field Type Required Description agentIdstringYes The agent to update policy.lambdanumberNo New lambda (latency/chaos) parameter policy.gammanumberNo New gamma (capacity/order) parameter
curl -X PUT https://api.anankelabs.ai/v1/simulations/a1b2c3d4-.../agent-policy \
-H " X-Api-Key: krs_... " \
-H " Content-Type: application/json " \
-d ' {"agentId": "frontier_model", "policy": {"lambda": 0.7}} '
PUT /v1/simulations/{id}/time-control
Controls playback of a running simulation — play, pause, or single-step.
Parameter Type Description iduuidSimulation ID
Field Type Required Description actionstringYes One of "play", "pause", or "step" speednumberNo Playback speed multiplier (0.1–10)
curl -X PUT https://api.anankelabs.ai/v1/simulations/a1b2c3d4-.../time-control \
-H " X-Api-Key: krs_... " \
-H " Content-Type: application/json " \
-d ' {"action": "play", "speed": 2.0} '