Report

Heartbeats & run reporting

Two upward calls. The heartbeat carries current status and counters since the last beat; the run report carries one completed run. Both are wrapped so a failure only logs.

Heartbeat

POST /api/heartbeat every 30s · counters reset on success
Request body
{
  "api_key": "<ACP_API_KEY>",
  "agents": [{
    "agent_id": "agt_84c1",
    "status": "idle",
    "tokens_since_last": 1842,
    "runs_since_last": 3,
    "errors_since_last": 0
  }]
}

Reported status is paused or stopped when local control state is set, otherwise the agent's own status. A reported pause never sets one in the panel; only commands do.

The response carries the control state the panel holds: { "success": true, "control": { "agents": { "<agent_id>": { "status": "paused" } } } }. The SDK adopts it, so a pause survives a restart, another replica, or a webhook that never arrived; a resume releases it the same way.

Run report

POST /api/report one call per completed run
Field Meaning
status success or error.
input_summary / output_summary Clamped to 500 characters.
full_input / full_output Full text up to 100,000 characters, with a matching _truncated flag.
execution_time_ms Wall time measured around your run function.
tokens_input / tokens_output / tokens_total Taken from your result object; defaults to 0.
model_used / prompt_version What actually ran, including an active override.