Embed an AI agent
into any page .
Klunq is an embeddable AI chat widget that reads your page, clicks buttons, fills forms and answers questions — shipped in a single script tag with zero side effects.
Getting started
One tag. That's it.
No npm install, no build step, no config UI. Paste this into any page and a live AI agent appears.
<script
src="https://cdn.jsdelivr.net/npm/@klunqlabs/klunq-widget@latest/dist/klunq-widget.js"
data-model="gemma4"
data-api-key="ollama"
data-base-url="http://localhost:11434/v1"
data-scope="broad"
></script>data-model
The model to run, e.g. gemma4 or gpt-4o.
data-api-key
Your API key — or ollama for local.
data-base-url
Any OpenAI-compatible base URL.
Why Klunq
Everything you need, nothing you don't
Truly embeddable
A single IIFE bundle with CSS inlined into Shadow DOM. Drop it in, it just works — no build step, no dependencies to reconcile.
A real agent
LangChain-powered agent with browser tools: read content, click elements, fill forms and navigate — all on your live page.
Zero side effects
Closed Shadow DOM keeps every style and script isolated. No style leakage, no class collisions, no conflicts with your app.
Dark mode, automatic
Auto-detects prefers-color-scheme and is fully themeable via CSS custom properties. Matches your brand, whatever it is.
Any OpenAI-compatible API
Works with Ollama, OpenAI, or any compatible endpoint. Point data-base-url at your provider and you are live.
Lightweight
About 250KB gzipped with Preact, LangChain and the tool suite included — delivered from npm via jsDelivr, automatically compressed.
How it works
Live in three steps
Drop the script
Add one script tag to any page. The widget auto-injects a floating button — no manual wiring.
Point at your model
Configure data-model, data-api-key and data-base-url. Ollama, OpenAI, or any compatible endpoint.
Let the agent work
It reads, clicks, types and navigates on your page. Summarize, extract, fill forms — on demand.
Drop Klunq into any page.
Free, open source, MIT licensed. Star the repo, read the docs, and embed your own agent in minutes.
Security disclaimer
Your API key is exposed
The embed script sends the API key to the client, where it is visible to anyone and publicly available. Prefer free or capped OpenRouter keys that are rotated regularly, or route requests through your own LiteLLM proxy.
We are building klunq-proxy to fix this with disposable virtual keys that are locked to your page — intercepted requests make each v-key unusable for other tasks — plus per-key budgets you define, team budgets, and a LiteLLM-based OpenAI-compatible gateway with tested open models. Learn more on the proxy page .
New · Klunq Proxy
Distribute AI without exposing your real API key
Virtual keys with budgets you set, team budgets, and page-locked keys that only work on your page. The widget stays one script tag — the proxy makes it safe for the open web.