Skip to main content

Overview

Channels are IronClaw’s abstraction for receiving messages from external sources and sending responses back. They provide a unified interface regardless of the underlying transport (CLI, HTTP, Telegram, web browser).

Architecture

Channel Trait

All channels implement a common interface:

Message Types

Incoming Message

Unified format for all inbound messages:
Example:

Outgoing Response

Format for responses back to channels:

Status Updates

Real-time activity indicators:

Built-in Channels

REPL Channel

Interactive command-line interface.
Features:
  • Readline support (history, editing)
  • Command completion
  • Multi-line input (Ctrl+D to submit)
  • Status updates (thinking indicators)
  • Color-coded output
Commands:
  • /quit, /exit - Exit IronClaw
  • /clear - Clear conversation
  • /new - Start new thread
  • /undo - Undo last turn
  • /redo - Redo undone turn
  • /jobs - List running jobs
  • /status <id> - Check job status
  • /cancel <id> - Cancel job
  • /interrupt - Stop current operation
  • /compact - Compact conversation history
  • /summarize - Summarize current thread
  • /heartbeat - Run heartbeat check

HTTP Channel

Webhook receiver for external integrations.
Endpoints:
Use Cases:
  • CI/CD notifications
  • Monitoring alerts
  • External system events
  • Scheduled jobs (cron)

WASM Channels

Dynamic channel implementations loaded as WebAssembly modules. Architecture:
Capabilities:
Example: Telegram Channel
1

Build WASM Module

2

Bundle with Runtime

3

Configure Bot Token

4

Start IronClaw

See Telegram Setup Guide for complete integration instructions.

Web Gateway

Browser-based UI with real-time streaming. Transport Protocols:
Purpose: Server-to-client streaming (status updates, tool execution)
Event Types:
  • thinking - Agent is processing
  • tool_started - Tool execution began
  • tool_result - Tool output preview
  • message - Response chunk
  • complete - Turn finished
  • error - Error occurred
UI Features:

Chat Interface

  • Multi-threaded conversations
  • Real-time streaming responses
  • Tool execution cards
  • Approval prompts

Memory Browser

  • Search workspace files
  • View/edit documents
  • Daily logs explorer
  • Memory tree view

Job Monitor

  • Live job tracking
  • Container logs
  • Status updates
  • Cancel/retry controls

Extensions

  • Install MCP servers
  • Manage WASM tools
  • OAuth authentication
  • Tool activation

Channel Manager

Coordinates multiple channels and message routing.
Message Flow:

Conversation Context

Channels provide contextual information for the LLM:
System Prompt Injection:

Broadcasting

Channels support proactive messaging for alerts and notifications. Example: Heartbeat Notification
Use Cases:
  • Heartbeat urgent items
  • Routine execution results
  • System alerts
  • Self-repair notifications
  • Job completion updates

Thread Management

Channels support multi-threaded conversations.
Thread Lifecycle:
  1. Creation: First message in thread
  2. Hydration: Load from database if historical
  3. Updates: Append turns as conversation continues
  4. Persistence: Save to database after each turn
  5. Pruning: Auto-delete stale threads after idle timeout

Custom Channel Development

Build your own channel implementation:
1

Implement Channel Trait

2

Register with ChannelManager

3

Handle Messages

Channel manager automatically:
  • Merges your stream with others
  • Routes responses back to your channel
  • Handles broadcasts
For production channels, consider building as WASM modules for hot-reloading and sandboxing.

Next Steps

Telegram Setup

Configure Telegram bot integration

Web Gateway

Deploy browser-based interface

Webhook Server

Receive events from external systems

WASM Channels

Build custom channels as WASM modules