Krispy AI

what is krispy

open-source live chat with an AI answerer and a human handoff to Telegram β€” self-hosted on Cloudflare's free tier.

krispy πŸ₯

open-source live chat with a human in the loop. an AI answers your visitors in your voice, and hands off to you on Telegram the moment a real person is needed β€” you reply from your phone, it lands live in the chat, and the bot goes quiet.

let the bot cook πŸ₯

the repo you're reading

this is the lean, self-hostable core β€” exactly two deployable things plus the CLI to run them. the dashboard, billing, accounts, and marketing surfaces live in a separate Cloud repo and do not ship here.

pathwhat it is
services/edge⭐ one Cloudflare Worker + a hibernatable Durable Object (SessionDO). chat + Telegram handoff. the whole backend, one deploy.
packages/widget⭐ the dependency-free embeddable widget.js β€” vanilla JS in a Shadow DOM, zero deps.
packages/clithe krispy CLI β€” manage your bot's knowledge base (its system prompt).

the loop

visitor ──▢ AI answers (Cloudflare Workers AI) ──▢ visitor
   β”‚
   └──▢ one Telegram topic per visitor, on your phone
              β”‚
   you reply in the topic ──▢ shows up LIVE in the widget
              β”‚
              └──▢ bot goes silent β€” the human owns the conversation
  • visitor types β†’ instant AI reply.
  • every message mirrors to one Telegram forum topic per visitor on your phone.
  • you reply from Telegram β†’ it's pushed into the browser over a WebSocket, live.
  • the bot detects it's a human job and steps back β€” no double-answering.

the stack

  • Cloudflare Workers + Durable Objects (hibernatable SessionDO) β€” the whole backend, one deploy.
  • Workers AI β€” the built-in bot (@cf/meta/llama-3.3-70b-instruct-fp8-fast by default). a BYO-key seam is there.
  • Cloudflare KV β€” tenant config, topic↔session map, usage counters.
  • Telegram Bot API β€” the handoff channel (one forum topic per visitor).
  • Bun + wrangler β€” package manager, runtime, deploy.
  • widget is vanilla JS in a Shadow DOM β€” zero framework, zero dependencies.

where to go next

  • quickstart β€” self-host in ~10 minutes.
  • concepts β€” the markers, connectors, theme, KV config.
  • guides β€” task-oriented: deploy, embed, connect Telegram, forms.
  • reference β€” CLI, edge routes, TenantConfig, the markers.
  • security β€” secrets, the widget-config whitelist, the prompt guardrails.

On this page