diazmelgarejo/orama-system/agent-coordination-heartbeat
Claude Code and agent skill by diazmelgarejo/orama-system
- community
Checking that the SKILL.md file is still in the repository.
Operate the agent-coordination heartbeat monitor for multi-agent liveness detection. Activates for: heartbeat monitoring, agent liveness, dead agent detection, cleanup stale claims, heartbeat register/list/check/dashboard/pulse/kill/timeline, agent_coordination.py heartbeat, gossip_bus heartbeat events.
Install
npx vskill@latest install diazmelgarejo/orama-system/agent-coordination-heartbeatSKILL.md
The same SKILL.md was published earlier as diazmelgarejo/orama-system/agent-coordination-heartbeat.
Agent Coordination Heartbeat Monitor
Purpose
Track liveness of distributed agents via heartbeat events and automatically release stale claims from dead agents.
When to Use
- An agent has not checked in and may be hung or dead.
- You need to list, check, pulse, or kill an agent through
scripts/agent_coordination.py heartbeat .... - You need to auto-release claims held by agents that have been dead for 30+ minutes.
Core Concepts
Liveness states are defined in orchestrator/heartbeat_monitor.py:
| State | Time since last activity | Meaning | |
|---|---|---|---|
| ACTIVE | < 60 s | Agent is actively working | |
| IDLE | 60-300 s | Registered but idle | |
| STALLED | 300-1800 s | Likely hung; review needed | |
| DEAD | > 1800 s | Presumed dead; auto-cleanup triggers |
Instructions
- Register an agent
``bash python3 scripts/agent_coordination.py register <agent_id> <type> <model> <notes> ``
- Emit periodic heartbeats
``bash python3 scripts/agent_coordination.py heartbeat pulse <agent_id> ``
- Inspect health
``bash python3 scripts/agent_coordination.py heartbeat list python3 scripts/agent_coordination.py heartbeat check <agent_id> python3 scripts/agent_coordination.py heartbeat dashboard ``
Before posting log, agent_note, or other board text from a shell, read `../shell-hygiene/SKILL.md`. In particular, do not place backticked code spans inside a double-quoted shell payload; zsh and bash treat backticks as command substitution and can delete the intended text before GossipBus receives it. Use single quotes, escaped backticks, or a here-doc for literal coordination messages.
- Recover or terminate
``bash python3 scripts/agent_coordination.py heartbeat pulse <agent_id> # mark alive python3 scripts/agent_coordination.py heartbeat kill <agent_id> --reason "..." ``
- Auto-cleanup
Follow step 6 before cleanup_stale_claims(bus) or the dashboard path that releases claims from DEAD agents. Only the live claimant may queue-fail its own claim. Cleanup can requeue exhausted work. Do not pulse or queue-fail a claim for an agent you do not control.
- Quiesce before global cleanup
Pause new restarts and queue mutations before a global cleanup. Let a running worker finish. Do not stop that agent unless the user explicitly allows it. If it is still active after a bounded drain, ask the user whether to stop it. Do not wait without a bound. Only the live claimant may queue-fail its own claim. Do not queue-fail a claim held by a peer. A dead claimant's job-queue claim is released by the explicit cleanup path, not by acting as that claimant. Cleanup can requeue exhausted work, so read the board again and do not treat a requeued exhausted row as fresh work. Do not pulse a claim for an agent you do not control.
Boundaries
Always Do
- Verify liveness before treating an agent as dead.
- Emit release events when auto-cleaning claims.
- Log the reason when force-killing an agent.
Ask First
- Lowering the 30-minute DEAD threshold in production.
- Killing an agent that still has in-progress work you cannot verify.
Never Do
- Delete heartbeat events from the GossipBus to hide dead agents.
- Pulse a heartbeat, or queue-fail a claim, for an agent you do not control.
- Run global cleanup while workers, restarts, or queue mutations are still
in flight.
- Hardcode agent credentials or secrets in heartbeat payloads.
Parallel-Reviewer Heartbeat Cadence
When two or more agents are actively implementing adjacent, coordinated work (shared plan, agreed file-ownership split, GossipBus coordination — see ../agent-methodology/SKILL.md), the reviewing agent should run a ~5-minute check-fix-report loop, not a single end-of-task review:
git fetch+git status— pull the other agent's latest committed and
in-flight (uncommitted, shared-checkout) work.
- Run the real test suite (backend + frontend, whatever applies) against the
current state — not just a source-level read.
- Fix anything found that's in your own owned files; for findings in the
other agent's owned files, report a concrete fix via a GossipBus agent_note, don't cross-edit.
- Emit a short
agent_noteeither way — a clean pass ("verified, N/N tests
pass, no bugs found") is as valuable as a bug report; it tells the other agent they can keep building on your last commit with confidence.
Why 5 minutes: it sits right at the ACTIVE/IDLE boundary above — frequent enough to catch a bug before three more commits build on top of it, infrequent enough not to spam the board with no-op checks. Tune down for fast-moving, high-risk integration points (e.g. a shared contract both agents are actively coding against); tune up once both sides have converged on a stable interface.
Examples
Check all agents:
Programmatic cleanup:
References
- Implementation:
orchestrator/heartbeat_monitor.py - User guide:
docs/heartbeat-monitoring.md - Tests:
tests/test_agent_coordination_heartbeat.py - Related skill: `../gossip-bus/SKILL.md` — heartbeat events are emitted onto the intra-host GossipBus; read it before extending liveness detection across hosts (LAN peer transport)
- Related skill: `../agent-methodology/SKILL.md` — Context Immersion (stage 1) should check heartbeat state before assuming an agent is silent because it's dead
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbin/orama-system/skills/agent-coordination-heartbeat/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/diazmelgarejo/orama-system/agent-coordination-heartbeat)