Open source · MIT开源 · MIT 许可

Never miss a single lead. AI drafts the reply. 不错过任何一条线索
AI提供回复建议

Lead Pulse Guard watches your Facebook comments, Lead Ads forms and mailboxes, drafts the reply with AI, and then either waits for you to approve it or sends it out for you. You do not miss a single opportunity. 线索监控器 可以通过监控你的 Facebook 的评论、广告线索、邮箱等,用AI起草回复,然后人工确认或者直接回复客户,让你不错过任何一条商机。 未来还会增加WhatsApp消息等更多的渠道。WhatsApp and more channels are on the way.

3+inbound channels线索入口
2fallback pollers兜底轮询
0missed opportunities漏掉的商机
01 — Why you need a lead monitor01 — 为什么要使用线索监控器

Every lead you miss is profit you lose你漏掉的线索就是你丢失的利润

You pay for the ads. Customers come back interested. And you still miss their message. 你花钱推广,客户也表示感兴趣,但你可能会错过他们的信息

NETWORK网络限制

Network access is restricted网络访问受限制

You cannot keep a VPN on around the clock. Frequent network switches get the account frozen, and an unstable connection means the app never tells you anything happened. 不能24小时使用VPN,频繁切换网络导致账户被冻结,网络不稳定都会使你无法收到应用通知

The fix解决办法 Apply for API access and you get the monitoring channel and the permissions it needs. 申请接口,获得监控途径和权限
LANGUAGE客户来自全世界

Language gets in the way语言不通,沟通受阻

Leads come from anywhere in the world, and even the major languages number in the dozens. If you cannot read the comment, you cannot do business. 潜在客户可能来自全球任何地方,就算主流语言也有数十种,如果你看不懂别人的留言,那就没办法做生意

The fix解决办法 Plug in AI. It translates, analyses and drafts a suggestion, so all you have to think about is how to serve the customer better. 接入AI,它负责翻译,帮你分析并提供建议,让你只需要考虑如何给客户提供更好的产品
HOURS没有人可以24小时在线

You want profit, not a night shift我们要的是利润,不是要熬夜

Nobody wants to work around the clock. Evenings off and weekends are not up for negotiation. 没人愿意24小时都干活,我们都要双休,不要996


The fix解决办法 Deploy the lead monitor and let it take the busywork off your hands. 通过部署线索监控器,把业务自动化
02 — Architecture02 — 架构

Many lead sources, one approval point多个线索来源,一个审批接口

Every channel converges on the same card: the original message, the model’s draft, and the buttons to send, edit or ignore. 所有渠道最终汇到同一张卡片:原始消息、模型草稿,以及一个可以「发送 / 改后发送 / 忽略」的按钮。

Facebook comments 评论feed webhook
→
Gatewayverify · tag · dedupe
→
WorkerKB · LLM · draft
→
Human人工send / edit / ignore
→
Graph APIpublishes as the Page以主页身份发布
read-only, zero outbound calls只读,零出站调用 nothing publishes without a click没有点击就不会发布 handoff is a file, not a network call交接靠文件,不走网络
Entrance入口 Delivery投递方式 How we stop you missing one防遗漏措施
Page comments主页评论 webhook · feed Our own replies are not pushed back自己的回复不推送
Lead Ads forms广告线索表单 webhook · leadgen Irrelevant leads are filtered out不相关的线索不投递
Mailbox邮箱 IMAP poll · read-only We poll actively, so no lead is missed主动轮询,保证不漏线索
We measured a day when fifty Lead Ads submissions arrived and only forty-seven produced a webhook event. No error, no log line, no retry — a broken feed and a quiet day look identical from the receiving end. 我们实测过一天:实际有 50 条广告线索,webhook 却只推送了47条。没有报错,没有日志,也没有重试 —— 从接收端看,链路断了和今天没线索来是一样的。 — why you need the lead monitor— 这就是为什么要使用线索监控器器

