API reference

Open in

This reference covers every public API surface in the @ably/ai-transport package. The SDK is organized into four entry points so you only import what you need.

API surfaces

SurfaceDescriptionReference
Client transportSubscribe to turns, build conversation views, cancel and control from the clientClient transport
Server transportManage turn lifecycle, stream responses, handle cancellation on the serverServer transport
React hooksDeclarative hooks for building chat UIs with any codecReact hooks
Vercel integrationPre-built codec and factories for the Vercel AI SDKVercel integration
CodecInterface for bridging any AI framework to Ably messagesCodec
Error codesEnumerated error codes with recovery guidanceError codes

Entry points

Entry pointImport pathContents
Core@ably/ai-transportcreateClientTransport, createServerTransport, codec interfaces
React@ably/ai-transport/reactGeneric React hooks (useClientTransport, useView, etc.)
Vercel@ably/ai-transport/vercelUIMessageCodec, Vercel-specific transport factories
Vercel React@ably/ai-transport/vercel/reactuseChatTransport, useMessageSync