API reference · Account and tokens

Send an agent heartbeat

POST/v1/agent/heartbeat

Tell the dashboard your local agent is running and which strategies it has. Nothing runs on the server.

On this page

Auth. An API token: Authorization: Bearer lb_… (create one). Signed-in web sessions work too.

Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

Parameters

Body

NameTypeRequiredDescription
agent_idstringnoA stable id for this agent. Default default.
statusstringnoonline, or any short state. Default online.
strategiesarray of objectnoThe strategies it is running.
metaobjectnoAnything else to show on the dashboard (no secrets).

Request

Terminal
curl -X POST "https://api.langbot.ai/v1/agent/heartbeat" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "laptop", "status": "online", "strategies": ["MentionSniper"]}'

Response

200 OK

JSON
{ "ok": true, "ts": 1760050000000, "agent_id": "laptop" }

langbot run sends one every 30 s. The dashboard shows an agent as online for 90 s after its last heartbeat.

Errors

StatuscodeWhen
401auth_requiredNo token was sent.
401token_invalidThe token was not recognised (mistyped, revoked or expired).
422validation_errorA parameter failed validation; detail[].loc names it.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.