Introduction
The Kaira Chat SDK is a modular toolkit for building chat experiences with predictable runtime behavior, pluggable infrastructure, and framework-friendly integrations.
It is split into focused packages:
@kaira/chat-core: engine, events, middleware, plugins, transport/storage contracts@kaira/chat-react: React provider and hooks@kaira/chat-ui: reusable UI primitives@kaira/chat-transport-polling: generic polling transport@kaira/chat-provider-dit: provider transport built on polling
Goals
- Keep domain logic framework-agnostic.
- Let teams swap transport and storage implementations.
- Support extension via plugins, middleware, and custom events.
- Make streaming AI responses first-class.
- Keep React integration minimal and typed.
Key Features
- Modular architecture: clear separation between runtime, UI, and adapters.
- Transport abstraction:
ITransportfor WebSocket, polling, SSE, native bridge, etc. - Storage abstraction:
IStoragefor in-memory, local storage, server DBs, and APIs. - Plugin system: installable lifecycle extensions with
install()/destroy(). - Middleware pipeline: immutable event interception before send.
- Streaming lifecycle: start/chunk/end/error helpers for AI messages.
- React integration:
ChatProviderand hooks for messages, send, and streaming.
Start Here
- New to the SDK: go to Quick Start.
- Need architecture context: go to Architecture Overview.
- Building custom adapters: go to Transport API and Storage API.
- Extending behavior: go to Plugin System and Middleware.