Skip to content

agents-io/chatbotlite

ChatbotLite

ChatbotLite

AI chatbot in 3 lines of code.
Stop burning tokens building chatbots from scratch. We did it for you.
Built for indie hackers and SMB sites that need a working chatbot today, not after a 3-week integration.

ChatbotLite widget demo — launcher opens, user asks 'how much is a leak inspection?', bot streams '$95, covers first visit, full diagnostic' with typing cursor.

▶ Try it live — landing page with 6 demos, install code, and comparison

GitHub stars npm version npm downloads bundle size CI license

Live demos · API Reference · Roadmap · SKILL Protocol · 日本語 · 中文


3 lines to chatbot

import { ChatWidget } from "chatbotlite/react";

<ChatWidget endpoint="/api/chat" title="Acme Plumbing" theme={{ primary: "#1e3a8a" }} />

Or plain HTML (Shopify, WordPress, Webflow, anywhere):

<script src="https://unpkg.com/chatbotlite/dist/embed.global.js"></script>
<script>
  chatbotlite.mount({ endpoint: "/api/chat", title: "Acme Plumbing" });
</script>

Server (/api/chat):

import { ChatBot } from "chatbotlite/client";
import { knowledgeFromFile } from "chatbotlite/node";

const bot = new ChatBot({
  knowledge: knowledgeFromFile("./knowledge.md"),
  providers: { keys: { openai: process.env.OPENAI_API_KEY } }
});

export async function POST(req: Request) {
  const { message, transcript } = await req.json();
  return new Response(await bot.replyStream(message, { history: transcript }), {
    headers: { "Content-Type": "text/event-stream" }
  });
}

Zero downtime. Auto-failover.

Add multiple provider keys. If one errors mid-stream, the next provider takes over and the assistant restarts the reply. True token-level replay is on the 0.8 roadmap.

Failover demo: OpenAI 503s mid-stream, Groq takes over.

10 providers: OpenAI, Groq, DeepSeek, Gemini, Mistral, Fireworks, Cerebras, SambaNova, OpenRouter, Moonshot.


What's in the box

3 lines React component or <script> tag. No build step needed.
10 LLM providers + local Auto-failover chain across 10 hosted providers, or point a custom entry at your own Ollama / LM Studio / vLLM.
Markdown knowledge Write services, hours, pricing in a .md file. No vector DB. Anti-hallucination guards built-in.
13 adapters Stripe, PayPal, Calendly, Cal.com, Formspree, and 8 more. Paste a URL, done.
Tool cards Bot triggers payment, scheduling, file upload, picker buttons inline in chat.
Session persistence Pluggable ChatStorage interface. localStorage default, wire to your own DB.
Streaming SSE tokens render as the LLM types. Streaming cursor in brand color.
Defense in depth Phrase redlines + optional LLM judges for input/output safety.
$0/mo forever Apache 2.0. No SaaS subscription. No per-conversation pricing.

Adapters (v0.7)

URL-only adapters. Customer pastes a URL, we open it. Zero backend, zero API keys.

import { stripeLink, calendlyUrl } from "chatbotlite/adapters";

<ChatWidget
  endpoint="/api/chat"
  tools={{
    requestPayment: stripeLink("https://buy.stripe.com/your-link"),
    scheduleCallback: calendlyUrl("https://calendly.com/your-page/30min"),
  }}
/>

Payment: stripeLink, paypalLink, squareLink, lemonSqueezyLink, gumroadLink Scheduling: calendlyUrl, calcomUrl, savvycalUrl, acuityUrl, msBookingsUrl, googleCalendarApptUrl Lead capture: formspreeUrl, tallyUrl


Tool cards

The bot emits [SKILL:...] markers. The widget renders interactive cards.

[SKILL:requestPayment amount=4250 currency="cad" reason="deposit"]
[SKILL:scheduleCallback durationMin=15 timezone="America/Vancouver"]
[SKILL:uploadForReview purpose="T4 slip" accept="image/*,application/pdf"]
[SKILL:pickerMessage prompt="Service type?" options="Inspection,Repair,Emergency"]

See the full SKILL Marker Protocol spec.


Provider config

providers: {
  keys: {
    openai:   process.env.OPENAI_API_KEY,
    groq:     process.env.GROQ_API_KEY,
    deepseek: process.env.DEEPSEEK_API_KEY,
  },
  chain: [
    { provider: "openai",   model: "gpt-4o-mini" },
    { provider: "groq",     model: "llama-3.3-70b-versatile" },
    { provider: "deepseek", model: "deepseek-chat" }
  ]
}

Top-to-bottom = priority. Auto-retry on 429/5xx, then fall to next.

Local / self-hosted LLM

A chatbot doesn't need a frontier model. If you already run a local model (Ollama, LM Studio, vLLM, llama.cpp) it speaks the same OpenAI-compatible API, so point a custom chain entry at it — your data never leaves your machine:

providers: {
  keys: { openai: process.env.OPENAI_API_KEY },   // optional cloud fallback
  chain: [
    { provider: "custom", baseUrl: "http://localhost:11434/v1", model: "llama3.2", apiKey: "ollama" },
    { provider: "openai", model: "gpt-4o-mini" }   // falls over to cloud if local is down
  ]
}

apiKey is optional for local servers that ignore auth. baseUrl can also override a hosted provider (e.g. point openai at an internal gateway).


Live demos

6 verticals, all running on the same npm package: chatbotlite-demos.vercel.app

Vertical Demo
E-commerce Bayside Coffee Co.
Service business Acme Plumbing
Hospitality Bella Italia
Healthcare Smile Care Dental
Professional services MaxTax
Wellness Sunrise Yoga

MCP server — let your AI agent scaffold it

Building with Claude Code, Cursor, or Cline? Add the chatbotlite-mcp server and your agent can scaffold a working chatbot from a one-line ask ("add a chat widget to my Next.js site, fall back OpenAI → Groq, take Stripe deposits").

claude mcp add chatbotlite -- npx -y chatbotlite-mcp

Tools: scaffold_chatbot (paste-ready code), list_providers, list_adapters, skill_markers, about_chatbotlite. No API key needed.


Documentation


Contributing

PRs welcome. See CONTRIBUTING.md for what we merge fast and what we usually decline.

For security disclosures, see SECURITY.md — please do not open a public issue.

⭐ If this saved you a weekend

A star helps it reach the next dev who'd otherwise spend the weekend rebuilding a chat widget from scratch. That's basically the entire OSS deal — costs nothing, helps a lot.

★ Star on GitHub

License

Apache 2.0. Use it for whatever, commercial too.


Built by agents-io. Also from our team: Cross-Code Organizer (328★ cross-harness config dashboard — Claude Code, Codex CLI, MCP servers) · PokeClaw (875★).

About

Drop-in AI chatbot SDK + React widget. 3 lines to integrate. 11 LLM providers with auto-failover. 13 URL-only adapters (Stripe, Calendly, PayPal...). Markdown knowledge. Apache 2.0.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors