Sessions per sender
DMs and mentions by default, with a conversation session for each sender.
Pass an Anvia agent and a platform adapter to createChannelAgent() and start the service. The bridge handles sessions, streaming, splitting, and approvals, so the agent itself does not change.
The service owns the adapter lifecycle. You own the agent, its memory, and its tools.
Use the Anvia agent your product already runs.
Discord over Gateway, Slack over Socket Mode, or Telegram with long polling or webhooks.
createChannelAgent() connects the agent with streaming and interaction options.
Start the service, and stop it cleanly on SIGTERM.
DMs and mentions by default, with a conversation session for each sender.
Replies stream by editing a placeholder message, and long answers are split for the platform.
Paused approvals render as Discord buttons, Slack Block Kit, or Telegram inline keyboards, with text replies as a fallback.
A SQLite interaction store keeps paused approvals and questions across restarts.
Swap the adapter for Discord or Slack. The rest stays the same.
1import { createChannelAgent } from '@anvia/channel-agent'2import { telegram } from '@anvia/telegram'34const channel = telegram({ token: process.env.TELEGRAM_BOT_TOKEN! })5const service = createChannelAgent({6 channel,7 agent,8 streaming: { placeholder: 'Thinking…' },9})1011await service.start()1213process.once('SIGTERM', () => {14 void service.stop()15})Channels is in beta and its packages are not published to npm yet. Only one interaction can be pending per conversation and sender, and Slack has no typing indicator.
Start from the guide, run the example, or look at what else Anvia handles.