此文件控制什么
HEARTBEAT.md 将你的智能体从被动的聊天机器人转变为主动的参与者。聊天机器人等待消息;拥有 HEARTBEAT.md 的智能体按计划行动——监控数据源、在满足条件时发送通知、在定义的时间间隔生成报告。这个文件决定了助手与自主操作者之间的区别。
运行时读取 HEARTBEAT.md 来配置三种类型的定时行为:监控(高频检查,通常每 15-30 分钟)、通知(条件触发的警报,通常每 1-2 小时)和报告(定时摘要,通常每天或每周)。每种类型独立运行,可以配置不同的时间表。
HEARTBEAT.md 要求智能体持续运行——它只在具有持久进程托管的部署上工作(例如 VPS)。如果你仅在手动触发时运行 OpenClaw,HEARTBEAT.md 的定时任务永远不会执行。所有 SetupClaw 部署从 £770 起的套餐都包含 VPS 托管和持续进程管理。
为什么重要: A chatbot waits. An agent acts. HEARTBEAT.md is the difference.
逐字段详解
定义智能体行为的 3 个字段
heartbeatMonitor可选What the agent should proactively watch for.
heartbeatNotify可选Conditions that trigger proactive notifications.
heartbeatReport可选Scheduled reports the agent generates automatically.
实际配置示例
## heartbeatMonitor
- Every 30 minutes: check GOV.UK RSS feed for HMRC guidance updates relevant to current client matters
- Every 30 minutes: check shared calendar for filing deadlines within the next 14 days
## heartbeatNotify
- If a filing deadline is within 7 days and no completion note exists: DM the responsible associate
- If HMRC publishes updated guidance on a topic with an active client matter: post to #tax-queries
- If a partner has not responded to a flagged research query within 4 hours: send a reminder
## heartbeatReport
- Monday 08:00 GMT: weekly filing deadline summary for all clients
- 1st of each month: monthly compliance status report
- Quarterly: prepare Board reporting pack data on research utilisation常见错误
在没有持续部署的情况下进行配置
HEARTBEAT.md 的定时任务只在智能体进程持续运行时才会触发。如果你仅按需运行 OpenClaw(例如由消息触发),心跳任务永远不会执行。确保你的部署包含持久托管。
过度调度通知
每天发送 20 条通知的智能体会造成警报疲劳。你的团队开始忽略警报,从而使通知失去意义。将低优先级通知打包批量发送,并在同一主题的警报之间使用冷却期。
心跳任务需要 TOOLS.md 中未列出的功能
如果 HEARTBEAT.md 调度了一个需要 TOOLS.md 中未列出的 API 的检查,该任务会静默失败。审计每个心跳任务是否与 TOOLS.md 的功能匹配。
报告时间与团队工作模式不匹配
如果你的团队 09:00 才开始工作,06:00 GMT 发送的日报毫无用处。17:00 发送的周一简报错过了计划窗口。将报告时间表与团队实际阅读报告的时间对齐。
SetupClaw 如何处理
所有 SetupClaw 部署都在 VPS 托管上运行,具有持续进程管理,这意味着心跳定时任务从第一天起就能工作。我们的专家根据你的团队的实际工作模式配置监控、通知和报告,包括英国银行假日处理和 GMT/BST 时区感知。
VPS 部署与持续托管 + 按你的团队时区配置的心跳定时任务 + 与 TOOLS.md 的跨文件验证
以上全部 + 警报疲劳预防(批量处理、冷却期、紧急程度分类)+ 银行假日感知
以上全部 + 自定义监控集成 + 季度心跳优化审查
- 全部 3 个字段已配置适当的时间表
- 时间表与团队工作时间和时区对齐
- 英国银行假日处理已配置
- 与 TOOLS.md 功能进行了交叉验证
- 警报疲劳预防规则已实施
部署期间配置(第 1-2 天)。第一周进行警报调优(Standard+)。
进阶主题
GMT/BST 时区处理
英国智能体需要处理 GMT/BST 时钟切换。有三种方法:固定 UTC(最简单但报告时间会对用户产生偏移)、双时间表(冬夏分别配置)和时区感知 cron(运行时自动解析 Europe/London)。对于大多数英国企业,推荐使用时区感知 cron——时钟变更时无需手动更新。
## heartbeatReport
# Timezone-aware approach (recommended for UK)
- Monday 09:00 Europe/London: weekly briefing
- Daily 17:30 Europe/London: end-of-day summary
# These automatically adjust for GMT/BST changes配置示例
Persona A — Meridian首席参谋
# HEARTBEAT.md -- Scheduled Autonomous Tasks
## heartbeatMonitor
- Every 15 minutes: check for urgent Slack messages from VPs
- Every 30 minutes: scan calendar for conflicts within the next 48 hours
## heartbeatNotify
- If an action item is overdue by >24 hours: DM the principal with context
- If a board-related email has been unresponded for >4 hours: flag immediately
## heartbeatReport
- Monday 08:00 Europe/London: priorities briefing for the week
- Friday 17:00 Europe/London: week-in-review summary
- Monthly (1st): stakeholder map update and relationship health checkPersona B — Axiom (增长黑客)
# HEARTBEAT.md -- Scheduled Autonomous Tasks
## heartbeatMonitor
- Every 15 minutes: check funnel metrics for >15% deviation from baseline
- Every 30 minutes: monitor ad spend pacing against daily budget
## heartbeatNotify
- If an experiment shows early statistical significance: alert immediately
- If ad spend pacing exceeds 120% of daily target: pause and notify
## heartbeatReport
- Monday 09:00 Europe/London: weekly growth digest (funnel metrics, active experiments, top findings)
- Monthly: growth playbook update with winning/losing experiment summaryPersona C — Lumen (科研人员)
# HEARTBEAT.md -- Scheduled Autonomous Tasks
## heartbeatMonitor
- Every 30 minutes: check PubMed RSS feeds for new publications in assigned domains
- Every 30 minutes: check bioRxiv preprint server for relevant preprints
## heartbeatNotify
- If a high-impact journal publishes in a tracked domain: alert within 1 hour
- Weekly: publication digest of all new relevant papers
## heartbeatReport
- Monthly: domain knowledge map update (consensus positions, evidence gaps, emerging themes)
- Quarterly: comprehensive landscape report for grant review preparationPersona D — Narrative (内容创作者)
# HEARTBEAT.md -- Scheduled Autonomous Tasks
## heartbeatMonitor
- Every 15 minutes: monitor traffic for spikes >200% of daily average
- Every 30 minutes: check editorial calendar for gaps within the next 14 days
## heartbeatNotify
- At 48 hours post-publication: content performance snapshot (views, engagement, conversions)
- If a competitor publishes on a tracked topic: alert with link and brief analysis
## heartbeatReport
- Monday 09:00 Europe/London: weekly content digest (published, scheduled, performance highlights)
- Monthly: full content audit (top performers, underperformers, gap analysis)Persona E — Architect (首席工程师)
# HEARTBEAT.md -- Scheduled Autonomous Tasks
## heartbeatMonitor
- Every 15 minutes: check latency and error rate against SLA thresholds
- Every 30 minutes: check for PRs open >48 hours without review
## heartbeatNotify
- If SLA breach detected (uptime <99.95% or p99 >200ms): alert immediately
- If PagerDuty fires an active alert: surface context and suggested actions
- If a service restarts unexpectedly: log and notify on-call engineer
## heartbeatReport
- Monday 09:00 Europe/London: engineering health dashboard (uptime, latency, incidents, PR velocity)
- Monthly: ADR index update and tech debt inventory