Channels
MushroomAgent has two related integration layers:
- Communication transports are runtime entrypoints exposed by
mushroom-agent serve:http,websocket, andfunc. - Platform channels adapt external chat or media platforms into MushroomAgent messages, then route them through the communication layer.
Use transports when your own service or script calls MushroomAgent directly. Use platform channels when MushroomAgent should live inside an existing chat or realtime platform.
Communication transports
| Transport | Entry | Good fit |
|---|---|---|
http | POST /v1/chat, GET /i/health | Backend services, scripts, curl tests, browser UI hosting |
websocket | /ws/v1/chat, /ws/v1/realtime | Persistent bidirectional text chat and realtime voice |
func | In-process communication | Tests and Python application embedding |
Start selected transports with:
mushroom-agent serve --communications http,websocket,func
For local browser testing, add --ui to mount /web:
mushroom-agent serve --ui
Platform channels
| Channel | Connection | Public IP needed | Features |
|---|---|---|---|
| Feishu | WebSocket long connection | No | Events, text replies |
| Discord | WebSocket + REST API | No | Messages, text replies, slash commands |
| OpenIM | WebSocket + API | Depends on deployment | Message gateway and API integration |
| MagicCampus | Pearl API | Depends on deployment | Multi-platform message integration |
| LiveKit | WebRTC / LiveKit APIs | Depends on deployment | Realtime media and voice sessions |
Feishu
Connects to Feishu servers via WebSocket long connection. No public IP required to receive bot events and send replies.
- Connection: WebSocket long connection
- Public IP: not required
- Features: event receiving, text replies
See Feishu for detailed config.
Discord
Connects to Discord Gateway via WebSocket to receive messages, and sends replies through REST API.
- Connection: WebSocket + REST API
- Features: message receiving, text replies, slash commands
See Discord for detailed config.
OpenIM, MagicCampus, and LiveKit
The current config template includes disabled sections for openim, magiccampus, and livekit. Enable them only when you have the corresponding platform credentials and deployment details. Dedicated setup pages are still being expanded; use the configuration reference and generated template as the source of truth.
General config
The template generated by mushroom-agent init includes this config:
channels:
feishu:
enabled: false
app_id: ""
app_secret: ""
verification_token: ""
encrypt_key: ""
discord:
enabled: false
bot_token: ""
openim:
enabled: false
magiccampus:
enabled: false
livekit:
enabled: false
Notes
- Channels can run simultaneously; when multiple channels are configured, MushroomAgent routes by conversation
- Group behavior varies by channel
- Refer to each channel page for detailed configuration and environment variables