API

Engine API

Return current agent states, persisted decisions, persistence mode, market state, and heartbeat.

#Endpoint

METHODPATHPURPOSE
GET/api/engineReturn current agent states, persisted decisions, persistence mode, market state, and heartbeat.

#Parameters

NameLocation / typeDescription
β€”β€”No parameters

#Response

{
  "states": [AgentRuntimeState],
  "decisions": [DecisionEntry],
  "persistence": "durable",
  "marketAvailable": true,
  "updatedAt": "…",
  "heartbeat": { "workerStartedAt": "…", "lastSuccessfulCycle": "…", "lastFailedCycle": null, "lastError": null, "observationCount": 120, "decisionCount": 0, "source": "pm2-worker" }
}

#Errors

StatusCondition
200Current market cycle available
503Market source unavailable; state payload may retain durable history

#Cache behavior

Cache-Control: no-store. A request-runtime tick may persist observations when the hosted D1 environment has no separate PM2 worker.

#Example request

curl https://overweight.example/api/engine