FloatChat
A self-hosted, omnichannel customer-support platform built on Chatwoot 4.13, with a multi-agent AI layer that answers customers from the knowledge base, hands off to humans when it can't, and learns new FAQs from resolved conversations.
01The problem
Support teams answer the same questions across live chat, email, WhatsApp and social channels. They needed AI that resolves routine questions from the company's own knowledge, hands everything else safely to a human, and keeps improving — on a platform they host and fully control.
02How it works
A customer message arrives
A customer writes in on any channel — live chat, email, WhatsApp, social or SMS — and the conversation sits in the pending (bot) state.
The listener queues a job
CaptainListener checks that the inbox has an AI assistant attached and queues the reply job on Sidekiq.
The orchestrator decides
The orchestrator assistant reads up to 30 messages of history and either answers or hands off to the right scenario agent.
Agents use tools
Agents call tools such as faq_lookup (pgvector semantic search), add labels, update priority or leave private notes for the team.
Reply or human handoff
The answer is posted to the customer — or the chat leaves bot mode, gets an activity note and is auto-assigned to an agent with free capacity.
Learning from resolved chats
After a conversation is resolved, a job mines it for new FAQ entries, saved as pending for review and de-duplicated against approved ones.
03What I built
- Set up FloatChat as a rebranded, self-hosted fork of Chatwoot 4.13 — Rails 7.1, Vue 3, PostgreSQL, Redis / Sidekiq, deployed with Docker.
- Brought the Captain AI agent system into the core app and enabled the v2 multi-agent flow behind the captain_integration_v2 flag, orchestrated with the ai-agents gem and ruby_llm.
- Configured an orchestrator assistant that hands off to admin-defined scenario agents using 7 built-in tools — FAQ lookup, human handoff, resolve, private and contact notes, labels and priority — capped at 8 handoffs, 12 tool calls and 30 messages of history per run.
- Set up the RAG knowledge base: crawled websites and uploaded PDFs are turned into Q&A pairs, embedded with text-embedding-3-small and searched with pgvector (1536-dim, cosine similarity).
- Enabled the learning loop — resolved conversations are mined for new FAQ entries, saved as pending for review and de-duplicated against approved ones.
- Hardened agent runs with an LLM timeout guard, history truncation, a Redis run registry that prevents duplicate replies and repeated tool actions, and a run logger.
- Made models configurable per assistant (GPT-4.1 by default), with provider mapping for OpenAI, Anthropic, Google, Mistral and DeepSeek.
04Key features
Omnichannel inbox
Chat, email, Facebook, Instagram, X, WhatsApp, Telegram, Line and SMS in one place.
AI auto-replies
Answers routine questions from the knowledge base on any inbox with an assistant.
Safe human handoff
Hands over to a person when the AI can't help, with an activity note and auto-assignment.
Self-learning FAQs
Turns resolved conversations into reviewed, de-duplicated FAQ entries.
Copilot for agents
Helps human agents search conversations, contacts and Help Center articles with 6 read-only tools.
One-click AI tasks
Summarise a conversation, suggest replies, rewrite text and suggest labels.
Any LLM provider
Model, provider and temperature set per assistant — OpenAI, Anthropic, Google, Mistral or DeepSeek.