New feature
In 1.0.0, your application interacts with the Ably channel through the Pub/Sub SDK, and the AI Transport SDK provides the adaptors and decoders that connect AI providers to that channel.
With 1.0.0, you can:
- Publish AI output with an agent adaptor.
vercelAdaptor,openaiAdaptor, andagUiAdaptorpublish Vercel AI SDK, OpenAI Responses API, and AG-UI output on a channel you got from your Pub/Sub client, andcreateAgentAdaptordoes the same for a format of your own. - Read agent output on the subscription you already have. A client can read an agent's response with
channel.subscribe, beside your users' messages and the other messages your application publishes. An agent can join a conversation between people. - Use the rest of Pub/Sub on the same channel. Your application sets the channel's options, and can use any Pub/Sub feature on it, such as presence or LiveObjects.
- Keep the conversation in your database. A client can catch up by rewinding the channel to the last serial your database stored.
- Act on each event as the agent publishes it.
pipeEachyields each event with the serial of the message that holds it, so the agent can store the serial of a finished response. - Use
useChatwith an Ably channel.createChatTransportfrom@ably/ai-transport/vercellets you use Ably as the transport for the Vercel AI SDK'suseChathook. Withresume: true, a tab that reloads, or opens while a response is streaming, picks up the response from the channel.
The wire format is the same as in 0.11.0, so a 0.11.0 agent and a 1.0.0 client can share a channel.
This release contains a number of breaking changes; see the full release page for details, and the migration guide for how to replace each transport API.
For the full changelog, please visit the GitHub release page.