AI Chat Widget
for Any Website
Drop-in AI chatbot that connects to Claude, OpenAI, or Gemini.
One script tag. Zero dependencies. Full control.
See it in action
A beautifully crafted chat widget that blends into any website. Dark mode, streaming, fully customizable.
Everything you need
Production-ready from day one. Multi-provider AI, lead capture, analytics, and more.
Multi-Provider
Claude, OpenAI, and Gemini. Switch providers with a single config change.
Zero Dependencies
Shadow DOM isolated widget. Under 5 kB gzipped on page load, and the chat loads when it's opened. No framework lock-in.
Streaming
Real-time SSE streaming from all providers. Token-by-token responses.
Lead Capture
Built-in tool for capturing contact info with webhook support.
Knowledge Base
Feed text chunks or FAQ pairs for context-aware, grounded responses.
i18n
14 languages built in. Fully customizable strings for any language.
Persistence
localStorage on client, pluggable stores on server. Conversations survive refreshes.
Deploy Anywhere
Express, Vercel, Cloudflare Workers. Ready-made adapters included.
Three steps to launch
From zero to AI chatbot in under 5 minutes.
Add the Script Tag
Drop a single <script> tag into your HTML. The widget auto-initializes with Shadow DOM isolation.
src=".../@chatcops/widget"
data-api-url="https://api.example.com/chat"
></script>
Configure Your Server
Set up a server endpoint with your AI provider of choice. Express, Vercel, or Cloudflare.
from '@chatcops/server';
app.post('/chat', chatcopsMiddleware({
provider: { type: 'claude' },
}));
Chat with Customers
Your AI assistant is live. Capture leads, answer questions, and delight users.
Deploy anywhere
First-class adapters for every major platform. Copy, paste, deploy.
import express from 'express';
import { chatcopsMiddleware } from '@chatcops/server';
const app = express();
app.use(express.json());
app.use('/chat', chatcopsMiddleware({
provider: {
type: 'claude',
apiKey: process.env.ANTHROPIC_API_KEY,
model: 'claude-haiku-5-5',
},
systemPrompt: 'You are a helpful assistant.',
allowedOrigins: ['*'],
sessionSecrets: [process.env.CHATCOPS_SESSION_SECRET],
rateLimit: { maxRequests: 30, windowMs: 60_000 },
}));
app.listen(3001);Your AI, your choice
Switch providers with one config change. No code rewrites needed.
Open Source & Free Forever
ChatCops is MIT licensed. Use it for personal projects, startups, or enterprise. Contribute on GitHub.