HQ / 2026  ·  Vol. 01 / Issue Nº 01Filed under AI Assistants · AnalyticsEmbed · Pay-as-you-goLive · v1.0.0EN · ES · FR · DE · 日本語
Harque·Documentation
Documentation · Quickstart

Ship Harque in two minutes.

Install the package, drop in a config file, add one script tag, and point it at your API key. That’s the whole setup.

01 — Quickstart.

Four steps, one config, zero backend. Harque reads your published pages, keeps an insider index, and answers visitors from both.

  1. Install the widget — npm install @harque/widget.
  2. Create harque.config.json in your project root.
  3. Add the custom script tag to your site template.
  4. Create an API key in the dashboard and reference it in your config.
Heads up: you can also skip npm entirely and use the data-attribute script tag below — the assistant runs in a couple of kilobytes.

02 — npm install.

The widget package bundles the assistant, the walking H, and the insider indexer. It ships as an ES module with zero runtime dependencies.

terminal
# inside your project root
npm install @harque/widget

Then import it where your app mounts:

app.js
import { Harque } from '@harque/widget';
Harque.init(); // reads harque.config.json automatically

03 — Config file.

Create harque.config.json at the root of your project. Harque picks it up on boot — no wiring required.

harque.config.json
{
  "apiKey": "hk_live_xxxx",
  "siteId": "your-site-slug",
  "position": "bottom-right",
  "character": "walker",
  "theme": {
    "accent": "#6e2330",
    "paper": "#fff6ec",
    "ink": "#2f3c36"
  },
  "index": ["/", "/pricing", "/docs"]
}
Note: the API key can also live in an environment variable — HARQUE_API_KEY wins over the file.

04 — Script tag.

No build step? Add the custom script tag to your site template. Everything is configured inline.

index.html
<script src="https://cdn.harque.ai/widget.js"
        data-harque-key="hk_live_xxxx"
        data-harque-site="your-site-slug"
        data-harque-position="bottom-right"
        data-harque-character="walker"
        defer></script>

Or initialise it in JavaScript

app.js
import { Harque } from '@harque/widget';

Harque.init({
  apiKey: 'hk_live_xxxx',
  siteId: 'your-site-slug',
  character: 'santa-house',
  onAsk: (q) => analytics.track(q)
});

05 — API keys.

Create a key in the dashboard, then reference it in your config or as an environment variable. Keys are scoped per site and can be rotated at any time.

  1. Log in and open Dashboard → API keys.
  2. Create a key named after the environment (staging, production).
  3. Export it — export HARQUE_API_KEY="hk_live_xxxx".
  4. Restart your app. Harque validates the key on first boot.
.env
HARQUE_API_KEY=hk_live_xxxx
HARQUE_SITE_ID=your-site-slug
Security: keys starting with hk_live_ are production secrets — keep them server-side or in your build environment, never in client code.

06 — Characters.

Harque ships with a small studio of animated characters. Point character at any of these:

CharacterDescription
walkerThe walking H — strolls and blinks, invites conversation.
attachmentA swinging paperclip for questions, files, and follow-ups.
santa-houseA house with a white mustache roof, eyes, and a smile below.
bellA polite ring when a visitor waits.
boltFlashes the instant Harque starts composing.
bubbleA thinking bubble with blinking eyes.

07 — API reference.

Every endpoint is served from https://api.harque.ai. Authenticate with Authorization: Bearer hk_live_xxxx.

Method / pathDescription
POST /v1/chatSend a visitor message; returns the assistant answer and intent.
POST /v1/indexQueue a page (or sitemap) for indexing.
GET /v1/analyticsTop asks, struggle maps, missing info, geography.
GET /v1/requestsPaginated request log for the dashboard.
POST /v1/keysCreate an API key.
DELETE /v1/keys/:idRevoke and rotate a key.

Two minutes away..

Create your first key and put Harque on a page.