Quick start
Three steps to live AI on your site.
- — you'll land in the admin with a demo knowledge base already seeded.
- Open Widget → Embed Code and copy the one-liner below.
- Paste it into your website just before
</body>. That's it.
Embed snippet
Drop this anywhere — the script handles the rest (bubble, panel, suggestions, lead capture, language picker).
<!-- Hanvitt AI widget -->
<script
src="https://hanvitt-chat-ai.emergent.host/api/hanvitt/widget/script.js"
data-tenant-id="YOUR_TENANT_ID"
data-api-key="YOUR_API_KEY"
async
></script>Replace YOUR_TENANT_ID and YOUR_API_KEY with the values shown on .
API keys & auth
The widget uses a tenant-scoped API key in the X-API-Key header. Admin endpoints use a JWT obtained from /api/hanvitt/auth/login. Keys rotate from Widget → Security.
Example: send a message to the chat engine directly.
curl -X POST "https://hanvitt-chat-ai.emergent.host/api/hanvitt/chat/message" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"message": "What health plans do you offer?",
"session_id": "web_1234567890"
}'Tone configuration
Each tenant has one of four presets — professional, friendly, concise, playful — plus a 500-char custom prompt. Both are injected into every system prompt before the LLM runs.
| Preset | When to use |
|---|---|
| professional | Default. Wealth, enterprise, B2B SaaS. |
| friendly | D2C brands, consumer support. |
| concise | Ops dashboards, internal tools, triage. |
| playful | Consumer apps, gamified products. |
Set it in — it saves automatically.
Document ingest
Upload PDF, DOCX, TXT, or MD (≤ 25 MB). Each file is chunked into ~400-word KB entries, embedded into Qdrant, and usable by the AI on the next turn. Use the UI at , or the API directly:
curl -X POST "https://hanvitt-chat-ai.emergent.host/api/hanvitt/knowledge/import-document" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-F "tenant_id=YOUR_TENANT_ID" \
-F "domain=insurance" \
-F "file=@policy.pdf"The response includes chunks, indexed, and a preview of the first three chunks so you can verify extraction before answering live traffic.
Webhooks
Forward captured leads to your CRM in real time. Set the URL + shared secret at . Each request is signed with an HMAC header:
X-Hanvitt-Signature: sha256=<hex>
Content-Type: application/json
Body: { "event": "lead.captured", "tenant_id": "…", "lead": { ... } }Deliveries are retried with exponential backoff for 24 h. You can replay them from the Settings page.
WhatsApp onboarding checklist
WhatsApp Business API is a guided setup, not one-click. Budget about 45 minutes end-to-end.
- Pick a BSP (Gupshup, AiSensy, Twilio, 360dialog — any will work).
- Verify your Meta Business account and link your phone number.
- Submit your first 3 templates (utility category for transactional, marketing for promos).
- Plug the BSP webhook URL into .
- Send a test message from our dashboard to confirm round-trip.
We'll hop on a shared call for steps 2–4 if you'd like a second pair of eyes.