Template — architecture pattern, not a starter kit
1
Multi-channel input

Receives messages from Telegram, WhatsApp, Slack, Discord, or web.

2
Vector memory lookup

Queries knowledge base embeddings for relevant answers.

3
Respond or escalate

Generates response or escalates to human when confidence is low.

Deploy This PatternRecommended: Solo or Pro · from $14.99/mo

Customer Support Bot Template

This template describes the architecture for a multi-channel customer support agent on osModa. The agent receives messages from Telegram, WhatsApp, Slack, or any configured channel, looks up answers in a vector memory knowledge base, generates a response using an LLM, and escalates to a human agent when confidence is low. Every interaction is logged to the tamper-proof audit ledger.

This is an architecture pattern, not a downloadable starter kit. It describes which osModa daemons your support bot would use, how the data flows through the system, and how to configure the components. The daemons and tools referenced below are pre-installed on every osModa server. You write the agent code; osModa handles scheduling, process supervision, crash recovery, and audit logging.

TL;DR

  • • Multi-channel support bot receiving messages from Telegram, WhatsApp, Slack, Discord, or web
  • • Vector memory knowledge base for retrieval-augmented generation (RAG) -- answers grounded in your documentation
  • • Automatic escalation to human agents when LLM confidence falls below threshold
  • • osmoda-routines refreshes the knowledge base on a schedule, osmoda-watch ensures 24/7 uptime
  • • Every conversation logged to SHA-256 tamper-proof audit ledger for compliance
  • • Recommended plan: Solo ($14.99/mo) or Pro ($34.99/mo)

Architecture Diagram

The data flow for a customer support bot on osModa. Each box maps to an osModa daemon or tool.

┌─────────────────────────────────────────────────────────┐
│                    INPUT CHANNELS                       │
│  ┌──────────┐ ┌──────────┐ ┌───────┐ ┌───────────────┐ │
│  │ Telegram │ │ WhatsApp │ │ Slack │ │ Discord / Web │ │
│  └────┬─────┘ └────┬─────┘ └───┬───┘ └──────┬────────┘ │
│       └────────────┼───────────┼─────────────┘          │
└────────────────────┼───────────┼────────────────────────┘
                     ▼           ▼
          ┌─────────────────────────────┐
          │     MESSAGE HANDLER         │
          │  (your agent code)          │
          │  supervised by osmoda-watch │
          └─────────┬───────────────────┘
                    │
                    ▼
          ┌─────────────────────────────┐
          │   VECTOR MEMORY LOOKUP      │
          │  query knowledge base       │
          │  (osModa memory tools)      │
          └─────────┬───────────────────┘
                    │
              ┌─────┴─────┐
              ▼           ▼
    ┌──────────────┐ ┌──────────────────┐
    │ HIGH CONF.   │ │ LOW CONFIDENCE   │
    │ Generate     │ │ Escalate to      │
    │ response     │ │ human agent      │
    │ via LLM      │ │ via Slack/TG     │
    └──────┬───────┘ └────────┬─────────┘
           │                  │
           └──────┬───────────┘
                  ▼
          ┌─────────────────────────────┐
          │      AUDIT LEDGER           │
          │  log interaction (agentd)   │
          │  SHA-256 hash chain         │
          └─────────────────────────────┘

  ┌──────────────────────────────────────┐
  │  BACKGROUND: osmoda-routines         │
  │  refreshes knowledge base on cron    │
  └──────────────────────────────────────┘

Components

The building blocks of this support bot architecture and the osModa features each one uses.

Message Handler

Your agent code that receives incoming messages from all channels, normalizes the format, and routes them through the processing pipeline. Runs as a process supervised by osmoda-watch for automatic crash recovery.

Vector Knowledge Base

Your documentation, FAQ, and help articles stored as vector embeddings using osModa memory tools. The agent queries these embeddings for semantically similar content when answering customer questions.

LLM Response Generator

Calls an external LLM (Claude, GPT-4o, or any supported model) with the retrieved knowledge base context to generate a response. osmoda-egress controls which LLM API endpoints the agent can reach.

Escalation Router

When confidence is below threshold, routes the conversation to a human agent via Slack channel or Telegram group. Includes the conversation history and relevant knowledge base excerpts for context.

Knowledge Base Refresher

An osmoda-routines cron job that periodically re-indexes your documentation, FAQ pages, and help articles into the vector memory. Keeps the knowledge base current without manual intervention.

Audit Logger

Every message received, response generated, and escalation triggered is logged to the SHA-256 hash-chained audit ledger via agentd. Provides tamper-proof conversation history for compliance and quality review.

osModa Features Used

The specific daemons, tools, and platform capabilities this template relies on.

W

osmoda-watch

Supervises the message handler process. If the bot crashes due to a memory leak, unhandled exception, or dependency failure, osmoda-watch restarts it automatically. Configurable restart policies per process.

