Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ meta_keywords: "AI Transport, authentication setup, Ably JWT, authCallback, toke
intro: "AI Transport authenticates through your existing auth: your server validates the user and signs an Ably token, and the browser's Ably client fetches it through `authCallback`and refreshes it before expiry."
---

<Aside data-type='note'>
This page is the practical setup. For the conceptual model (the three auth layers, capabilities, token lifecycle, cancel authorisation), see the [authentication concept](/docs/ai-transport/concepts/authentication).
</Aside>

AI Transport reuses the authentication you already have. Your server validates the user and signs a short-lived Ably JWT, scoped to the channels that user can reach. The browser's Ably client fetches that token through an `authCallback` and refreshes it before it expires, so the connection stays authenticated for the whole conversation. The steps below wire up the server endpoint, the client, and the separate POST that wakes the agent.

<Aside data-type='important'>
Never embed an Ably API key in client-side code. API keys do not expire and are not suitable for untrusted clients.
Expand Down
4 changes: 0 additions & 4 deletions src/pages/docs/ai-transport/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ AI Transport is for conversations between a user and an AI agent. If you are bui
]}
</Tiles>

<Aside data-type='important'>
AI Transport requires one [channel rule](/docs/ai-transport/getting-started/channel-rules), **Message annotations, updates, deletes, and appends**, enabled on the namespace your conversations live on. It is a one-time setup per Ably app, and streaming fails without it.
</Aside>

## Read next <a id="read-next"/>

- [Concepts](/docs/ai-transport/concepts): the building blocks (sessions, turns, transport, codec, conversation tree, infrastructure).
Expand Down