NAiOS IconNAiOS Logo
Back to catalog

NAiOSOmni

omnichatv0.8.0

Connect 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.

Comunicaciónwhatsapptelegrammessaginginboxaichannelsomnichannelbaileyscloud-apibotauto-replytoolsagentsvertical-botlead-capturecrmai-wizardNAiOS Team
Features
26
Version
0.8.0
License
MIT
Services

Description

OmniChat turns any messaging channel into an interface for 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, client, acquisition gateway), SIMULATION mode for demos where the client chooses which agent to test, self-chat commands (/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 + JSON capture 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)

Personal WhatsApp (Baileys)

Link your number as a device via QR or code. Supports groups. Isolated worker process.

WhatsApp Business Platform

Official connection with Meta Cloud API. Zero risk of ban, templates, verified HMAC webhooks.

Telegram Bot

Official bot via Bot API. Token from @BotFather, no risk, free. Supports groups and media.

Real-time unified inbox

List of conversations + thread + composer. SSE push, visual multimedia (images, audios, videos).

AI auto-reply with tools

Loop tool-calling: 12 ready tools (generate/edit images, audios, KB, email, presentations...).

Human behavior

Typing indicator scaled by length, random jitter, cool-down post-manual response from the owner.

5 channel modes

Closed, whitelist, blacklist, client, gateway. Visually configurable.

Gateway: onboarding NAiOS via WhatsApp

Turn your channel into a funnel: any stranger invited to create a free NAiOS account with magic-link.

Multi-tenant + self-link /claim

Registered users can link their WhatsApp with /claim email + /code. Bot uses THEIR prompt and THEIR tokens.

Rules by contact

Override by peer: force-on/off, custom prompt, pause, all from UI.

Working hours + vacations

Visual editor by day with time slots, OOO mode with custom message.

Anti-spam and rate limits

Quotas msg/min/hour/day, automatic burst detection, protects against bans.

Commands via WhatsApp

/on /off /pause /status /test /prompt /ai /help from your own self-chat.

Vertical templates

6 templates: restaurant, support, real estate, salon, B2B sales, personal assistant.

Metrics for superadmin

Endpoint with totals and stats by channel, errors, messages/day, active sessions.

Vertical agents with AI-wizard

Create specialized bots (orders, leads, reservations) by describing in natural language — AI generates prompt, fields, and email.

Structured capture (CRM records)

Orders are saved in DB with JSON Schema. CRM view with filters, statuses, editing, notes, CSV export.

Notifications to the owner

Notification via email + WhatsApp to the linked phone when a new order arrives. Automatic confirmation to the client.

Outgoing webhooks (HMAC)

Each new registration triggers a signed POST with HMAC-SHA256 to your external URL (Zapier, Make, n8n, CRM). Exponential retry + delivery log.

Kanban view with drag-and-drop

4 columns (new / contacted / completed / archived) with drag and drop between states. Toggle table/Kanban persisted.

Agent flow viewer (D3 + AI)

Interactive diagram generated by AI from the prompt — visualize turns, decisions, tools, and captured fields. Zoom/pan + export SVG.

Agent dashboard

Main tab with KPIs, graphs (Chart.js: line/donut/bar + heatmap D3), unified recent activity and health-check with actions.

Global plugin dashboard

Home with auto-calculated KPIs (messages, orders, conversion, tokens) + line chart 30d incoming/outgoing + donut states + heatmap hour×day + top channels/agents + health alerts.

Simulation mode (demo)

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.

Auto-recovery without re-linking

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.

New chat from Tray or Inbox

Integrated contact picker: synchronized agenda (wa-personal) or seen peers. In Tray, first choose channel and then contact, it takes you to the empty thread ready to write.

Changelog

