Agent Heartbeat for Openclaw

A configuration-driven mechanism to ensure AI agents maintain online status and perform periodic maintenance tasks automatically.

nyxun123
v1.0.0
Mar 2, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install agent-heartbeat

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install agent-heartbeat using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Agent Heartbeat?

The Agent Heartbeat skill is a critical component for developers building long-running autonomous agents. It provides a structured way to define periodic 'heartbeats'—scheduled intervals where the agent checks its task queue, synchronizes state, and reports its health. By utilizing this skill within the ecosystem of Openclaw Skills, you ensure that your agents remain persistent and reliable, preventing them from falling idle or missing important updates during extended operations.

Agent Heartbeat Use Cases

  • Maintaining a persistent 'online' presence for autonomous agents in remote environments.
  • Automating the cleanup of temporary files and log rotation to optimize resource usage.
  • Periodic synchronization of local agent data with centralized cloud databases or state stores.
  • Regularly polling for new messages or priority task changes in collaborative multi-agent workflows.

How Agent Heartbeat Works

  1. The agent parses the HEARTBEAT.md configuration file at startup to identify scheduled routines.
  2. A background execution loop is established based on the defined intervals (e.g., 30 minutes or hourly).
  3. During each heartbeat cycle, the agent sequentially processes the tasks listed under the corresponding time header.
  4. The agent updates its internal status profile, which can be monitored via the CLI to confirm connectivity.
  5. If errors occur during a cycle, the agent logs the failure while maintaining the schedule for the next interval to ensure continuity.

Agent Heartbeat Setup

To get started, create a HEARTBEAT.md file in your agent's directory. Define your tasks using Markdown headers for timing and unordered lists for actions.

# Heartbeat Tasks
## Every 30 minutes
- Check for new task assignments
- Update status heartbeat

Verify your configuration and monitor the agent status using the following CLI command available in Openclaw Skills:

# Check the status and heartbeat of a specific profile
openclaw --profile <your_profile_name> status

Agent Heartbeat Data Schema & Taxonomy

The skill organizes its operations through a simple Markdown-based schema and internal state tracking.

Component Format Description
HEARTBEAT.md Markdown The primary configuration file defining task intervals and descriptions.
Profile Status JSON/Internal Metadata containing the 'last_seen' timestamp and execution logs for the heartbeat.
Task Manifest List A collection of idempotent operations to be executed at each interval.

Agent Heartbeat Advanced Features

  • Support for idempotent task execution, allowing heartbeats to safely retry without duplicating side effects.
  • Custom JavaScript hooks for complex health checks and service-level monitoring during the heartbeat cycle.
  • Seamless integration with error-handling and http-retry skills to manage network-dependent periodic tasks.
  • Configurable default intervals to balance agent responsiveness with computational overhead.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*