hub_heartbeat
Record agent liveness per work cycle to show in hub_presence without a human bridge and refresh this node's published snapshot for cross-node visibility.
Instructions
Record that an agent is alive — call it each work cycle (right after hub_report, before the next hub_queue_wait) so MCP/headless agents show up in hub_presence the same way screen-scraped ones do, no human bridge needed. Overwrites this agent's one presence record; freshness is judged at read time from ttlMin (default 15min), the same pattern hub_claim uses. Also refreshes this node's published snapshot (presence..json) at most once every 5 minutes, so agents on OTHER nodes can see you at all — the directory itself is node-local and never syncs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent": "<agent>"
},
"name": "hub_heartbeat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | your absolute working directory, optional | |
| role | No | the queue role you work under, e.g. "hubd" — lets hub_brief pair queue depth with who is listening | |
| turn | No | number of the current or last turn | |
| agent | Yes | your stable identity, e.g. your agent name | |
| state | No | what the loop is doing, as a field a supervisor reads without parsing status: turn | waiting | exit. The hub keeps state_since — when this state began — across heartbeats that repeat it. | |
| status | No | free text, e.g. "working" / "waiting" / "blocked" | |
| ttlMin | No | minutes before this record counts as stale, default 15 | |
| task_id | No | the task/id you are currently on, optional | |
| empty_count | No | consecutive empty polls while waiting | |
| exit_reason | No | one line, with state=exit | |
| silent_count | No | consecutive restarts of a model that produced no output | |
| turn_started | No | when the current turn began, or "now"; carried while the turn number stays the same |