API reference

Reference for every public API surface in the @ably/ai-transport package. The SDK is organised into four entry points so you only import what you need.

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

Quick example

A minimal client session setup using the Vercel-pre-bound factory:

JavaScript

1

2

3

4

5

6

7

8

9

10

11

import * as Ably from 'ably';
import { createClientSession } from '@ably/ai-transport/vercel';

const ably = new Ably.Realtime({ authUrl: '/api/auth/token' });

const session = createClientSession({
  client: ably,
  channelName: 'conversation-42',
});

await session.connect();

See the individual reference pages for the full API.

Entry points

Entry pointImport pathContents
Core@ably/ai-transportcreateClientSession, createAgentSession, Invocation, Codec interface
React@ably/ai-transport/reactClientSessionProvider, useClientSession, useView, useTree, useCreateView, useAblyMessages, createSessionHooks
Vercel@ably/ai-transport/vercelUIMessageCodec, Vercel-bound createClientSession and createAgentSession, createChatTransport, vercelRunOutcome
Vercel React@ably/ai-transport/vercel/reactChatTransportProvider, useChatTransport, useMessageSync, plus the Vercel-baked re-exports of ClientSessionProvider, useClientSession, useView, useCreateView, useTree, and useAblyMessages

JavaScript

Core

Vercel

React

Core

Vercel

Errors