- Start channel adapters.
- Accept inbound messages.
- Apply pairing and allowlist checks.
- Resolve routing and select the AI backend.
- Load recent history for context.
- Call the configured backend.
- Store the exchange locally and send the response back to the channel.
Self-healing loops
The runtime also runs periodic “maintenance” loops:- Team watchdog (auto-respawn stalled teammates)
Routing
The runtime resolves the AI backend in this order:- Per-peer override
- Per-group override
- Per-channel override
- Default adapter
routing in the config file.
Example
If you override routing for one Telegram group, only that group uses the custom adapter; everything else falls back to the default.Metrics
The runtime tracks:- inbound message count
- outbound message count
- last inbound/outbound timestamps