JavaScript & TypeScript

One package for Node, browsers, Deno, Bun and React Native — with full TypeScript types and no dependencies.

Install

Send a message

Stream the reply

Pagination

Identity tokens

Sign a token on your server so the widget or app knows who the user is — see Identity verification.

Errors and retries

Every SDK retries 429 responses (honouring Retry-After) and — for GET, PUT, DELETE — transient 5xx and network errors, twice by default with exponential back-off. POST is never retried on a server error.

Client options

Cancel a stream

In the browser or an app: PublicClient

PublicClient is for code that ships to users. It needs no API key — only the agent id — and keeps an anonymous visitor id in storage so history works.

Types

Everything is typed: Agent, Conversation, Message, Source, ChatResult, StreamEvent, Page<T>, and the error classes MeetMyDeskError, RateLimitError, ConnectionError.