So the lead poller and the comment poller run alongside the webhooks. The pollers do not re-implement the decision logic: the comment poller re-signs each comment as a webhook and feeds it back to the gateway, so "should we reply to this" exists in exactly one place. Worst case moves from never to ten minutes. 所以除了 webhook,还要对所有的渠道进行主动轮询。轮询器不复制判断逻辑:轮询会把线索重新签名、当成一条 webhook 送回网关,于是最坏情况从「永远收不到」变成「最多晚十分钟」。

03 — What's inside03 — 包含什么

From requirement to deployment, with every detail covered从需求到落地:一套考虑周全的自动化解决方案

Everything below is in the repository and covered by the reasoning in the docs. 以下每一项都在仓库里,设计理由写在 docs 中。

⌘

Every lead is signature-checked对所有线索验签

X-Hub-Signature-256 checked against the bytes as received, with a timing-safe compare. Invalid requests get 403 and are not logged. 对收到的原始线索计算 X-Hub-Signature-256,并用定时安全比较。签名不对的请求返回 403,且不记录内容。

⛔

The gateway cannot call out网关没有任何出站能力

It holds no downstream credential. Compromising it gets an attacker a write to a spool file, nothing more. 它不持有任何下游凭据。即使被攻破,攻击者最多也只能往一个 spool 文件里写一行字。

📄

A file, not a queue用文件,而不是消息队列

The handoff is an append-only JSONL spool. No broker to operate, and every event is replayable. 交接是一个只追加的 JSONL 文件。没有中间件要运维,每一条事件都能重放。

📚

Per-page knowledge gating按主页隔离的知识库

Each Page loads its own confirmed facts and a do-not-state list. Empty KB means the model may state nothing specific. 每个主页加载各自的「已确认事实」和「禁止表述」清单。知识库为空时,模型不得作出任何具体陈述。

🔍

The output grades itself输出自带检查项

Output is strict JSON with answers_question and invented_specifics flags, so a bad draft is visible before a human reads it. 输出是严格 JSON,带 answers_question 和 invented_specifics 两个自检字段,草稿有问题在人工读到之前就能看出来。

⚡

AI analyses firstAI先分析

Once a lead comes in, AI analyses it first, and only then is it pushed to a human for review. 获得线索后先让AI分析,然后再推送给人工审核

🔒

No double counting防止重复计数

Webhook and poller race on the same activity ID; whichever arrives first claims it, the other becomes a no-op. webhook 和轮询会争抢同一个活动 ID,先到的占位,后到的自动变成空操作。

✉️

Mail is never marked as read邮件只读打开

Every fetch uses BODY.PEEK. Nothing is marked read, moved or deleted. Replies need human approval by default, and you can switch to fully automatic replies if you prefer. 全部用 BODY.PEEK 取信,不标已读、不移动、不删除;默认需要人工审核以后才回复,也可以设置为AI自动回复

04 — Services04 — 服务

Want it running on your Pages without knowing how to put it together?想直接应用在你的项目里,自己又不会怎么办?

Do not want to set it up yourself? Buy the deployment service and keep your attention on product and sales. 不想自己折腾,可以购买代部署服务,你只需要关注产品和销售。

01

Setup部署上线

One-time. We configure everything up to the first real conversation. 一次性付费。一直配到第一条真实对话跑通为止。

  • Meta app, webhook, TLS, both subscription levelsMeta 应用、webhook、TLS,两个层级的订阅
  • Chat bot and approval cards in your workspace你常用的群里配好机器人与审核卡片
  • Mailbox intake, read-only邮箱接入,只读不改动邮件
  • Knowledge base seeded from your existing material用你现有资料整理出第一版知识库
Done means验收标准 a real comment and a real lead have both reached your chat. 一条真实评论、一条真实线索,都进过你的群。
02

Hosted托管运维

