InboxPilot
Human-in-the-loop AI support for SMS, email, and web chat.
The problem
Support teams work across multiple channels, while AI automation can miss the moment when a conversation needs a human. A useful reply is not enough if it ignores a safety signal, invents a policy answer, loses delivery state, or crosses a tenant boundary.
What it does
InboxPilot turns every inbound message into an auditable support conversation:
- One workspace: SMS, email, and embedded web chat share one inbox and conversation model.
- Grounded assistance: organization knowledge feeds AI drafts and confidence-gated auto-replies.
- Safety before speed: deterministic escalation rules run before any LLM call for safety concerns, legal threats, profanity, missing knowledge, and other configured signals.
- Human control: agents can approve, edit, regenerate, send, escalate, resolve, and reopen conversations.
- Live collaboration: authenticated realtime events keep the agent inbox and web-chat visitor synchronized.
- Traceable outcomes: messages, AI decisions, knowledge evidence, delivery outcomes, and handoffs remain auditable.
The result is more than a chatbot: support teams can see what the system decided, why it decided it, and exactly where a human took control.
Demo flow
- A customer message arrives through SMS, email, or the embedded web-chat widget.
- InboxPilot normalizes and deduplicates the event, finds the right conversation, and queues durable AI work.
- The system retrieves relevant knowledge and either creates a draft, sends a confidence-gated auto-reply, or escalates before the model responds.
- An agent reviews the decision, takes over when needed, and sees the final reply delivered in realtime.
How it works
A Next.js App Router client provides the inbox, customer, knowledge, analytics, settings, and embedded web-chat experiences. InsForge provides authentication, Postgres persistence, row-level security, storage, realtime delivery, and serverless functions.
The trusted backend is split into nine Deno function entrypoints for inbound webhooks, delivery callbacks, job processing, and webchat lifecycle. They delegate to the portable packages/support-core/ package, where database, queue, AI, provider, and realtime dependencies are injected behind interfaces.
Reliability and trust boundaries
- Deterministic escalation runs before the model sees sensitive content.
- Durable jobs use active/lifetime idempotency, retries, stale-claim recovery, and dead-letter handling.
- Tenant isolation is enforced by PostgreSQL RLS and organization-scoped realtime channels.
- Atomic RPCs protect pending drafts, AI-decision finalization, and monotonic delivery status from races and late callbacks.
- Knowledge traceability records the pgvector chunks used by each AI decision.
The public source is available at github.com/Xuefeng-Zhu/InboxPilot. The repository includes setup instructions, seeded sample data, unit and property-based tests, source-contract coverage, and guarded live integration suites for seed idempotency, tenant isolation, realtime delivery, inbound SMS/email, and outbound messaging.
Why it matters
Traditional support automation optimizes for sending the next reply. InboxPilot makes the reasoning and the handoff observable, giving teams the speed of AI-assisted responses without losing the controls that make automation trustworthy: a safety gate, grounded knowledge, confidence-based behavior, durable retries, tenant boundaries, and an auditable path back to a human.
Build notes
I used ChatGPT and Codex throughout the Build Week iteration to decompose the cross-channel message lifecycle, implement the authenticated event and state-transition flows, harden the AI and delivery boundaries, and drive the live regression-verification loop. Codex accelerated the work by turning the support pipeline into testable interfaces and by helping trace failures across the Next.js client, InsForge functions, Postgres/RLS policies, realtime channels, and provider adapters.
Built With
- codex
- insforge
- next.js
- openrouter
- pgvector
- postgresql
- react
- typescript

Log in or sign up for Devpost to join the conversation.