Platform-neutral channel adapters for Anvia agents or ordinary application code. Receive where your users already are, or deliver proactively from workers, monitors, and scheduled jobs without starting an agent. The five libraries are in beta while live-platform verification completes.

Five packages.
Two layers.

One neutral core that models channels, events, and delivery — and one thin adapter per platform on top.

@anvia/channel

The neutral core: addresses, events, messages, validation, and delivery helpers shared by every adapter.

sendChannelMessage()

@anvia/channel-agent

The bridge: runs an existing Anvia agent behind any channel adapter with sessions, streaming, and approvals handled.

createChannelAgent()

@anvia/discord

Discord Gateway input and REST delivery with buttons, files, threads, and typing indicators.

discord()

@anvia/slack

Slack Socket Mode input and Web API delivery with Block Kit actions, files, and threads.

slack()

@anvia/telegram

Telegram long polling or webhook input with Bot API delivery and inline keyboards.

telegram()

From bot token to
a running agent.

The bridge owns the mechanics platforms differ on — sessions, streaming, splitting, actions — so your agent sees one consistent conversation shape.

  1. 01

    Pick the adapter

    Create a platform adapter with its credentials — discord(), slack(), or telegram() — and the receive transport is wired.

  2. 02

    Bridge the agent

    Pass the adapter and your existing Anvia agent to createChannelAgent() and start the returned service.

  3. 03

    Converse

    Default message filtering, stable conversation sessions, multimodal prompts, streaming edits, long-message splitting, native actions, and paused approval or question flows.

  4. 04

    Operate

    Stop gracefully with service.stop(), or skip receiving entirely and deliver proactively from workers and scheduled jobs.

Your agent.
Their chat app.

Create a platform adapter, pass it and an existing Anvia agent to createChannelAgent(), and start the returned service. The agent itself does not change.

Run the bridge in your application. You configure credentials, choose the agent's memory store and retention policy, and enforce authorization in your tools. Channel adapters handle message delivery.

Read the end-to-end guide
agent.ts
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})

Send first.
Receive optionally.

An alerting or worker process only needs a platform adapter and sendChannelMessage(). Long text is split for the selected platform, and native actions ride along. Receiving never has to be started.

Read the channel guide
worker.ts
1import { sendChannelMessage } from '@anvia/channel'2import { discord } from '@anvia/discord'34const channel = discord({ token: process.env.DISCORD_BOT_TOKEN! })56await sendChannelMessage(7  channel,8  { platform: 'discord', conversationId: process.env.DISCORD_CHANNEL_ID! },9  {10    text: monitoringReport,11    actions: [{ id: 'incident:ack', label: 'Acknowledge', style: 'primary' }],12  },13)

Three platforms.
One event shape.

Incoming external payloads are validated at runtime and normalized into ChannelEvent values. Optional operations are advertised through channel.capabilities. All three adapters expose message edits, deletion, and reactions.

Discord

Receive transport: Gateway.

filesbuttonsreplies + threadstypingedits + reactions

Slack

Receive transport: Socket Mode.

filesBlock Kit buttonsreplies + threadsedits + reactions

Telegram

Receive transport: Long polling or webhook.

filesinline keyboardreplies + threadstypingedits + reactions

Working bots in
three commands.

The workspace ships complete Discord, Slack, and Telegram agents with OpenAI models and persistent SQLite conversation memory.

Browse the examples
  1. 01
    Install the workspace

    Node.js 24+ and pnpm 11. Run pnpm install at the repository root to link all five packages.

  2. 02
    Configure credentials

    Copy the example .env.example for your platform and set its bot or app tokens plus OPENAI_API_KEY.

  3. 03
    Start an example

    Run pnpm example:discord, pnpm example:slack, or pnpm example:telegram and message the bot.

One runtime.
Every conversation.

Start from a working example, bridge the agent your product already runs, then read how the five packages divide the work.