Private AI that runs in your browser

Coign is a client-side SDK that embeds a page-aware AI agent into any website. It runs entirely on-device via WebGPU — no cloud calls, no data leaks, no subscription required.

Live Coign widget active

Ask the widget anything about this page — or any question at all. The model downloads once, then runs entirely on your device.

Two lines to add Coign to any page

No build step. No npm install. Copy the snippet and drop it into your HTML.

HTML
<!-- TODO: swap the src for a jsDelivr/unpkg URL once the package is published -->
<script>
  window.Coign = window.Coign || function() {
    (window.Coign.q = window.Coign.q || []).push(arguments);
  };
  Coign('init');
</script>
<script src="./dist/coign-sdk.iife.js"></script>

TODO: replace ./dist/coign-sdk.iife.js with a jsDelivr or unpkg URL once Coign is published to npm.

How it works

Three steps from a static page to a page-aware local agent.

1

Embed

Add the two-line script to any page. Coign queues calls safely before the SDK finishes downloading.

2

Capture context

Coign reads the page outline, headings, and interactive elements so the agent can answer from your content.

3

Run locally

The model downloads once and runs via WebGPU. After that, inference is fully offline and private.

Why Coign?

Built for developers who want AI without the privacy trade-offs.

Zero-Cloud Privacy

All inference happens locally via WebGPU. Your users' conversations never leave their device. No API keys, no rate limits.

Page-Aware Agent

Coign reads the current page content, headings, and interactive elements. Ask "what's the pricing?" and it answers from the page.

Instant CDN Install

Drop in two lines of HTML. No build step, no npm install, no framework lock-in. Works on plain HTML, React, Vue, or anywhere.

Custom Tools

Register your own JavaScript tools so the agent can interact with your app — click buttons, fill forms, navigate, or call your APIs.

Themable Widget

Style the chat widget to match your brand. Configure colors, radius, and positioning through a simple theme object.

WebGPU Native

Powered by @mlc-ai/web-llm for cutting-edge in-browser LLM performance. Automatic model caching across sessions.

Coign vs. cloud agents

Why run AI in the browser instead of calling a remote API?

Concern Coign Cloud agents
Privacy Data stays on-device Sent to third-party servers
Cost No per-request charges Usage-based pricing
Latency Local inference after first load Network round-trip every call
Offline Works without a connection Requires internet

Frequently asked questions

Quick answers to the most common questions about running Coign.

Chrome, Edge, and other Chromium-based browsers support WebGPU on Windows, macOS, and Linux. Firefox and Safari support is improving; check your browser's release notes for the latest status.

It depends on the preset. Smaller models such as coign-tiny and coign-lite run in roughly 1–2 GB of VRAM, while larger presets like coign-quality benefit from 4 GB or more.

Compact presets are a few hundred megabytes; larger instruction-tuned models can be several gigabytes. Coign caches the model after the first download, so subsequent visits start instantly.

Coign targets modern Chromium browsers with WebGPU enabled. Edge and Chrome generally work best today; broader support will arrive as WebGPU rolls out to Firefox and Safari.

Ready to get started?

Explore the documentation, try the live demo, or grab the source from GitHub.