返回顶部
a

agent-heartbeatAgent心跳配置

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

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
520
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

agent-heartbeat

Agent Heartbeat 配置技能

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

问题

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

解决方案

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

HEARTBEAT.md 配置

markdown

Heartbeat Tasks

每30分钟检查一次

  • - 检查未完成的任务
  • 发送在线状态更新
  • 检查新消息

每小时执行一次

  • - 清理临时文件
  • 备份重要数据
  • 同步远程状态

OpenClaw CLI 配置

bash

查看当前心跳配置


openclaw --profile status

心跳间隔默认为 30 分钟

可以通过配置文件修改

最佳实践

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

示例:监控心跳

javascript
// 在心跳中检查服务状态
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 重试机制

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agent-heartbeat-1776282342 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-heartbeat-1776282342 技能

通过命令行安装

skillhub install agent-heartbeat-1776282342

下载

⬇ 下载 agent-heartbeat v1.0.0(免费)

文件大小: 1.62 KB | 发布时间: 2026-4-16 18:32

v1.0.0 最新 2026-4-16 18:32
Initial release of agent-heartbeat.

- Provides configuration guidelines for OpenClaw Agent's periodic heartbeat mechanism.
- Explains how to schedule regular tasks via a HEARTBEAT.md file.
- Includes best practices for heartbeat task design: lightweight, idempotent, fault-tolerant, and with logging.
- Offers sample configuration and code snippets for setup and monitoring.
- Lists related skills for enhanced error handling and retry support.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部