Conversational Channels

This content was generated with the assistance of AI and should be verified against the official documentation of each tool and framework before being relied on in production.

This section’s bibliography lists the reference material consulted while preparing these pages.

This sub-section was written on 2026-10-01 against LangChain 1.4.3 (with langchain-core 1.6.6 and langgraph 1.2.12) and FastAPI 0.142.2 on Python 3.12, Spring AI 2.0.1 on Spring Boot 4.1.1 with Java 21, the AI SDK UI Message Stream protocol (ai 7.x, @ai-sdk/react 4.x), AG-UI 1.0, Teams SDK 2.1.x, the Microsoft 365 Agents SDK 1.x, Slack Bolt for Python 1.30.0, python-telegram-bot 22.8 and Smack 4.5.0; the full list is in the version baseline below. Versions were read from PyPI, npm, Maven Central and GitHub releases on that date. The code on the pages is illustrative: it is written from the official documentation of each platform and is not compiled by this repository, and each page says in its lead paragraph what was and was not checked. Platform policies change often, so every policy statement on these pages carries the date it was read.

A retrieval-augmented assistant that only answers in a demo UI is not yet a product: people ask questions where they already work, in a browser tab, in Teams, in WhatsApp or in a terminal-adjacent chat protocol. The RAG Systems in Production sub-section builds the assistant and serves it as a REST, SSE and WebSocket API. This sub-section takes the next step: it puts that same assistant behind many channels without rewriting it for each of them.

The idea: one core, many adapters

Every page uses the same running scenario, DocsAssistant, which answers questions about this site’s documentation. Its core exposes one channel-agnostic operation:

ask(conversationId, userId, text) -> stream of { token | citation | done }

The core is implemented twice, exactly as in the RAG Systems sub-section: in Python with LangChain create_agent, a retriever tool, a Postgres checkpointer and FastAPI, and in Java with the Spring AI ChatClient, the RAG advisor, JDBC chat memory and Spring Boot. A channel adapter sits in front of the core and has three jobs: map the channel’s user and thread identifiers to userId and conversationId (which drives memory and access control), map the core’s token stream to what the channel can actually do (native streaming, message edits, a typing indicator or whole messages), and render citations in the channel’s native idiom (links, cards or buttons).

flowchart LR subgraph Own["Your own surfaces"] SSE[SSE / WebSocket API] UI[Chat UI protocols and widget] RTC[WebRTC data channel] XM[XMPP bot] end subgraph Biz["Business channels"] TM[Microsoft Teams] WA[WhatsApp Business] AM[Apple Messages for Business] SL[Slack / Telegram / Google Chat] RC[RCS] end SSE --> AD[Channel adapters] UI --> AD RTC --> AD XM --> AD TM --> AD WA --> AD AM --> AD SL --> AD RC --> AD AD --> CORE["DocsAssistant core: ask(conversationId, userId, text)"] CORE --> RAG[(Retriever, memory, ACL filter)]

The channel landscape

Your own surfaces are the ones you control end to end. A streaming HTTP or WebSocket API is the base that everything else can reuse; the AI SDK UI Message Stream and AG-UI protocols standardise what flows over it so that off-the-shelf UI libraries can render it; ready-made UIs such as assistant-ui, Chainlit, Open WebUI and LibreChat can sit on top, or you can embed a small widget in a web page. WebRTC data channels and XMPP are the two non-HTTP options: the first earns its place mainly when a media connection already exists, the second when you need a federated, self-hostable chat protocol.

Business channels are surfaces owned by someone else, so the platform dictates the rules: registration or approval, message formats, windows during which you may reply, and what an AI assistant is allowed to do. Microsoft Teams is the natural channel for employees of a Microsoft 365 organisation, WhatsApp and Apple Messages for Business and RCS reach customers on their own phones, and Slack, Telegram and Google Chat cover team and community chat.

Channel matrix

Channel matrix for a chat assistant. Twelve channels are compared on streaming, rich user interface, identity, approval needed and best fit. Own surfaces: SSE or HTTP API with native token streaming, WebSocket with bidirectional streaming, a web chat widget over SSE, a WebRTC data channel that needs a TURN server, and XMPP where streaming is simulated with message corrections. Business channels: Microsoft Teams with streaming in one-to-one chats and Adaptive Cards, WhatsApp Business with whole messages, buttons and a 24-hour window, Apple Messages for Business through a messaging service provider, Slack with streaming and Block Kit, Telegram with draft streaming, Google Chat with cards and edits, and RCS Business Messaging that needs a partner and a carrier launch.