R

osmoda-routines

Runs the knowledge base refresh job on a cron schedule. Can also trigger event-driven tasks like sending daily conversation summaries or weekly performance reports to your team.

A

agentd (audit ledger)

Logs every conversation event to the SHA-256 hash-chained audit ledger. Immutable, tamper-proof records of every customer interaction. Ready for SOC 2, HIPAA, and GDPR compliance evidence.

M

Memory tools (vector + keyword)

Store and query knowledge base articles as vector embeddings. The 83 built-in tools include vector similarity search and keyword search for hybrid retrieval. All data stays on your server.

C

Multi-channel deployment

Connect to Telegram, WhatsApp, Discord, Slack, and web simultaneously. Each channel runs as an independent process supervised by osmoda-watch. A failure in one channel does not affect the others.

Step-by-Step Setup

How to implement this architecture pattern on your osModa server.

  1. 1

    Spawn a server and SSH in

    Go to spawn.os.moda and create a Solo or Pro server. SSH in with the key you provided during setup. All 9 daemons are already running.

  2. 2

    Index your knowledge base into vector memory

    Load your FAQ, documentation, and help articles into vector memory using the osModa memory tools. Each article becomes a vector embedding that the agent can query at runtime.

  3. 3

    Build the message handler

    Write your agent code that receives messages, queries vector memory for relevant context, calls an LLM to generate a response, and sends it back to the customer. Set a confidence threshold for escalation.

  4. 4

    Connect input channels

    Configure Telegram bot tokens, WhatsApp Business API credentials, Slack app tokens, or Discord bot tokens. Each channel connector runs as a separate process registered with osmoda-watch.

  5. 5

    Schedule knowledge base refresh

    Set up an osmoda-routines cron job to periodically re-index your documentation. This keeps the vector memory current as you update your help articles.

  6. 6

    Configure escalation routing

    Set the confidence threshold and designate a Slack channel or Telegram group for escalated conversations. The agent sends the full conversation context along with the escalation so human agents have everything they need.

Recommended Plan

Customer support bots are lightweight. Most of the compute happens in external LLM API calls. The local agent handles message routing, vector lookups, and audit logging.

Solo — $14.99/mo

2 CPU · 4 GB RAM · 40 GB disk

Best for: single-channel bots, small knowledge bases, under 5,000 conversations per day. Sufficient for most early-stage support operations.

Pro — $34.99/mo

4 CPU · 8 GB RAM · 80 GB disk

Best for: multi-channel bots, large knowledge bases, high conversation volumes, or running additional processes alongside the support bot.

Frequently Asked Questions

Is this template a downloadable starter kit?

No. This is an architecture pattern — a blueprint describing how to design a customer support bot on osModa. It maps out the data flow, the daemons involved, the tools your agent would call, and the recommended plan. You build the agent yourself on your osModa server following this pattern. The daemons and tools referenced here are already running on every osModa server.

How does the vector memory knowledge base work?

osModa provides vector and keyword memory tools as part of the 83 built-in tools. Your support agent stores knowledge base articles as vector embeddings. When a customer asks a question, the agent queries the vector memory for semantically similar content, retrieves the most relevant articles, and uses them as context for generating a response. This is retrieval-augmented generation (RAG) running entirely on your server.

Which channels can the support bot receive messages from?

osModa supports multi-channel deployment across Telegram, WhatsApp, Discord, Slack, and web interfaces. Your agent receives messages from any configured channel through a unified message handler. Each channel connection runs as a separate process supervised by osmoda-watch, so a failure in one channel does not affect the others.

How does the escalation to human agents work?

Your agent code defines a confidence threshold. When the vector memory retrieval returns low-similarity results or the LLM response confidence falls below the threshold, the agent flags the conversation for human review and routes it to a designated Slack channel or Telegram group. The agent can continue handling other conversations while the flagged one waits for a human.

What happens to conversation logs?

Every message received, response generated, and escalation triggered is recorded in the SHA-256 hash-chained audit ledger via agentd. Entries are immutable and tamper-proof. This provides a complete conversation history for quality review, compliance audits, and debugging. The audit ledger is included on every osModa plan at no extra cost.

What plan should I use for a customer support bot?

For small to medium volumes (under 5,000 conversations per day), Solo ($14.99/mo, 2 CPU, 4 GB RAM) is sufficient. For higher volumes, multiple channel connections, or running additional processes alongside the bot, Pro ($34.99/mo, 4 CPU, 8 GB RAM) provides more headroom. The bot itself is lightweight — most of the compute goes to the LLM API calls, which happen externally.

Build Your Support Bot on osModa

Spawn a dedicated server with all 9 daemons pre-installed. Follow this architecture pattern to build a multi-channel support bot with vector memory, human escalation, and audit logging. From $14.99/month.

Last updated: March 2026