Heartbeat-gateway: Event-driven replacement for cron polling in OpenClaw

What heartbeat-gateway does
Heartbeat-gateway is an event-driven replacement for cron-based heartbeat polling in OpenClaw. Instead of polling every 30 minutes to check if anything changed, it receives webhooks from external tools and processes them immediately.
Key details from the source
The tool was built to address high API costs from OpenClaw's default heartbeat polling. At default settings, polling every 30 minutes costs approximately $86/month. The author notes that while OpenClaw has added lightContext and isolatedSession optimizations, these still involve polling rather than event-driven architecture.
Heartbeat-gateway works by:
- Receiving webhooks from GitHub, Linear, and PostHog
- Running a zero-cost pre-filter with repo/project/branch scoping and always-drop lists
- Classifying qualifying events against your
SOUL.mdwith a lightweight LLM call (~200 tokens) - Writing actionable items directly to
HEARTBEAT.mdfor your agent to read
Performance improvements:
- Cost reduction: ~$4.50/month vs ~$86/month
- Latency improvement: under 2 seconds vs up to 30 minutes
Technical specifications:
- Version: v0.1.1
- License: Apache-2.0
- Language: Python 3.11+
- Status: Live in production with 134 tests passing
Limitations and future plans
The tool is not a complete replacement for cron - temporal tasks like daily digests and scheduled synthesis still need cron. It specifically handles reactive events that tools can push via webhooks.
Current limitations include manual setup and rough onboarding. The author plans to build a "gateway doctor" config validator and easier deploy options if adoption grows.
Areas for feedback
The author is seeking feedback on:
- The
SOUL.mdclassifier interface - whether reading the first 500 characters makes sense or if a different context strategy would be better - Pre-filter scoping - whether repo/project/branch level control is sufficient or if event-type level control is needed
- Additional webhook sources - currently supports GitHub, Linear, PostHog; considering Slack, Sentry, Jira next
Architecture notes: The author is a PM, not a software engineer, and built this with Claude Code. The code is functional and tested but may have patterns that experienced Python developers could improve.
📖 Read the full source: r/openclaw
👀 See Also

Building a Self-Updating Writing Style Guide for AI-Assisted Content
A team building a voice extraction platform called Noren has developed a 117-line Markdown style guide that rewrites itself after every published piece, using Claude to enforce rules and banning AI-sounding words like 'cadence' and 'optimize'.

Focusmo macOS app adds local MCP server for Claude AI integration
Focusmo, a macOS focus app, now includes a local MCP server that allows Claude AI to access real focus data for weekly reviews and planning. The server runs locally on Mac with no external servers required, keeping all data on-device.

Agent Safehouse: macOS-native sandboxing for local AI coding agents
Agent Safehouse is a macOS-native sandboxing tool that prevents local AI agents from accessing files outside your project directory using kernel-level enforcement. It's a single shell script with no dependencies that works with Claude Code, Codex, OpenCode, Amp, Gemini CLI, Aider, Goose, Auggie, Pi, Cursor Agent, Cline, Kilo, Code Droid, and other agents.

Building a Sub-500ms Voice Agent: Architecture and Performance Insights
A developer built a voice agent from scratch achieving ~400ms end-to-end latency with full STT → LLM → TTS streaming. Key insights include treating voice as a turn-taking problem, using semantic end-of-turn detection, and colocating all components for minimal latency.