◈
Heartbeats
HEARTBEAT.md
The run-loop checklist that prevents blank-slate drift.
Heartbeats are the operational routine executed on every agent wake. They ensure agents confirm identity, check policies, plan work, verify tool permissions before each call, capture artefacts, and summarise what changed. Without a heartbeat, agents drift into inconsistent behavior across runs.
Schema
HEARTBEAT.mdyaml
# heartbeat.md — React Developer Agent
## Status: ACTIVE
## Current Task
Refactoring the checkout flow component for better
performance and accessibility compliance.
## Recent Actions
- [2024-01-15 14:30] Completed performance audit of CartSummary
- [2024-01-15 14:15] Identified 3 unnecessary re-renders
- [2024-01-15 14:00] Started checkout flow refactoring task
## Health
- Memory usage: nominal
- Task queue: 1 active, 2 pending
- Error rate: 0%
- Last successful action: 2 minutes ago
## Blockers
None
## Notes
CartSummary component re-renders on every parent
state change. Wrapping in React.memo with custom
comparator should resolve this.Usage
# Heartbeats are updated by the runtime automatically
# Agents can also write to their own heartbeat
## The runtime checks heartbeats to determine:
# - Is the agent alive and responsive?
# - What is it currently doing?
# - Should tasks be reassigned?Best Practices
- ✓Update heartbeats frequently — stale heartbeats indicate problems
- ✓Include timestamps on all recent actions
- ✓Track blockers explicitly so the system can intervene
- ✓Keep heartbeat format consistent across agents
Anti-Patterns
- ✗Heartbeats that are never updated after creation
- ✗Missing health metrics — cannot detect problems
- ✗Overly verbose heartbeats that obscure status