AI & automation
LeadRelay
An embedded agent answers buying questions from a business’s own website and carries qualified leads, bookings and conversations into one CRM.
- Drawing ID
- LNG-CH02
- Rev.
- 2026.12
- System
- AI / CRM
- Scale
- Not to scale
- Studio
- 28.46° N · 16.25° W
From question to handoff
Follow a pricing question from the embedded widget into the operator’s CRM. The recording uses a fictional business and sample records.
Play the product walkthrough.

Trace the lead to its appointment in the operator workspace.
The problem
A visitor asks about pricing in chat. Without a shared record, the sales team has to collect the same details again before it can book a call.
Technical decisions
- SPEC 02.1Keep the source within reach
- The agent retrieves passages from the business’s website and FAQs and links back to them. An operator can check the passage behind a price or a booking answer.
- SPEC 02.2Keep a person in the loop
- An operator can take over a conversation from the CRM and reply in the same widget. The visitor’s earlier questions and captured details stay with the thread.
- SPEC 02.3Make handoffs recoverable
- The server validates booking availability. Operators can inspect a failed delivery in the CRM and send it again.
Architecture
JavaScript · Node.js · PGlite · Workers / D1
- NODE 01
Embedded widget
An isolated iframe maintains the visitor conversation separately from the operator session.
HTTPS / JSONData in transit · JSON
{ "question": "How much does a new website cost?", "source": "/example/pricing" } - NODE 02
Agent and actions
Website passages ground answers. The server validates lead capture and appointment requests.
JSON / webhookData in transit · JSON
{ "lead": "Nina Patel", "booking": "meeting.booked · 15:00 UTC" } - NODE 03
CRM and delivery
Shared application logic runs on Node with PGlite or on Cloudflare Workers with D1. The dashboard surfaces leads, bookings and webhook delivery.
Data in transit · JSON
{ "event": "lead.created", "Idempotency-Key": "lead.id" }
What I verified
- Deployment
- 2 runtimes
- The same CRM logic runs on Node with PGlite and on Cloudflare Workers with D1.
- Webhook test limit
- 5 attempts
- The webhook inspector caps each test at five delivery attempts. Retries reuse the same idempotency key.