The table below adds what the figure cannot hold: the policy limits and where pricing is documented. Prices change too often to quote; each row links to the platform’s own pricing or terms page.

Channel Policy limits to know Pricing Page

SSE, WebSocket, widget, WebRTC, XMPP

None imposed by a platform; your own authentication, rate limits and privacy rules apply.

Your own hosting; a TURN server and an XMPP server are extra components.

Streaming Chat APIs

Microsoft Teams

Entra app registration, tenant admin consent and sideloading rules; Bot Framework SDKs are retired.

Teams SDK and Azure Bot Service resources; see Azure pricing.

Microsoft Teams

WhatsApp Business

A 24-hour customer-service window, template messages outside it, opt-in rules and an AI-provider clause in the Business Solution Terms.

Per-message pricing: WhatsApp pricing.

WhatsApp Business

Apple Messages for Business

Conversations start from Apple-approved entry points and go through a Messaging Service Provider.

Set by the chosen provider.

Apple Messages for Business

Slack, Telegram, Google Chat

App review for public distribution (Slack), bot token and rate limits (Telegram), Workspace administration (Google Chat).

Mostly free to build; Slack and Google Workspace plans apply.

Slack, Telegram & Google Chat

RCS Business Messaging

Partner onboarding and carrier launch approval.

Set by the partner and carriers.

RCS Business Messaging

Reading path

Read the pages in navigation order on a first pass. Shorter paths:

A web assistant you own

Assistants for employees

Assistants for customers

Real-time and self-hosted protocols

What’s covered

Foundations

  • Channel-Agnostic Architecture — the core-plus-adapters pattern, identity and conversation-state mapping, streaming capability negotiation, citations as cards, human handoff, rate limits, idempotent webhooks, asynchronous answers and multi-tenancy.

Own channels

  • Streaming Chat APIs — SSE, WebSocket and NDJSON in FastAPI, Spring and Node, cancellation, reconnection, backpressure and proxy buffering.

  • Chat UI Protocols — the AI SDK UI Message Stream protocol and AG-UI.

  • Ready-Made Chat UIs — assistant-ui, Chainlit, Open WebUI and LibreChat compared.

  • Embedding a Web Chat Widget — a framework-free widget, React and Vue variants, accessibility, CSP and CORS.

  • WebRTC Data Channels — signalling, STUN/TURN and aiortc.

  • XMPP Bots — JIDs, servers, components, chat states, message corrections, slixmpp and Smack bots.

Business channels

Operations

  • Operating Chat Channels — secrets, signatures, retries, deduplication, observability, abuse, retention, moderation, testing and cost.

Cheat sheet

Voice is a separate sub-section (Voice Agents); LLMOps & Evaluation covers operating these channels in production; AI Security & Responsible AI covers threat modelling, prompt injection and governance for them.

Version baseline

Every version below was read on 2026-10-01 from PyPI, npm, Maven Central or GitHub releases, or from the platform’s own documentation. Each page repeats the subset it uses in its lead paragraph; if a page and this table ever disagree after an update, this table wins.

Area Versions

LangChain (Python)

langchain 1.4.3, langchain-core 1.6.6, langgraph 1.2.12 and langgraph-checkpoint-postgres 3.1.2, on Python 3.12.

Web layer (Python)

FastAPI 0.142.2, whose fastapi.sse module provides EventSourceResponse and ServerSentEvent; sse-starlette 3.5.0 as the older alternative; uvicorn 0.54.0.

Spring AI

2.0.1 through org.springframework.ai:spring-ai-bom:2.0.1 on Spring Boot 4.1.1 and Java 21 (ChatClient.stream() returns a Flux); a 2.1 milestone exists and is not used.

Chat UI protocols

AI SDK ai 7.0.126 and @ai-sdk/react 4.0.129 (the UI Message Stream protocol, header x-vercel-ai-ui-message-stream: v1; the older data-stream protocol is legacy); AG-UI 1.0 (ag-ui-protocol 1.0.0 and @ag-ui/core 1.0.1 for Python and JavaScript, ag-ui-langgraph 0.0.45); Express 5.2.1.

Ready-made UIs

@assistant-ui/react 0.15.22, Chainlit 2.12.0 (community-maintained since May 2025), Open WebUI 0.11.4. LibreChat was not pinned: its GitHub release feed returned only a Docker tag on that date, so the pages refer to the project’s current documentation.

