hookpipe — Webhook Infrastructure for AI Agents
hookpipe receives webhooks from external services, queues them durably, and delivers them to your agent with automatic retries. Your agent never misses an event, even during restarts or downtime.
Why Use This
Without hookpipe, webhooks sent while your OpenClaw gateway is restarting or offline are lost forever. Most providers send once and move on. hookpipe sits in between — it's always online (Cloudflare Workers, 300+ edge locations), accepts the webhook immediately, and retries delivery to your gateway until it succeeds.
Quick Start
Local development (receive webhooks on your machine)
CODEBLOCK0
This creates a secure tunnel to your OpenClaw gateway. Paste the printed Webhook URL into your Stripe Dashboard. No port forwarding, no IP exposure.
Production setup (persistent, survives restarts)
CODEBLOCK1
hookpipe returns a Webhook URL — register it in Stripe's dashboard. Events are now durably queued and delivered to your gateway with retries.
Built-in Providers
CODEBLOCK2
| Provider | Events | Use case |
|---|
| stripe | paymentintent, customer, invoice, charge | Payment notifications |
| github |
push, pullrequest, issues, release | Code events, PR review |
|
slack | message, app_mention, reaction | Team notifications |
|
shopify | orders, products, customers | E-commerce events |
|
vercel | deployment, domain | Deploy monitoring |
Discover a provider's events:
CODEBLOCK3
Any other webhook service
Not limited to the 5 built-in providers. For any service already sending webhooks to your agent, use generic HMAC verification:
CODEBLOCK4
For services with non-standard signature formats, the community can create custom providers with defineProvider() — a single file that defines verification method, event types, and payload schemas. See Provider Design Guide.
Core Workflows
Stripe payment alerts
CODEBLOCK5
Agent receives failed payment events and can draft follow-up emails, create support tickets, or alert the team.
GitHub PR auto-review
CODEBLOCK6
Agent receives PR events instantly and can review code, post comments, or run checks.
Multi-provider monitoring
CODEBLOCK7
All events flow to your gateway through one durable pipeline. Restart your gateway freely — nothing is lost.
Monitor events in real-time
CODEBLOCK8
Stream events as they arrive. Pipe to scripts or other agents:
CODEBLOCK9
What Happens During Downtime
CODEBLOCK10
No manual replay needed. No events lost. Circuit breaker protects your gateway from being overwhelmed on recovery.
CLI Reference
CODEBLOCK11
All commands support --json for structured output and --dry-run for validation.
Key Facts
- - Runs on Cloudflare Workers — always online, $0 idle cost
- Retries with exponential backoff up to 24 hours
- Circuit breaker pauses delivery to unhealthy destinations
- Built-in idempotency (no duplicate deliveries)
- Apache 2.0 license, fully open source
- GitHub: https://github.com/hookpipe/hookpipe
hookpipe — AI代理的Webhook基础设施
hookpipe从外部服务接收webhook,将其持久化排队,并通过自动重试将其传递给您的代理。即使在重启或停机期间,您的代理也不会错过任何事件。
为什么使用这个
没有hookpipe,当您的OpenClaw网关重启或离线时发送的webhook将永久丢失。大多数提供商只发送一次就不再处理。hookpipe位于中间——它始终在线(Cloudflare Workers,300+边缘节点),立即接受webhook,并重试传递到您的网关直到成功。
快速开始
本地开发(在您的机器上接收webhook)
bash
hookpipe dev --port 18789 --provider stripe --secret whsec_xxx
这会创建一个到您OpenClaw网关的安全隧道。将打印的Webhook URL粘贴到您的Stripe仪表板中。无需端口转发,无需暴露IP。
生产环境设置(持久化,重启后保留)
bash
1. 部署hookpipe(一键部署到Cloudflare,或自托管)
2. 配置CLI
hookpipe config set api_url https://your-hookpipe.workers.dev
hookpipe config set token hf
skxxx
3. 将提供商连接到您的OpenClaw网关
hookpipe connect stripe \
--secret whsec_xxx \
--to http://localhost:18789/webhook \
--events payment_intent.*
hookpipe返回一个Webhook URL——在Stripe的仪表板中注册它。事件现在被持久化排队,并通过重试传递到您的网关。
内置提供商
bash
hookpipe providers ls
| 提供商 | 事件 | 使用场景 |
|---|
| stripe | paymentintent, customer, invoice, charge | 支付通知 |
| github |
push, pullrequest, issues, release | 代码事件,PR审查 |
|
slack | message, app_mention, reaction | 团队通知 |
|
shopify | orders, products, customers | 电商事件 |
|
vercel | deployment, domain | 部署监控 |
查看提供商的事件:
bash
hookpipe providers describe stripe --json
任何其他webhook服务
不限于5个内置提供商。对于任何已经向您的代理发送webhook的服务,使用通用HMAC验证:
bash
hookpipe connect my-service --secret mysigningsecret --to http://localhost:18789/webhook
对于具有非标准签名格式的服务,社区可以使用defineProvider()创建自定义提供商——一个定义验证方法、事件类型和负载模式的单一文件。参见提供商设计指南。
核心工作流
Stripe支付提醒
bash
hookpipe connect stripe --secret whsecxxx --to http://localhost:18789/webhook --events paymentintent.payment_failed
代理接收支付失败事件,可以起草后续邮件、创建支持工单或提醒团队。
GitHub PR自动审查
bash
hookpipe connect github --secret ghsecxxx --to http://localhost:18789/webhook --events pullrequest
代理立即接收PR事件,可以审查代码、发表评论或运行检查。
多提供商监控
bash
hookpipe connect stripe --secret whsec_xxx --to http://localhost:18789/webhook --name stripe-prod
hookpipe connect github --secret ghsec_xxx --to http://localhost:18789/webhook --name github-prod
hookpipe connect vercel --secret vsec_xxx --to http://localhost:18789/webhook --name vercel-prod
所有事件通过一个持久化管道流向您的网关。自由重启您的网关——没有任何丢失。
实时监控事件
bash
hookpipe tail --json
事件到达时流式输出。管道到脚本或其他代理:
bash
hookpipe tail --json | jq .event_type
停机期间会发生什么
您的网关在凌晨2:00宕机
↓
Stripe在凌晨2:15发送payment_intent.succeeded
→ hookpipe接受(202),持久化排队
↓
GitHub在凌晨2:30发送push
→ hookpipe接受(202),持久化排队
↓
hookpipe每隔几分钟重试传递(指数退避)
↓
您的网关在早上6:00恢复
→ hookpipe自动传递两个事件
→ 代理处理它们,就像什么都没发生一样
无需手动重放。没有事件丢失。断路器保护您的网关在恢复时不被淹没。
CLI参考
bash
hookpipe connect --secret --to [--events ]
hookpipe dev --port [--provider ] [--secret ]
hookpipe providers ls [--json]
hookpipe providers describe [--json]
hookpipe tail [--json] [--source ]
hookpipe events ls [--json] [--limit ]
hookpipe health [--json]
所有命令支持--json用于结构化输出,--dry-run用于验证。
关键事实
- - 运行在Cloudflare Workers上——始终在线,$0空闲成本
- 使用指数退避重试,最长24小时
- 断路器暂停向不健康目标传递
- 内置幂等性(无重复传递)
- Apache 2.0许可证,完全开源
- GitHub: https://github.com/hookpipe/hookpipe