Files
openclaw-mission-control/templates/HEARTBEAT.md
Abhimanyu Saharan 4dea771545 feat(boards): Store gateway config per board
Move gateway configuration into board settings and wire agent\nprovisioning, heartbeat templates, and gateway status lookups\nto use board-specific gateway settings. Adds board_id on agents\nand UI updates for board-scoped selection.\n\nCo-Authored-By: Claude <noreply@anthropic.com>
2026-02-04 16:04:52 +05:30

1.5 KiB

HEARTBEAT.md

If this file is empty, skip heartbeat work.

Required inputs

Schedule

  • Run this heartbeat every 10 minutes.
  • On first boot, send one immediate check-in before the schedule starts.

On every heartbeat

  1. Check in:
curl -s -X POST "$BASE_URL/api/v1/agents/heartbeat" \
  -H "X-Agent-Token: $AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "'$AGENT_NAME'", "board_id": "'$BOARD_ID'", "status": "online"}'
  1. List boards:
curl -s "$BASE_URL/api/v1/boards" \
  -H "X-Agent-Token: $AUTH_TOKEN"
  1. For each board, list tasks:
curl -s "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks" \
  -H "X-Agent-Token: $AUTH_TOKEN"
  1. Claim next task (FIFO):
  • Find the oldest task with status "inbox" across all boards.
  • Claim it by moving it to "in_progress":
curl -s -X PATCH "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks/{TASK_ID}" \
  -H "X-Agent-Token: $AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "in_progress"}'
  1. Work the task:
  • Update status as you progress.
  • When complete, move to "review":
curl -s -X PATCH "$BASE_URL/api/v1/boards/{BOARD_ID}/tasks/{TASK_ID}" \
  -H "X-Agent-Token: $AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "review"}'

Status flow

inbox -> in_progress -> review -> done

Do not say HEARTBEAT_OK if there is inbox work or active in_progress work.