Customer Agent

SDK overview

Conversation clients and optional Messenger and React adapters.

A Customer Agent client owns support/interview sessions, messages, optimistic sends, recovery, polling, and business events. It can run without a DOM, React, a mounted Messenger, or subscribers. The built-in Messenger renders that client's state and sends user actions back to it.

SurfaceEntryResponsibility
CustomerAgentClient@customer-agent/sdkConversation state, actions, identity/context, and lifecycle.
CustomerAgentWidget@customer-agent/sdk/widgetOne mounted Messenger's UI state and controls.
CustomerAgentProvider and hooks@customer-agent/sdk/reactSupply and observe explicit instances in React.
window.CustomerAgentsdk.jsThe same named factories for script integrations.

The root factory has no global singleton or default export. Each client has its own state and lifecycle. UI and React consumers do not own that lifecycle: unmounting a widget or Provider does not shut down the client. A client can be attached to a Messenger later or used with a custom UI.