WebRTC

aiortc 1.15.0 for Python; the browser APIs as specified by the W3C WebRTC recommendation; coturn from its current release.

XMPP

slixmpp 1.17.0 (Python 3.11 or newer), Smack 4.5.0 (the 4.6 line is alpha), xmpp.js 0.14.0; ejabberd 26.09, Openfire 5.1.2 and Prosody from its current documentation; RFC 6120/6121 and the XEPs listed in the bibliography.

Microsoft

Teams SDK 2.1.x for TypeScript (@microsoft/teams.apps 2.1.0), Python (microsoft-teams-apps 2.1.0, announced as generally available on the Teams SDK site on this date) and C# (teams.net 2.1.1); Microsoft 365 Agents SDK 1.x (microsoft-agents-hosting-core 1.7.0, @microsoft/agents-hosting 1.9.1). The Bot Framework SDK repositories (botbuilder-js, -dotnet, -python, -java) are archived on GitHub. Azure Bot Service remains the registration layer.

WhatsApp

Meta WhatsApp Business Platform (Cloud API) documentation under developers.facebook.com/documentation/business-messaging/whatsapp; per-message pricing since 2025-07-01 as stated on the pricing page; Twilio twilio 9.11.2. The text of the Business Solution Terms could not be fetched programmatically (the page is rendered client-side), so the AI-provider clause is cited by link and described cautiously on the WhatsApp page.

Apple, Slack, Telegram, Google, RCS

Apple Messages for Business documentation on register.apple.com (read as documentation only, no account used); Slack Bolt for Python 1.30.0, slack-sdk 3.44.1, Bolt for JavaScript 5.1.0 and Bolt for Java 1.52.0, with the Assistant class and thread-status APIs; Telegram Bot API 10.3 (methods sendMessageDraft and sendRichMessageDraft are listed in the changelog), python-telegram-bot 22.8 and TelegramBots 10.3.0; Google Chat and Workspace add-on ADK quickstart; RCS Business Messaging from Google’s current documentation.

Twilio

Twilio WhatsApp sandbox, twilio Python helper 9.11.2.

Where the books are out of date

None of the requester-provided books covers messaging channels; only the chapters named in the bibliography are used, and only for concepts. The differences that matter:

  • LangChain streaming. Learning LangChain (Chapter 8) describes streaming through the earlier chain and graph APIs. In LangChain 1.x agents are built with langchain.agents.create_agent and streamed with stream_mode values such as messages, as described in the LangChain streaming documentation.

  • Spring AI streaming. Spring AI in Action (Chapter 3) shows stream() returning a Flux; that is still the shape, but Spring AI 2.0 on Spring Boot 4 changed the surrounding property names and advisor classes; see Streaming and Reactive.

  • Teams and bots. Any text that builds Teams bots on the Bot Framework SDK is out of date: its SDK repositories are archived. The Teams SDK and the Microsoft 365 Agents SDK are the supported paths.

Bibliography

The following sources were consulted while preparing the pages of this sub-section. Every code example was written from the current official documentation of the platform it uses — never copied from a book. Every documentation page cited on the pages is listed here once. All links below were requested on 2026-10-01 and resolved, except the Microsoft Azure Bot Service overview page named in the original outline, which now answers HTTP 404; the Azure Bot Service documentation home is listed instead. Two addresses redirect: the WhatsApp Business Solution Terms address redirects to Meta’s terms for the WhatsApp Business Platform, and the Slack AI apps address redirects to the Bolt for JavaScript agent-features page.

Requester-provided books

None of these books covers messaging channels. Only the chapters named below are consulted, for concepts. Their text and code are not reproduced; concepts are paraphrased and credited on the page that uses them.

oreilly.com answers automated fetches with an HTTP 403 response, but the publisher pages above are live pages when opened in a browser.

Official documentation

Web platform

Streaming back-ends

UI protocols and ready-made UIs

XMPP

Microsoft

WhatsApp

Apple, Slack, Telegram, Google and RCS

Specifications and standards

Papers and engineering articles

This sub-section is about integration surfaces and cites no research papers; the papers behind the underlying RAG assistant are listed in the RAG Systems in Production bibliography.

The requester-provided books are consulted references, not the primary source of any example on these pages. On any discrepancy between a book and the official documentation of a tool or framework, the official documentation is authoritative. No book PDF is committed or attached anywhere in this repository.

References