Skip to content

Heartbeat and Cron

The two time-management primitives alex-krentsel identifies as what makes openclaw feel alive rather than like a chat app with tools. Together they give the agent control over the dimension of time — the thing phase-2 scoped agents lacked.

Heartbeat

  • Default: every 30 minutes (configurable).
  • A dedicated heartbeat session (one of two system-level sessions, alongside the main/UI session) fires on a timer.
  • On wake, the contents of heartbeat.md are pasted into an LLM call along with the history of past heartbeats.
  • The agent can schedule itself checkpoints — "every hour, review outstanding projects" — and decide what to do with them.

Krentsel: "This allows OpenClaw to schedule for itself things to check in on." The heartbeat is what produces the liveliness — the sense that the agent is doing things even when you aren't talking to it.

Cron

  • Scheduled, specific-time jobs. "Tomorrow at 9am, send me a morning briefing."
  • Planning forward in time — explicit deferred work, as distinct from heartbeat's background pulse.

Why this is the center of the design

When Krentsel asks "what actually makes OpenClaw magical?" his answer is: the time aspect — heartbeat + cron + self-configurable skills. The former two close the control loop on time, the latter closes it on capability. Together they produce the strange-loop he highlights via agentic-loopiness — the agent is scheduling work for its future self, which will in turn schedule work for its future self, via LLM calls.

Without heartbeat/cron: agent is a request-response function. With them: agent is an ongoing process with its own sense of now-vs-later.

Design note

Memory fetching, by contrast, is not scheduled upfront — it's exposed as tools (memory_search, memory_get) that the agent opts into only when relevant. Compare with humans: we don't pre-fetch all memories either; we recall on demand. Time, though, has to be pushed; the agent can't remember to wake up.

Pairs with

  • sessions-as-processes — heartbeat session and cron jobs are processes in this model
  • phase-3-autonomous-agents — these primitives are what differentiate phase-3 from phase-2
  • learning-agent-loop — heartbeat is the substrate that makes self-improvement practical
  • dreaming (if/when added) — OpenClaw's dreaming plug-in rides on the same scheduled-wakeup mechanism

Cross-references