heartbeat is an implementation of the KAIROS pattern, originally hidden in Claude Code. This tool operates silently in the background, autonomously managing tasks based on project context, and provides a unique way to keep engagement high while ensuring important items are never overlooked.
heartbeat is a model-agnostic daemon that implements the KAIROS pattern, originally concealed within Claude Code. This tool operates silently in the background, autonomously evaluating the project context every few seconds to determine if any actions need to be taken. Its primary function is to keep track of ongoing tasks and maintain daily logs without any manual intervention.
heartbeat receives periodic prompts, assessing whether to act based on the observed project state, effectively creating an intelligent system that optimizes workflow without continuous oversight.CLAUDE.md or README.md. It flags important items like TODOs, ensuring nothing crucial is overlooked.autoDream feature that consolidates observations and memories daily, ensuring a streamlined record of learned actions without data loss over time.This daemon operates continuously in the background, as shown in the following pseudo-tick logs:
tick #1 → [WAIT] No open issues or stale files detected
tick #2 → [WAIT] Tests passing, no action needed
tick #3 → [ACT] Found TODO in auth.py from 3 weeks ago — flagged in memory
tick #4 → [WAIT] Nothing urgent
...
[night] → autoDream: consolidating memory from today's observations
The heartbeat system is structured around a continuous loop that involves observing the project context, deciding whether to take action, and logging any changes made. This architecture enables sophisticated task management tailored to the needs of the project:
while True:
observe() ← read project context + memory
decide() ← act or wait?
if acting:
do_one_thing()
log_it()
update_memory()
sleep(interval)
# once per day:
autoDream() ← consolidate memory, compress observations
The system is compatible with any Anthropic model, making it versatile for various applications. Users can easily swap models in the heartbeat.py file, and contributions for additional model support from OpenAI, Gemini, or local models are welcomed.
The existence of heartbeat arises from the need to bring the functionality of the KAIROS pattern to the open-source community, as it remains locked behind internal access within Anthropic. It serves to enhance productivity and organization in software projects by implementing an efficient, self-sustaining agent.
Overall, heartbeat provides a robust solution for managing project tasks effectively, leveraging intelligent automation to reduce manual oversight and improve workflow efficiency.
No comments yet.
Sign in to be the first to comment.