heartbeat
Installation
SKILL.md
Heartbeat Orchestrator
The Heartbeat skill acts as the background processor for the Agentic OS. It reads the .agent/state/tasks.json queue, identifies pending tasks, routes them to the appropriate skills, and updates the task status upon completion.
How it works
Use the heartbeat.py script in this skill's scripts/ directory to manage the queue:
- Discover scoped queues: Run
heartbeat.py scopesfirst if you don't know what to work on. It lists every poppable queue under_<batch>_extension.<queue>paths with ready/in-progress/completed counts. - Pop Task: Run
heartbeat.py pop(legacy mode) orheartbeat.py pop --scope _round3_extension.ag_implementation_queue(scoped mode) to get the next task. If_*_extensionqueues exist intasks.json, pop without--scopewill refuse with exit 11 — pass the matching--scope. - Execute: Read the task details and use the appropriate skill (e.g.,
osint,deep-research) to fulfill the task. - Resilience & Retry: If a task fails unexpectedly, autonomous agents MUST attempt to retry the task logic up to two times before formally failing.
- Complete/Fail: Run
heartbeat.py complete <task_id> --scope <path> --outcome '{"result": "..."}'(scoped) orheartbeat.py complete <task_id> --outcome '...'(legacy). Failing logs to.agent/state/errors.json.
Path varies by agent:
- Gemini / Antigravity:
python3 ~/.gemini/skills/heartbeat/scripts/heartbeat.py … - Claude:
python3 ~/.claude/skills/heartbeat/scripts/heartbeat.py …
(Both paths resolve through symlinks to the same canonical script in ~/github/claude-skills, so behavior is identical.)