v0.8.02026-05-04
  • SIMULATION MODE — toggle by channel with multi-select of allowed agents, 5 editable texts (menu/intro/confirm/invalid/exit), commands /exit /change /menu /help, state per-peer (chosen_agent_id + phase + session_started_at), history scoped by session_started_at to avoid persona contamination when changing agent
  • New table omnichat_simulation_state + columns in omnichat_channel_settings + flag is_simulation in omnichat_agent_records
  • Global plugin DASHBOARD replaces the home /plugins/omnichat/ — auto-calculated KPIs (messages with delta vs previous period, new orders + stale-24h, conversion, tokens consumed), line chart 30d incoming/outgoing, donut states, heatmap hour×day, top channels and top agents, recent orders feed, calculated alerts (down channels, uncontacted orders, webhook failures 1h)
  • Endpoint /api/dashboard?range=24h|7d|30d with all SQL aggregations in one request, refresh every 30s
  • Sidebar restructure: Dashboard as the first item, channel listing moved to /channels, redundant mini-stats with the dashboard removed
  • Auto-recovery — restoreAll() now also revives unlinked channels with valid auth_blob+identifier when starting the plugin (covers server-side closure of WhatsApp Web, limit of 4 devices, server restart)
  • Reconnect button (refresh icon) in unlinked channel card with valid session — reuses auth_blob without scanning QR
  • Worker fix — wasPaired check now queries the DB (identifier IS NOT NULL) instead of the in-memory sock.authState.creds.registered, which Baileys flips to false on server-side closures
  • Friendly status_detail in cards: 'unpaired_close: connectionClosed' → hidden for unlinked channels (the Link button already communicates), 'loggedOut: ...' → 'Session closed from WhatsApp', etc.
  • Agent detail UX overhaul — vertical sub-tabs (Identity / Behavior / Capture / Integrations) replace the flat scroll of 9 cards
  • Sticky save bar with 'Unsaved changes' indicator (pulse animation) + beforeunload warning
  • Tools grouped by category (🖼 Multimedia / 📚 Knowledge / 📦 Capture / 📤 Outputs) with visual cards: semantic icon, friendly title, discreet technical name, toggle iOS-style, green accent border when ON, badges 'Required' / 'Plugin not installed'
  • KB collections as nested sub-panel under lookup_kb (not sibling card) — cards with icon+color of the collection, doc_count chip, auto-select if there is only 1, warning if lookup_kb ON but 0 marked, empty state with CTA to /plugins/knowledge-base
  • Endpoint /api/agents/tools-catalog now returns available + missing[] by tool querying the plugin loader
  • Button 'Edit agent' shortcut in channel settings when there is an active agent_id — direct link to /plugins/omnichat/agents/<id>
  • New chat picker in Tray (Conversations tab) — 2-step modal channel+contact, deep-link to inbox with ?openPeer=<id>
  • Inbox: parser of ?openPeer=<id>&peerName&peerType on load — automatically opens thread (existing or synthetic) and cleans URL with replaceState
  • Filter 'Only real / All / Only simulation' in Orders tab + badge 🧪 sim in cards/rows
  • Bug fix — getRecentMessages compared ts SQLite ('YYYY-MM-DD HH:MM:SS') vs sinceTs ISO ('YYYY-MM-DDTHH:MM:SSZ') with ASCII string, ' ' < 'T' broke the filter always. Now uses datetime() on both sides
  • Bug fix — endpoint /api/agents/kb-collections used this.pluginLoader that was never assigned; now resolves with this.app.get('pluginLoader') lazy at request-time
  • Bug fix — JS of records.ejs crashed in embed mode due to addEventListener on null in hub-conv-q; added optional chaining
  • Bug fix — outerHTML in renderDetail of the slide-over panel deleted the id of the span when re-rendering status pill, second state change failed with 'Cannot read properties of null'; replaced with className+textContent
  • Bug fix — CSS specificity bug body.oc-shell-body (1,1,1) > .oc-shell-body (1,1,0) caused the mobile grid to keep the sidebar 240px reserved; sidebar hidden but the main only received viewport-240px width
  • Mobile responsive — viewport meta in the 7 views with <head>, KPI grid 2-col in mobile (minmax 200px → 150px), heatmap labels density adapts to width, padding-left for burger in agent dashboard, sidebar bottom padding so that footer 'Start NAiOS' does not fall under the browser chrome
  • Toggle of the channel card with explicit label 'Bot' + tooltip — avoids confusion with connection
  • CSRF middleware: removed console.log debug that saturated the log on each chat switch
  • Conditional reconciliation — _reconcileOrphanFiles only called when the loaded conv has messages with generation marker without file_url (previously called on every switch incessantly)
v0.7.112026-05-03
  • Composer with attachments: 📎 multi-file picker + drag-and-drop overlay + Ctrl+V paste
  • Backend multer endpoint up to 5 files × 50MB with auto-detect MIME → image/video/audio/document
  • Smart caption: 1st image/video carries the text as caption, others go without
  • Worker wa-personal extended: native handlers for audio (ptt) and video with caption
  • Unified Hub in Tray: 'Conversations' tab adds chats from ALL channels
  • Filter by channel with clickable chips + counters by channel in header
  • Endpoint /api/inbox/conversations with merge cross-channel + global search
  • Slide-over thread with integrated composer (respond without leaving the Hub)
  • Avatars in Hub list + thread head consistent with individual inbox
  • Mobile: list collapses to thread when selecting conversation
