MerchantryTidbits

frontend-tooling / library

ChatKit

Capability: ChatKit

Use it when

  • You need a polished streaming chat interface inside an existing web app and do not want to hand-build message rendering, thread state, and attachment handling.
  • You are shipping an agentic assistant and need a UI for platform-provided tool and workflow progress, interactive widgets, attachments, and source annotations without hand-building those surfaces.

What it solves

Not the fit when

  • Backends outside the OpenAI platform; sessions and client secrets are minted through the OpenAI SDK.
  • Fully self-hosted or offline deployments; the component script is loaded from OpenAI's CDN.
  • Putting an OpenAI API key in browser code; create sessions and return short-lived client secrets from a trusted server.
  • Displaying or promising hidden model chain-of-thought; expose supported tool, workflow, progress, and source events instead.
  • Building the model or agent workflow itself; ChatKit is the client surface.
  • multi-model-routing
  • embedding-recall-poor
  • llm-app-boilerplate-sprawl

Install

npm install @openai/chatkit-react (also add the chatkit.js script tag from cdn.platform.openai.com to the page)

Invoke

On the server, create a session via openai.chatkit.sessions.create and return session.client_secret; in React, call useChatKit with a getClientSecret callback and render <ChatKit control={control} />.

Alternatives

No reviewed alternatives recorded yet.