← Tech
Exploration Design stage — this describes architecture being explored, not what's currently built.
Sleep Wake Check Work repeat on schedule

Heartbeat & Automation

21 Mar 2026 · Tristan Wright

Agents That Work While You Sleep

Not all agent work happens in a chat window. CollectHive’s target architecture has four layers of autonomous execution, each with appropriate scope and constraints. The Amber Monitor already runs basic collection and analysis via launchd, but the full per-user and per-project heartbeat system described here is planned, not yet built.

Four Execution Layers (Target Design)

Chat — Human in the Loop

The standard interactive mode. You talk, the agent responds. Full access to your memory pool and inherited hive knowledge. No constraints because you’re watching.

User Heartbeat — Daily Check-in (Planned)

A timer-driven agent that would review your scope once a day. It could read your memories and projects but not hive-scope sensitive data. It might surface stale memories for revalidation, flag things that need attention, or prepare a daily briefing.

Project Heartbeat — Per-Project Pulse (Planned)

A configurable timer scoped to a single project. It would read the project’s memories plus inherited user/hive memories. Useful for monitoring a deployed app, checking CI status, or reviewing recent changes.

Cron Job — Scheduled Task (Planned)

A one-shot or recurring task on a schedule expression. Would run in an isolated session with project-scope access. Fully audited. Good for generating reports, running health checks, or syncing data.

The Key Constraint

In the target design, heartbeats and cron jobs would read from their scope and all parent scopes. They’d write only to their own scope level. Promotion across scope boundaries would always be an explicit human action. No autonomous agent could push knowledge into hive scope.

This prevents feedback loops (bad memory, more bad memories) and ensures the promotion bridge stays human-controlled.

Technical Detail — Execution Layer Comparison
LayerTriggerMemory AccessCan Write ToConstraints
ChatHuman messageFull user pool + inherited hiveUser + project scopeNone (human in loop)
User heartbeatDaily timerUser scope only (no hive sensitive)User scopeAction budget, circuit breaker
Project heartbeatConfigurable timerProject scope + user inheritanceProject scopeAction budget, no promotion
Cron jobSchedule expressionIsolated session, project scopeProject scopeOne-shot or recurring, audited

Action budgets would limit how many write operations a heartbeat can perform per cycle. Circuit breakers would halt execution if the agent encounters errors or unexpected state — it stops and reports rather than retrying blindly.

These patterns are adapted from OpenClaw’s proven heartbeat model, with scope isolation added for multi-tenant operation.