v0.7.102026-05-03
  • Bug fix: outbound images from the bot no longer get lost due to race condition with Baileys echo (BOT_SENT_IDS dedup)
  • Profile avatars: fetch from Baileys via sock.profilePictureUrl, download + local cache
  • Worker IPC: fetchAvatar (single) + bulkFetchAvatars (throttled ~5/sec)
  • DB: omnichat_synced_contacts.avatar_local_path + avatar_fetched_at + helpers upsertAvatar/getAvatar
  • Endpoint GET /api/channels/:id/avatar/:peerId with ETag caching and automatic refresh >7d
  • Endpoint POST /refresh-avatars for bulk manual
  • Helper ocAvatar() reusable with fallback to Phosphor icon if no photo
  • Integration: conversations list (36px) + thread header (40px) + contacts combobox (28px)
  • Button 📸 Avatars next to 📲 Agenda in contact picker (only wa-personal)
v0.7.92026-05-03
  • Channel card refactored: uniform status pill with icon+label (no more raw 'error'/'unlinked')
  • Toggle ON/OFF inline in the card (bot_enabled directly, without entering Settings)
  • Contextual menu ⋮ with Settings / View log / Re-link / Delete
  • Primary contextual action based on state (Inbox / Link / Reconnect)
  • New tab 📜 Log with real-time table, filters (time/level/category/search), live tail SSE, export CSV, clear
  • LogService that writes to DB + emits SSE + console fallback
  • Instrumentation: connection lifecycle, auto-reply decisions, tool calls, webhook deliveries, rate-limit bursts
  • Automatic retention 30 days + endpoints GET/DELETE /api/channels/:id/logs
  • Card oc-card-bot-off reduced opacity + suffix '(bot off)' to the title
v0.7.82026-05-03
  • Reusable contact combobox (ocPeerCombobox) — dropdown with search, manual fallback, exclude list
  • Contacts tab rewritten: combobox replaces peer_id input, auto-fills name
  • Existing overrides rendered as cards with avatar + policy chip + semantic border
  • Click on 'edit' card → inline form pre-filled with current values (no more delete+recreate)
  • Shared cache of the peer pool between Access (whitelist/blacklist) and Contacts (overrides)
  • Combobox automatically excludes peers that already have override (avoids duplicates)
v0.7.72026-05-03
  • Opt-in synchronization of the WhatsApp address book (Baileys): reads sock.contacts + subscription to contacts.upsert for incremental
  • Table omnichat_synced_contacts + bulkUpsert with transaction + ON CONFLICT preserves non-empty names
  • Worker IPC syncContacts + async handler + emit contacts.snapshot
  • New method driver.requestContactsSync() symmetric to sendMessage
  • POST /api/channels/:id/sync-contacts (manual trigger) and GET /synced-contacts
  • UI contact picker: button 📲 Agenda only visible for wa-personal, privacy-first consent modal the 1st time
  • Smart merge seen-peers + synced-contacts (deduped by peer_id), visual tags 'agenda'/'manual'
  • Sort: peers with messages first by recency, then synchronized alphabetically
  • Telegram + Cloud API: hidden button (do not expose agenda)
  • Bug fix: JOIN cross-DB users → omnichat failed; now hydrates naios_user_email in 2-step
v0.7.62026-05-03
  • Visual contact picker for whitelist/blacklist — replaces textarea of peer_ids
  • Split panel In the list | Available, live search, click to move
  • Semantic green color for whitelist, red for blacklist (prevents errors)
  • Endpoint /api/channels/:id/seen-peers with last_msg_preview and relative activity
  • Modal 'Add manually' with preview of the format (auto @s.whatsapp.net if only digits)
  • Backward compatible with legacy newline-separated storage
v0.7.52026-05-03
  • Privacy-first scoping of the KB by agent: each agent can be limited to specific collections
  • Tool lookup_kb reads agent.kb_collections; if empty, consults nothing (avoids filtering confidential info)
  • Parallel search in authorized collections + merge top-K by similarity
  • UI agent detail: sub-section 'Authorized KB collections' appears when activating lookup_kb
  • Endpoint /api/agents/kb-collections proxy to knowledge-base with detection of uninstalled plugin
  • New public method KB.getCollectionsForUser({userId}) symmetric to searchAsUser/addDocAsUser
v0.7.42026-05-03
  • Agent dashboard as default tab (replaces Statistics)
  • Endpoint /api/agents/:id/dashboard with 6+ aggregations in a single call (cache 60s)
  • 5 KPIs: total, today (vs yesterday), 7 days (vs previous), to attend, average closure time
  • 3 graphs Chart.js (line by day / donut by state / bars top adaptive field)
  • D3 heatmap activity hour × day of the week
  • Unified activity feed: logs + webhook deliveries ordered temporally
  • Health-check with 5+ validations and 'fix' link for each problem
  • Chart.js v4 lazy-loaded from CDN only in this tab
