ChatKit is a batteries-included framework for building high-quality, AI-powered chat experiences. It’s designed for developers who want to add advanced conversational intelligence to their apps fast—with minimal setup and no reinventing the wheel. ChatKit delivers a complete, production-ready chat interface out of the box.
Key features include:
Simply drop the ChatKit component into your app, configure a few options, and you're good to go.
ChatKit is a framework-agnostic, drop-in chat solution. You don’t need to build custom UIs, manage low-level chat state, or patch together various features yourself. Just add the ChatKit component, give it a client token, and customize the chat experience as needed, no extra work needed.
```python from fastapi import FastAPI from pydantic import BaseModel from openai import OpenAI import os
app = FastAPI() openai = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
@app.post("/api/chatkit/session") def create_chatkit_session(): session = openai.chatkit.sessions.create({ # ... }) return { client_secret: session.client_secret } ```
bash
npm install @openai/chatkit-react
```html
```
```tsx import { ChatKit, useChatKit } from '@openai/chatkit-react';
export function MyChat() { const { control } = useChatKit({ api: { async getClientSecret(existing) { if (existing) { // implement session refresh }
const res = await fetch('/api/chatkit/session', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
const { client_secret } = await res.json();
return client_secret;
},
},
});
return <ChatKit control={control} className="h-[600px] w-[320px]" />;
} ```
This project is licensed under the Apache License 2.0.
$ claude mcp add chatkit-js \
-- python -m otcore.mcp_server <graph>