Channel messaging
What Channels are
Channels are ingress paths between users and the platform. The same Agent capabilities can surface on different Channels—users keep their existing habits:
Rendering diagram…
Supported Channels
| Channel | Capabilities | Typical use |
|---|---|---|
| Web Chat | Rich text, streaming, uploads, live artifacts | Default web UI |
| Feishu / Lark | IM (@ bot / groups / DM), doc comment triggers, cards, attachments | Collaboration-first teams |
| WeCom | IM (@ bot / groups / DM), cards, files | SOE / government on-prem |
| Email SMTP · IMAP | Send / receive / rule triggers / attachments | Partners, deliveries |
| Webhook | Generic HTTP POST | CI / Jira / DOORS triggers |
Four adapter responsibilities
1. Identity mapping
External identities (Feishu open_id, WeCom userid, email) → tenant / user / session owner.
- Strict mapping: external IDs must bind first in the platform
- Dynamic mapping: auto-provision users (e.g., email domain → tenant)
2. Session resolution
Which Session should receive a message?
- Group vs DM: groups often shared Session; DM per user
- Topic isolation: Feishu topics / WeCom threads → different Sessions
- Time windows: after X idle hours, open a fresh Session
3. Format conversion
| Source | Canonical format | Reply |
|---|---|---|
| Feishu rich text / cards | Platform Message | Feishu cards / rich text |
| WeCom markdown cards | Platform Message | WeCom markdown cards |
| Email HTML / attachments | Platform Message | Email HTML |
| Webhook JSON | Platform Event | HTTP response |
4. Credentials / rate limits / debounce
- Credentials: Bot tokens / OAuth / secrets in Credential vault
- Rate limits: per-Channel counters to prevent abuse
- Debounce: merge duplicate messages within N seconds
Message lifecycle (Feishu example)
DM / group policies
Configurable per Channel:
| Policy | Behavior |
|---|---|
dm-only | Ignore group @-mentions |
mention-only | Groups: only messages that @ the bot |
all | All group traffic (small dedicated-bot rooms) |
command-prefix | Only lines starting with /, @xxx, etc. |
Configuration
Manage each Channel under Integrations:
- Feishu:
App ID+App Secret+ event subscription URL - WeCom:
CorpID+AgentID+Secret - Email: SMTP / IMAP accounts
See Integrations.
Related docs
- Event trigger — Channels are also triggers
- Feishu integration · WeCom integration · Email integration
- Code entrypoints:
AgentFlow/src/channels/·api/apps/channel_app.py