Use Case Documentation

ENVOY

Integration & Channel Adapter Layer

Reading time: 5 min
Version: 2.1
Last updated: 2026
01 — Overview

Multi-Channel Integration

Envoy is the Integration Layer in the MADEIRA architecture, connecting AI agents to external communication channels and systems. It serves as the bridge between the intelligence layer and the outside world, handling message routing, protocol translation, and channel-specific adaptations.

Built on the Channel Adapter pattern, Envoy enables MADEIRA agents to interact seamlessly across Telegram, Slack, WhatsApp, and the A2UI Canvas web interface. Each adapter translates platform-specific events into the unified MADEIRA messaging format while respecting platform constraints and capabilities.

Envoy is not a chatbot. It is the gateway that allows intelligent agents to communicate through multiple channels while maintaining consistent behavior and context across all interactions.

02 — Channel Adapters

Multi-Channel Integration

Telegram Bot

Real-time messaging with support for inline queries, callbacks, and rich media. Handles bot commands, message threading, and user authentication via Telegram ID.

Slack Adapter

Workspace integration with channel mentions, threaded replies, and interactive components (buttons, modals). OAuth 2.0 authentication with workspace-level permissions.

WhatsApp Adapter

Business API integration for mobile communication. Supports text, media, and template messages. Handles session windows and message delivery receipts.

A2UI Canvas

Web dashboard interface with real-time updates via WebSocket. Full-featured chat UI with typing indicators, file uploads, and rich message formatting.

Channel Capabilities

ChannelReal-TimeRich MediaThreading
TelegramWebSocket/PollingImages, Files, AudioReply-to
SlackEvents APIAll types + BlocksNative threads
WhatsAppWebhookImages, DocumentsSession-based
A2UI CanvasWebSocketAll typesConversation view
03 — Message Flow

Request/Response Pipeline

Every message flows through a standardized pipeline that ensures consistent processing regardless of the originating channel.

Message Pipeline

1

Ingestion

Channel adapter receives platform-specific event, validates auth

2

Normalization

Transforms to unified MADEIRA message format with metadata

3

Routing

Gateway routes to appropriate agent based on agents.list bindings

4

Processing

Agent processes request, may delegate to swarm for complex tasks

5

Response

Adapter transforms response to channel-specific format, delivers

04 — Architecture

Control Plane Integration

Envoy adapters connect to the MADEIRA Gateway (Control Plane) which handles authentication, agent routing, and channel multiplexing. The gateway is bound to 127.0.0.1:18789 (localhost) for security.

Channels

External Platforms

Telegram, Slack, WhatsApp, Web

Envoy

Integration Layer

Adapters, Protocol Translation

Gateway

Control Plane

Auth, Routing, Multiplexing

Each channel adapter is stateless. Session state and conversation context are managed by the MADEIRA Memory Server (Intelligence Layer), allowing seamless cross-channel continuity.

05 — Configuration

Channel Bindings

Channels are bound to agents via the openclaw.json configuration. Each agent can optionally declare channel bindings for external routing.

// openclaw.json
{
  "agents": {
    "list": [
      {
        "id": "madeira",
        "identity": { "name": "Madeira", "emoji": "🌊" },
        "bindings": {
          "telegram": { "botToken": "${TELEGRAM_BOT_TOKEN}" },
          "slack": { "appToken": "${SLACK_APP_TOKEN}" }
        }
      }
    ]
  }
}

Environment Variables

VariableChannelPurpose
TELEGRAM_BOT_TOKENTelegramBot authentication
SLACK_APP_TOKENSlackSocket mode connection
SLACK_SIGNING_SECRETSlackRequest verification
WHATSAPP_API_TOKENWhatsAppCloud API access
A2UI_WS_PORTA2UI CanvasWebSocket server port
06 — Getting Started

Integration Path

Channel adapters can be added incrementally. Start with A2UI Canvas for web access, then add messaging platforms as needed.

Phase 1

Web Dashboard

A2UI Canvas provides immediate web access. Start gateway, open dashboard, begin chatting.

openclaw dashboard

Phase 2

Messaging

Add Telegram or Slack for team communication. Configure bot tokens, update bindings.

1-2 hours setup

Phase 3

Multi-Channel

Add WhatsApp for mobile, configure cross-channel context sharing, optimize routing.

Production ready

Contents