v0.7.32026-05-03
  • Agent flow viewer: D3 + dagre renders JSON generated by AI from the prompt
  • GET /api/agents/:id/flow with cache by hash of the prompt (if unchanged, serves instant cache)
  • New tab 📊 Detailed agent flow with zoom/pan, export SVG, JSON debug mode
  • 6 types of node (start/message/input/decision/tool/end/error) with palette coordinated to slate/green theme
  • D3 v7 + dagre loaded lazy from CDN only when activating the tab
v0.7.22026-05-03
  • Outgoing webhooks by agent: URL + HMAC-SHA256 secret + exponential retry (1s/5s/30s) + delivery log
  • POST /api/agents/:id/webhook/test (test ping without retry) and /webhook/deliveries (audit)
  • Kanban view in Tray with 4 columns and drag-drop between states (Sortable.js, optimistic update)
  • Toggle table/Kanban with preference persisted in localStorage
  • UI agent detail: card 'Webhook' with generate secret + test ping + live delivery table
  • Table omnichat_webhook_deliveries for debugging
v0.7.12026-05-03
  • Dynamic labels by agent: record_label_singular/plural (Order/Reservation/Ticket/Appointment/Lead/etc.)
  • AI wizard automatically proposes labels according to the use case
  • UI uses the agent's label in cards, headers, confirms, and notifications (email + WhatsApp owner)
  • Top nav renamed: 'Orders' → 'Tray' (neutral, covers all genders)
v0.7.02026-05-03
  • Vertical agents: specialized bots (fuel, restaurant, real estate…) with prompt + business vars + JSON capture schema
  • AI Wizard: describe your bot in natural language and AI generates the complete agent (prompt, fields, email template, tools)
  • Tool save_agent_record with validation against data_schema and dynamic schema (LLM sees the exact fields to ask)
  • Tool send_confirmation_email with agent template + substitution {{vars}}
  • Substitution {{vars}} in prompts (resolve template-vars helper)
  • CRM view /records: table, filters, slide-over detail, edit, status workflow, bulk actions, CSV export
  • Notification to the owner via email + WhatsApp upon receiving a new order
  • Per-channel agent selector + UI agents with grid + on/off
  • Mobile responsive inbox + menu ⋮ per conversation with 4 actions
  • Thematic scrollbars slate/green
  • DB: omnichat_agents, omnichat_agent_records (+ active_agent_id in channel_settings)
v0.6.02026-05-03
  • Official Telegram Bot driver (Bot API)
  • 5 new tools: generate_image_transparent, generate_music, create_presentation, create_landing, create_form
  • Metrics endpoint for superadmin
  • Settings UI v2 with modern tabs + visual editors (business_hours, OOO, rate_limit)
  • Prompt templates (restaurant, support, real estate...)
  • Node native test suite (29 tests)
  • Profile wizard for users gateway (change provisional email/password)
  • Identity enrichment: NAiOS badge in inbox for linked peers
v0.5.02026-05-03
  • SSE in inbox (real-time push vs polling)
  • Multimedia visualization in thread (img/audio/video)
  • Hardening: rate limiter, anti-spam burst, business hours, out-of-office
v0.4.02026-05-02
  • Real gateway mode: onboarding NAiOS via WhatsApp + magic-link login
  • Self-link /claim email + /code XXXXXX for registered users
  • Multi-tenant in tool ctx (identity.user_id uses context of YOUR workspace)
  • Per-peer overrides UI (force_on/off, custom_prompt)
  • Token bypass admin/superadmin
v0.3.02026-05-02
  • Tools framework with audience (admin/public) + plugin requirements
  • Tools: generate_image, send_email, lookup_kb, edit_image, remove_bg, transcribe_audio, analyze_image
  • ctx.invokePlugin for cross-plugin calls
  • Command /ai for AI chat with tools from self-chat
  • Notify pre-task ("🎨 Generating image...")
v0.2.02026-05-02
  • WhatsApp Cloud API driver (official Meta)
  • Refactor Baileys to worker process (child_process.fork + IPC)
  • AI auto-reply + commands /off /on /pause /status /test /prompt
  • Basic unified inbox
  • Channel modes (closed/whitelist/blacklist/customer/gateway)
  • Identity resolution with omnichat_known_peers
  • Per-peer lock + queueing (race fix)
v0.1.02026-05-02
  • Initial scaffold
  • Channel adapter interface
  • Driver wa-personal Baileys (in-process)
  • DB schema (8 tables)
  • Pairing via QR + code
  • Base view