dewee-webchat
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Warn
- network request — Outbound network request in cdn/scripts/build-cdn.mjs
- network request — Outbound network request in cdn/src/cdn-worker.js
- process.env — Environment variable access in examples/cloudflare/public/app.js
- network request — Outbound network request in examples/cloudflare/public/app.js
- network request — Outbound network request in examples/cloudflare/src/worker.ts
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Embeddable chat widget for Dewee AI agents — streamed reasoning & tool calls, React/Vue/Astro/Next.js/PHP, secure backend handler.
dewee-webchat
Embeddable chat for Dewee agents. Drop one tag on any site and visitors talk to your
agent, with streamed reasoning, tool calls, markdown, history and agent switching. Your gateway token
stays on your server.
▶ Playground: webchat.dewee.sh · npm: dewee-webchat ·
CDN: https://webchat-cdn.dewee.sh/[email protected]/dewee-webchat.js
browser <dewee-chat> ──HTTPS + SSE──▶ your backend /api/dewee/* ──WebSocket──▶ Dewee gateway
(visitor token only) (holds the gateway token) (agents, MCP, tools)
Quick start
npm i dewee-webchat
- Mount the backend handler at
/api/dewee/*(Workers, Next.js, Astro, Node, Bun, Deno, or the PHP file). - Set
DEWEE_GATEWAY_URL,DEWEE_GATEWAY_TOKEN,DEWEE_WEBCHAT_SECRET,DEWEE_AGENTS. See.env.example. - Add the widget:
<script src="https://webchat-cdn.dewee.sh/[email protected]/dewee-webchat.js" data-endpoint="/api/dewee" defer></script>
Full options, framework snippets and the security model: packages/dewee-webchat/README.md.
Live examples
All of them run on Cloudflare and share the same scoped demo key.
| Stack | Live | Source |
|---|---|---|
| Plain HTML + Worker (playground) | webchat.dewee.sh | examples/cloudflare |
| Next.js (App Router, OpenNext) | webchat-next.dewee.sh | examples/nextjs |
| Astro | webchat-astro.dewee.sh | examples/astro |
| React + Vite | webchat-react.dewee.sh | examples/react-vite |
| Vue + Vite | webchat-vue.dewee.sh | examples/vue-vite |
| Node + Express | local | examples/node-express |
| PHP (no Composer) | local | examples/php · php/ |
Repository layout
| Path | |
|---|---|
packages/dewee-webchat |
The npm package: web component, React/Vue/Astro wrappers, dewee-webchat/server handler |
php/dewee-webchat.php |
Single-file PHP backend with the same HTTP contract |
cdn/ |
Worker that serves versioned bundles at webchat-cdn.dewee.sh |
docs/http-contract.md |
Wire format between the widget and any backend |
examples/ |
Runnable integrations |
Development
pnpm install
pnpm test # vitest
pnpm typecheck
pnpm build # packages/dewee-webchat/dist
Run the playground locally: copy examples/cloudflare/.dev.vars.example to .dev.vars, fill it in, thenpnpm -C examples/cloudflare dev.
Release: bump packages/dewee-webchat/package.json (and VERSION in php/dewee-webchat.php), commit, then
push a matching tag (git tag v0.1.2 && git push origin v0.1.2). release.yml
publishes to npm through npm Trusted Publishing (OIDC, no token) and creates the GitHub release. Then runnode cdn/scripts/build-cdn.mjs && pnpm -C examples/cloudflare exec wrangler deploy --config ../../cdn/wrangler.jsonc
to add the version to the CDN.
License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found