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
| Name | Type | Required | Description |
|---|---|---|---|
agent_id | string | no | A stable id for this agent. Default default. |
status | string | no | online, or any short state. Default online. |
strategies | array of object | no | The strategies it is running. |
meta | object | no | Anything else to show on the dashboard (no secrets). |
Request
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"]}'from langbot import LangbotClient
async with LangbotClient() as lb: # reads LANGBOT_API_TOKEN
await lb.agent_heartbeat({"agent_id": "laptop", "status": "online", "strategies": ["MentionSniper"]})import { LangbotClient } from "@langbotai/sdk";
const lb = new LangbotClient(); // reads LANGBOT_API_TOKEN
await lb.agentHeartbeat({ agent_id: "laptop", status: "online", strategies: ["MentionSniper"] });Response
200 OK
{ "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
| Status | code | When |
|---|---|---|
| 401 | auth_required | No token was sent. |
| 401 | token_invalid | The token was not recognised (mistyped, revoked or expired). |
| 422 | validation_error | A parameter failed validation; detail[].loc names it. |
| 429 | rate_limited | Over your request budget; wait Retry-After seconds. |
Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.