NAiOSOmni
omnichatv0.8.1Connect WhatsApp and Telegram to NAiOS. Dashboard with KPIs and graphs, unified inbox, AI auto-reply with tools, vertical agents, demo simulation mode, and multi-tenant.
Description
OmniChat turns any messaging channel into an interface to NAiOS. Link Personal WhatsApp (Baileys, via QR), official WhatsApp Business Platform (Meta Cloud API), or Telegram Bot. Includes a dashboard with auto-calculated KPIs + graphs (line, donut, heatmap), real-time unified inbox (SSE), AI auto-reply with tool-calling, 14 tools (generate/edit images, transcribe audio, send email, consult KB, create presentations/landings/forms, save structured orders...), 5 channel modes (closed, whitelist, blacklist, customer, acquisition gateway), SIMULATION mode for demos where the client chooses which agent to try, commands via self-chat (/on, /off, /pause, /ai), self-link via /claim for your registered clients to use their own NAiOS context, onboarding gateway with magic-link login, VERTICAL AGENTS: specialized bots (home delivery, real estate leads, restaurant reservations, etc.) with prompt + business variables + capture JSON schema, generated by AI-wizard, with integrated CRM, auto-recovery of the worker after session loss and reconnection without re-linking when credentials remain valid.
Features (26)
Link your number as a device via QR or code. Supports groups. Isolated worker process.
Official connection with Meta Cloud API. Zero risk of ban, templates, verified HMAC webhooks.
Official bot via Bot API. Token from @BotFather, no risk, free. Supports groups and media.
List of conversations + thread + composer. SSE push, visual multimedia (images, audios, videos).
Loop tool-calling: 12 ready tools (generate/edit images, audios, KB, email, presentations...).
Typing indicator scaled by length, random jitter, cool-down post-manual response from the owner.
Closed, whitelist, blacklist, customer, gateway. Visually configurable.
Turn your channel into a funnel: any unknown invited to create a free NAiOS account with magic-link.
Registered users can link their WhatsApp with /claim email + /code. Bot uses THEIR prompt and THEIR tokens.
Override by peer: force-on/off, custom prompt, pause, all from UI.
Visual editor by day with time slots, OOO mode with custom message.
Quotas msg/min/hour/day, automatic burst detection, protects against bans.
/on /off /pause /status /test /prompt /ai /help from your own self-chat.
6 templates: restaurant, support, real estate, salon, B2B sales, personal assistant.
Endpoint with totals and stats by channel, errors, messages/day, active sessions.
Create specialized bots (orders, leads, reservations) by describing in natural language — the AI generates prompt, fields, and email.
Orders are stored in DB with JSON Schema. CRM view with filters, statuses, editing, notes, CSV export.
Email + WhatsApp notification to the linked phone when a new order arrives. Automatic confirmation to the client.
Each new registration triggers a signed POST with HMAC-SHA256 to your external URL (Zapier, Make, n8n, CRM). Exponential retry + delivery log.
4 columns (new / contacted / completed / archived) with drag and drop between states. Toggle table/Kanban persisted.
Interactive diagram generated by AI from the prompt — visualize turns, decisions, tools, and captured fields. Zoom/pan + export SVG.
Main tab with KPIs, graphs (Chart.js: line/donut/bar + heatmap D3), unified recent activity and health-check with actions.
Home with auto-calculated KPIs (messages, orders, conversion, tokens) + line chart 30d incoming/outgoing + donut states + heatmap hour×day + top channels/agents + health alerts.
Puts a channel in demo mode: the client chooses from the agents you enable. 5 editable texts, commands /exit /change /menu /help, records marked with flag is_simulation.
After WhatsApp Web session loss (server-side closure, limit of 4 devices, server restart) the worker restarts itself reusing the saved auth_blob. Explicit 'Reconnect' button if auto fails.
Integrated contact picker: synchronized agenda (wa-personal) or seen peers. In Tray, first choose channel and then contact, leading you to the empty thread ready to write.
Changelog
- Seams for other modules (contract with Campaigns): listChannelsFor(userId) returns the user's channels (own + shared with reply permission) with kind/label/phone/connected; sendFor(userId, { channelId, to, text?, template?, meta? }) sends via a user channel normalizing the destination to the peer of each driver (phone → JID in wa-personal, digits in wa-cloud, chat_id@telegram) and returns { ok, messageId, channelKind } or { ok:false, error: bad_args|no_channel|not_connected|forbidden|needs_template|transport }. They never throw.
- wa-cloud: error 131047 (out of the 24h window) is reported as needs_template; with template { name, language, params[] } the Meta template is sent.
- The manual sending of the inbox and sendFor share the same internal path (_dispatchOutgoing + _attributeOutgoing): registration in the conversation and attribution sent_by_user_id are identical; sendFor also adds an entry in the channel log (send category) with the source module.
- New test tests/omnichat/test-send-seam.js (mock driver).