Use Case Documentation
ENVOY
Integration & Channel Adapter Layer
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.
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
| Channel | Real-Time | Rich Media | Threading |
|---|---|---|---|
| Telegram | WebSocket/Polling | Images, Files, Audio | Reply-to |
| Slack | Events API | All types + Blocks | Native threads |
| Webhook | Images, Documents | Session-based | |
| A2UI Canvas | WebSocket | All types | Conversation view |
Request/Response Pipeline
Every message flows through a standardized pipeline that ensures consistent processing regardless of the originating channel.
Message Pipeline
Ingestion
Channel adapter receives platform-specific event, validates auth
Normalization
Transforms to unified MADEIRA message format with metadata
Routing
Gateway routes to appropriate agent based on agents.list bindings
Processing
Agent processes request, may delegate to swarm for complex tasks
Response
Adapter transforms response to channel-specific format, delivers
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.
External Platforms
Telegram, Slack, WhatsApp, Web
Integration Layer
Adapters, Protocol Translation
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.
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
| Variable | Channel | Purpose |
|---|---|---|
| TELEGRAM_BOT_TOKEN | Telegram | Bot authentication |
| SLACK_APP_TOKEN | Slack | Socket mode connection |
| SLACK_SIGNING_SECRET | Slack | Request verification |
| WHATSAPP_API_TOKEN | Cloud API access | |
| A2UI_WS_PORT | A2UI Canvas | WebSocket server port |
Integration Path
Channel adapters can be added incrementally. Start with A2UI Canvas for web access, then add messaging platforms as needed.
Web Dashboard
A2UI Canvas provides immediate web access. Start gateway, open dashboard, begin chatting.
openclaw dashboard
Messaging
Add Telegram or Slack for team communication. Configure bot tokens, update bindings.
1-2 hours setup
Multi-Channel
Add WhatsApp for mobile, configure cross-channel context sharing, optimize routing.
Production ready