IronClaw’s channel system provides a unified interface for communicating with your agent through multiple platforms and protocols.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nearai/ironclaw/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
Channels receive messages from external sources (CLI, messaging apps, HTTP webhooks) and convert them to a unified format for the agent to process. All responses flow back through the same channel.Available Channels
Native Channels
CLI (REPL) - Built-in interactive terminal interface. Always available.- Interactive command-line interface
- Command history and completion
- Debug mode toggle with
/debug
- POST requests with JSON payloads
- Webhook secret authentication
- Optional synchronous responses
- Rate limiting (60 req/min)
- Direct messages and group chats
- DM pairing for access control
- Typing indicators and status updates
- Attachment support within sandbox
- Real-time chat via SSE or WebSocket
- Workspace/memory browser
- Job management interface
- OpenAI-compatible API proxy
WASM Channels
WASM channels are dynamically loaded at runtime from~/.ironclaw/channels/:
Telegram - Telegram Bot API integration.
- Webhook or polling modes
- DM pairing with approval codes
- Group chat with @mention triggering
- Markdown formatting support
- App mentions and DMs
- Thread support
- Signature validation
Message Flow
Incoming Messages
- Receive - Channel receives external input (HTTP POST, WebSocket, Signal message)
- Parse - Convert to
IncomingMessagewith unified fields:id- Unique message UUIDchannel- Source channel nameuser_id- Sender identifiercontent- Message textthread_id- Conversation thread (optional)metadata- Channel-specific routing info
- Emit - Forward to agent loop via message stream
Outgoing Responses
- Generate - Agent creates
OutgoingResponse:content- Response textthread_id- Reply thread (optional)attachments- File paths (optional)
- Route - Channel uses stored metadata to target correct destination
- Send - Channel-specific API call (Telegram sendMessage, Slack chat.postMessage, etc.)
Status Updates
Channels can display real-time agent activity:- Thinking - Agent is processing (shown as typing indicator)
- ToolStarted/ToolCompleted - Tool execution lifecycle
- ToolResult - Preview of tool output (debug mode)
- Status - General status messages
- JobStarted - Sandbox job launched (with URL)
- ApprovalNeeded - Tool requires user confirmation
- AuthRequired/AuthCompleted - Extension authentication flow
Access Control
All channels support three DM policies:open
Allow all users. No restrictions.
allowlist
Only accept messages from pre-approved users. Silent drop for others.
pairing (default)
Combines allowlist with interactive pairing. Unknown users receive a pairing code:
Owner Restriction
Setowner_id to lock the channel to a single user (overrides all DM policies):
Configuration Files
WASM channels use a.capabilities.json file to declare:
- HTTP allowlist - Permitted API endpoints
- Secrets - Required credentials (bot tokens, signing secrets)
- Rate limits - Requests per minute/hour
- Webhooks - Allowed paths and secret validation
- Polling - Minimum interval for getUpdates-style APIs
Channel Lifecycle
- on_start() - Initialize, register webhooks, validate tokens
- start() - Begin listening for messages (returns
MessageStream) - respond() - Send response back to user
- send_status() - Broadcast status updates
- health_check() - Verify channel is operational
- shutdown() - Graceful cleanup (delete webhooks, close connections)
Thread Support
Channels usethread_id for conversation continuity:
- Telegram - Generates deterministic UUID from sender/group ID
- Slack - Uses Slack’s native
thread_ts - Signal - Uses
source_uuidor phone-based UUID - HTTP - Optional
thread_idin request payload - Web Gateway - WebSocket connection or SSE client ID
maybe_hydrate_thread loads conversation history when a thread ID matches a stored session.
Rate Limiting
Channels enforce rate limits to prevent abuse:- HTTP Webhook - 60 requests/minute
- Telegram - 30 API calls/minute
- Slack - 50 API calls/minute
- Web Gateway - 30 chat messages/minute
Security
Webhook Secrets
HTTP-based channels require secret validation:- HTTP -
HTTP_WEBHOOK_SECRETin request body - Telegram -
X-Telegram-Bot-Api-Secret-Tokenheader - Slack - HMAC signature validation with signing secret
Sandboxing (WASM Channels)
WASM channels run in a secure sandbox:- No filesystem access (except workspace via host APIs)
- HTTP limited to declared allowlist
- No raw credential access (host injects tokens via URL placeholders)
- Emit rate limits prevent message floods
Path Validation
Attachment paths are validated to prevent traversal attacks:Next Steps
- Telegram Setup - Configure Telegram bot
- Slack Setup - Configure Slack app
- Signal Setup - Install signal-cli daemon
- HTTP Webhook - Programmatic API access
- Web Gateway - Browser UI