Channels
Channels
How external transports reach LifeOSAI agents — inbound dispatch and the shared outbound message tool.
How external transports reach LifeOSAI agents. Use the Full screen button above, or open the channels diagram in a new tab ↗.
Channels System
Channels allow external transports to talk to LifeOSAI agents.
Current channel shape:
- WhatsApp plugin
- Telegram plugin
- channel registry
- channel session store
- inbound dispatch
- outbound message tool
The central outbound contract is the channel message tool. Claude Code receives
it as mcp__channels__message. Pi Agent has an equivalent tool implementation
under the runtime tools path.
Inbound Channel Flow
The channel dispatcher is transport-agnostic. WhatsApp and Telegram provide their own stream sinks because their delivery behavior differs:
- Telegram can update streamed messages more naturally.
- WhatsApp usually buffers and sends a final message.
Channel To Company Orchestration
A channel message can either:
- continue a direct channel conversation with an agent, or
- create a wakeup for company work when the message maps to a company agent.
The wake context should carry channel metadata when source is channel:
- channel chat id
- sender phone or sender id
- sender display name
- inbound message text
- channel alias
The runtime receives this as LIFEOSAI_* env so the agent can reason about the
source without needing direct transport credentials.
Outbound Channel Tool
The outbound tool is intentionally shared across runtimes:
mcp__channels__message or Pi channels toolapps/api/src/channels/message-tool.tsThis keeps channel sending out of the model prompt and inside an audited tool path.