Smart Agent Teams
EndpointsAgents

Wake Agent

Queue a run for the agent (a manual heartbeat). The run is only recorded here; an external runner executes queued runs. An optional `task_id` must belong to this company. If an identical run (same agent and task) is already queued, that run is returned instead of a new one. Fails with 400 `INVALID_STATE` for agents that are `paused`, `pending_approval` or `terminated`. Publishes `run.created`.

POST
/api/companies/{company_id}/agents/{agent_id}/wake

Queue a run for the agent (a manual heartbeat).

The run is only recorded here; an external runner executes queued runs. An optional task_id must belong to this company. If an identical run (same agent and task) is already queued, that run is returned instead of a new one. Fails with 400 INVALID_STATE for agents that are paused, pending_approval or terminated. Publishes run.created.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

agent_id*Agent Id
Formatuuid
company_id*Company Id
Formatuuid

Request Body

application/json
  1. body
reason?string|null
task_id?|null

Response Body

Successful Response

application/json
  1. response
agent_id*Agent Id
Formatuuid
cost_cents*Cost Cents
created_at*|null
ended_at*|null
error*string|null
heartbeat_at?|null
id*Id
Formatuuid
routine_id*|null
runner_id?string|null
started_at*|null
status*Status
summary*string|null
task_id*|null
tokens_in*Tokens In
tokens_out*Tokens Out
trigger*Trigger
curl -X POST "https://example.com/api/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/wake" \  -H "Content-Type: application/json" \  -d '{}'
{  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "cost_cents": 0,  "created_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "error": "string",  "heartbeat_at": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "routine_id": "f53c5ff7-cfb7-4f43-8b79-3421a01d8e2a",  "runner_id": "string",  "started_at": "2019-08-24T14:15:22Z",  "status": "string",  "summary": "string",  "task_id": "736fde4d-9029-4915-8189-01353d6982cb",  "tokens_in": 0,  "tokens_out": 0,  "trigger": "string"}