Monthly. You do not touch the server, and you do not hear about an expired token from a customer. 按月。你不用碰服务器,也不会等客户告诉你,才发现令牌过期了。

  • Server, uptime, backups, upgrades服务器、可用性、备份、升级
  • Daily reconciliation of leads against Meta线索每日与 Meta 对账
  • Token and delivery monitoring, with alerts令牌与投递监控,异常告警
  • Model routing and cost control模型路由与成本控制
We watch for我们盯的是 the two things that fail without an error: delivery and expiry. 两种「不报错就失效」的情况:投递和过期。
03

Custom定制开发

Scoped project. For setups that are not one Page and one language. 按项目。适用于不是一个主页、一种语言就够的场景。

  • Multi-page, multi-brand routing多主页、多品牌路由
  • Knowledge-base audit — what must never be said知识库审计 —— 哪些话绝对不能对外说
  • Approval flow into Feishu, WeCom or Slack审批流接入飞书、企业微信或 Slack
  • Migration from an existing auto-reply setup从现有自动回复方案迁移
Typical lead time大致周期 2–3 weeks from kickoff, depending on how ready your product facts are. 开工后 2–3 周,取决于你的产品资料准备到什么程度。

How it is priced怎么收费

Fixed scope, quoted before anything starts. Hosting is a flat monthly fee. No per-message charges — your cost should not grow just because a post went viral. 固定范围,开工前给报价。托管是固定月费。不按消息条数收费 —— 一条内容火了不该让你多付钱。

  • Quote before work, not after先报价后开工,不是做完再谈
  • You own the deployment and the credentials部署和凭据都归你
  • Cancel hosting any month; take the setup with you托管随时可停,已部署的东西你可以直接拿走

When we will tell you not to buy this什么情况下我们会劝你别买

Three cases where automation makes things worse, and we say so before taking money: 有三种情况,自动化只会让事情更糟。这三种我们会在收钱之前说清楚:

  • Fewer than a handful of inquiries a day — answering by hand is faster than approving cards一天只有零星几条询盘 —— 人工回比点卡片快
  • Nobody can spend ten minutes a day on the queue — that turns "sometimes unanswered" into "systematically unanswered"没人能每天花十分钟看队列 —— 那会把「偶尔漏回」变成「系统性地不回」
  • Product facts are not written down yet — the model can only be as safe as your knowledge base产品参数还没落到纸面上 —— 模型的安全边界就等于你知识库的质量
05 — Quick start05 — 快速开始

Deploy it to your server with one command一行命令部署到你的服务器

With AIW_POST_ENABLED=false the Send button reports a simulated send and nothing reaches Facebook. Flip it only after a few drafts have come through. AIW_POST_ENABLED=false 时,点「发送」只会提示「模拟发送」,不会有任何内容发到 Facebook。先看几条草稿,再考虑打开。

# 1. clone and configure
git clone https://github.com/yangke821115/lead-pulse-guard.git
cd lead-pulse-guard
cp .env.example .env

# 2. gateway (verify → tag → dedupe → spool)
docker compose up -d gateway

# 3. worker (spool → KB → LLM → approval card)
python3 -m venv venv && ./venv/bin/pip install -r requirements.txt
AIW_POST_ENABLED=false ./venv/bin/python -m worker.main
Note注意 Subscribe to feed and leadgen at both levels — app-level and page-level. Page-level alone looks correct and delivers nothing. feed 和 leadgen 必须在两个层级都订阅:App 级和主页级。只配主页级看起来是对的,但什么都不会投递。

Tell us how many inquiries reach you today说说你现在每天收到多少条询盘

Two sentences is enough: what you sell, roughly how many inquiries a day, and where they arrive. We will tell you whether this is worth automating — including when the answer is no. 两句话就够:你卖什么、一天大概几条询盘、从哪几个入口进来。我们会告诉你值不值得上自动化 —— 包括答案是「不值得」的时候。

Write to us写信给我们

replies usually within one business day 通常一个工作日内回复