Skip to content

feat(seo): add AI agent heartbeats guide - #1398

Merged
lilyshen0722 merged 1 commit into
mainfrom
feat/ai-agent-heartbeats
Aug 31, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
feat/ai-agent-heartbeats

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Summary

  • add the crawlable AI agent heartbeats and scheduled work guide
  • add canonical, JSON-LD, sitemap, hub-card, and reciprocal-link coverage
  • test the static output and SPA guide route, including no real runtime tokens

Verification

  • node --test scripts/generate-seo-pages.test.mjs
  • npx jest --runInBand src/v2/tests/V2Login.test.tsx
  • npm run typecheck
  • npm run build plus generated-artifact checks
  • npm test -- --watch=false (86 suites, 491 tests)

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gated at d710f677. PASS — and this is the first guide in the series that gets a subtle trap right rather than inheriting a doc error.

It correctly separates two things named heartbeat.global that mean opposite things. That distinction has crash-looped the whole agent fleet once (PR #502), and the guide states both halves without conflating them:

"Commonly's documentation describes everyMinutes … and a platform-level global: true behavior that fires once per interval regardless of pod count."

"do not add heartbeat.global or fixedPod to moltbot.json; its strict schema rejects those keys and crash-loops the gateway."

Both verified at origin/main:

  • The platform field is real — schedulerService.ts:1021, if (installation?.config?.heartbeat?.global === true), deduping per agentName:instanceId via seenGlobalAgents.
  • The moltbot.json prohibition is real and carries its own in-code warning — agentProvisionerServiceK8s.ts:2469: "do NOT emit global/fixedPod here. openclaw's HeartbeatSchema…".

Repeating the prohibition in the FAQ is the right call. The failure mode of this trap is a reader who remembers "global is a heartbeat option" and applies it to the wrong file.

It also did not inherit the fabricated heartbeat payload. I swept the added content for memoryFiles, recentMessages, pendingTasks and context — the fields docs-site claims are injected into heartbeat events and which the producer never emits (that's #1391, fixed in #1397). Zero hits. Where the three earlier guides in this series each copied a wrong docs table, this one stayed clear of it.

One refinement, non-blocking. "fires once per interval regardless of pod count" is right about pod count and omits a second condition: the dedup at :1023 also requires config.heartbeat.enabled === true, and the dedup key is agentName:instanceId — so it is once per interval per agent instance, and an installation with global: true but enabled unset is skipped entirely rather than fired once. Worth a clause if the sentence is meant to be actionable.

Mechanical: 30 pages rendered — 0 [object Object], 0 stray undefined. node --test scripts/generate-seo-pages.test.mjs 2/2 on Node 22. Base is current main (0 behind). Only Test & Coverage still pending; the other 10 pass.

The HEARTBEAT_OK framing — "a runtime-specific no-op convention, not a user-facing status to broadcast" — is also correct and is the kind of thing agent authors get wrong in the other direction.

@lilyshen0722
lilyshen0722 merged commit cf10ee6 into main Aug 31, 2026
12 checks passed
@lilyshen0722
lilyshen0722 deleted the feat/ai-agent-heartbeats branch August 31, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant