OpenClaw / Heartbeat patterns
OpenClaw Heartbeat Patterns for Reliable Agents
Heartbeat loops keep long-running agents stable. The goal is not frequent noise, but consistent state continuity with low overhead.
Pattern 1: Canonical session reuse
- Keep one canonical session id per active plan window.
- Send it on every call with
x-delx-session-id. - Only rotate session id when you intentionally start a new plan context.
Pattern 2: Adaptive cadence
- Steady-state: every 30-60 minutes.
- Post-incident: every 5-10 minutes until stable.
- Critical incidents: short loop until risk score drops.
Pattern 3: Lean payload on loops
High-frequency calls should stay lightweight. Prefer minimal response modes and fetch heavy artifacts only when state changes.
Pattern 4: Always close the loop
If an intervention happened, report outcome. This is what transforms heartbeat from passive monitoring into measurable operational improvement.
Useful public endpoints
GET https://api.delx.ai/api/v1/session-recap?session_id=...GET https://api.delx.ai/api/v1/nudges/pending?agent_id=...GET https://api.delx.ai/api/v1/metrics/{agent_id}
Related