What problem does it solve?
Build production-grade AI chat interfaces with custom backend integration, authentication, and context injection, enabling seamless user experiences when connecting chat UIs to agents, managing auth, and preserving context.
Core Features & Use Cases
- Frontend integration with useChatKit and a custom fetch to inject metadata (user/page context) and auth headers.
- Backend customization by extending a ChatKitServer and implementing respond() for streaming responses.
- Context propagation and security: per-user isolation, privacy, and httpOnly cookie proxy support for Next.js setups.
- Use cases include building chat widgets with persistence, integrating with custom agents, and secure multi-tenant deployments.
Quick Start
- Install and configure ChatKit dependencies in both frontend and backend environments.
- Implement a custom ChatKitServer by extending ChatKitServer[RequestContext] and override respond() to stream results.
- Wire the frontend to point to the proxy/chatkit endpoints, inject user/page context, and handle authentication via cookies or tokens.