agent-heartbeat

Agent 心跳配置技能 — 配置 OpenClaw Agent 的定期心跳机制,保持在线状态,自动检查任务和更新。适用于需要长期运行的 Agent 任务。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agent-heartbeat" with this command: npx skills add nyxun123/agent-heartbeat

Agent Heartbeat 配置技能

触发词: heartbeat, 心跳, 定期任务, 在线状态, cron, schedule

问题

Agent 需要定期检查任务、保持在线状态、执行定时操作,但缺乏配置心跳的指导。

解决方案

通过配置 HEARTBEAT.md 文件,设置 Agent 定期执行的任务。

HEARTBEAT.md 配置

# Heartbeat Tasks

## 每30分钟检查一次
- 检查未完成的任务
- 发送在线状态更新
- 检查新消息

## 每小时执行一次
- 清理临时文件
- 备份重要数据
- 同步远程状态

OpenClaw CLI 配置

# 查看当前心跳配置
openclaw --profile <profile> status

# 心跳间隔默认为 30 分钟
# 可以通过配置文件修改

最佳实践

  1. 保持心跳任务轻量 - 避免在心跳中执行耗时操作
  2. 幂等性 - 心跳任务应该可以安全地重复执行
  3. 错误处理 - 心跳失败不应影响 Agent 正常运行
  4. 日志记录 - 记录心跳执行情况便于调试

示例:监控心跳

// 在心跳中检查服务状态
async function heartbeat() {
  const status = await checkServices();
  if (status.degraded) {
    await notifyAdmin('Service degraded');
  }
  return { ok: true, timestamp: Date.now() };
}

相关技能

  • error-handling - 错误处理模式
  • http-retry - HTTP 重试机制

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Anonyflow

AnonyFlow integration. Manage data, records, and automate workflows. Use when the user wants to interact with AnonyFlow data.

Registry SourceRecently Updated
Automation

Bulkgate

BulkGate integration. Manage data, records, and automate workflows. Use when the user wants to interact with BulkGate data.

Registry SourceRecently Updated
Automation

Sift

Sift execution governance for AI agents. Use this skill to authorize actions before executing them. Call sift_authorize before any consequential tool call —...

Registry SourceRecently Updated
2370Profile unavailable
Automation

GovernClaw Policy Enforcer

Governance middleware for OpenClaw agents. Wraps HTTP, shell, file, and browser actions with policy checks via GovernClaw before execution. Required tools -...

Registry SourceRecently Updated
2360Profile unavailable