Your First AI Bot in 5 Minutes

Jan 20266 min read

You don't need to understand fine-tuning, WebGPU, or model architectures to get a working AI bot on your site. You need a URL and about five minutes.

This is the step-by-step.


Step 1: Sign up and create a team

Go to kanha.ai and sign up with Google or email. You'll land on your dashboard. Kanha auto-creates a personal team for you, this is where your sites, bots, and training runs live.

No credit card. No trial timer. The free tier gives you 50 pages and 1 training run, enough for a real production bot.


Step 2: Add your site

Click Sites in the sidebar, then Add Site. Enter your domain: docs.yourcompany.com, www.yourstore.com, whatever you want the bot to learn from.

You'll land on the site detail page with zero pages. Time to fix that.


Step 3: Crawl your pages

You have two options:

Sitemap crawl (recommended). Click Crawl Sitemap and paste your sitemap URL, usually https://yoursite.com/sitemap.xml. Kanha will parse it, discover all your pages, and start crawling them. If your sitemap references other sitemaps (a sitemap index), it follows those too, up to 3 levels deep.

Add pages individually. If you don't have a sitemap, or you only want specific pages, click Add Page and paste URLs one at a time.

Kanha fetches each page, extracts the text content, and stores it. If a page is JavaScript-heavy (like a React SPA), the crawler auto-detects this and re-fetches it with a headless browser. You don't configure this, it just happens.

Watch the page list populate. Each page shows its status: pending → indexed. Depending on how many pages you added, this takes anywhere from 30 seconds to a few minutes.


Step 4: Review your QA pairs

Here's what makes Kanha different from "paste your docs into a prompt" tools: after crawling, Kanha automatically generates question-answer training pairs from your content. An LLM reads each page and produces 3–8 realistic Q&A pairs, the kinds of questions your customers would actually ask.

Go to Datasets in the sidebar, select your site, and click Create Dataset. You'll see all generated QA pairs grouped by page.

Review them. Toggle off any that don't look right. Edit the ones that are close but not perfect. Add your own if there's something the generator missed.

This step is optional, you can accept all defaults and move on. But spending 2 minutes here directly improves your bot's accuracy.

Once you're happy, click Create Dataset. This assembles your selected pairs into a JSONL training file. It happens instantly, no queue, no waiting.


Step 5: Create a bot and train

Go to Bots in the sidebar. Click Create Bot. Give it a name and a system prompt, something like "You are a helpful support assistant for [YourCompany]. Answer questions based on your training. If you don't know something, say so."

Now click Train. Pick your dataset and a model size:

SizeBest forDevice requirement
Small (0.6B)Fast responses, mobile-friendly4GB+ RAM
Medium (1.7B)Good balance of speed and quality6GB+ RAM
Large (4B)Best answer quality8GB+ RAM

The SDK auto-selects the right model based on your visitor's device, so you can train multiple sizes if you want broad coverage. For your first bot, start with Large: it trains best and works on the widest range of queries.

Click Start Training. This takes 10–15 minutes depending on dataset size. The status will show queued → training → complete. You can close the tab, the training runs server-side.


Step 6: Embed on your site

Once training completes, your bot is live. Go to the bot detail page and you'll see the embed code. Three options:

Script tag (easiest):

<script type="module">
  import { mount } from 'https://cdn.jsdelivr.net/npm/kanha/dist/widget.js';
  mount('#chat', {
    modelUrl: 'https://huggingface.co/kanha-ai/your-bot-id-small/resolve/main/',
    systemPrompt: 'You are a helpful assistant for ...',
    botName: 'Your Bot Name'
  });
</script>
<div id="chat"></div>

Web Component:

<script type="module" src="https://cdn.jsdelivr.net/npm/kanha/dist/widget.js"></script>
<kanha-bot
  model-url="https://huggingface.co/kanha-ai/your-bot-id-small/resolve/main/"
  system-prompt="You are a helpful assistant for ..."
  bot-name="Your Bot Name"
></kanha-bot>

React:

import { KanhaBot } from 'kanha';

<KanhaBot
  modelUrl="https://huggingface.co/kanha-ai/your-bot-id-small/resolve/main/"
  systemPrompt="You are a helpful assistant for ..."
  botName="Your Bot Name"
/>

Paste the snippet into your site. That's it. A floating chat button appears. Your customers click it, the model loads into their browser, and they start getting answers from a model trained specifically on your content.


What just happened

In five steps, you:

  1. Crawled your site's content
  2. Generated and reviewed QA training data
  3. Fine-tuned a small language model on your content
  4. Converted it to a WebGPU-compatible format
  5. Embedded it as a chat widget that runs entirely in the visitor's browser

No API keys ticking up per query. No server to maintain. No third-party seeing your customers' questions.

The model is hosted on Hugging Face Hub. The SDK fetches it once, caches it in the browser, and runs inference locally via WebGPU. Subsequent visits load from cache, near-instant startup.


What to do next

Test it. Open your site in an incognito window and ask your bot questions. Try the kinds of things your customers actually ask in support tickets. If it gets something wrong, go back to the dataset, fix the QA pair, retrain.

Add more pages. The free tier gives you 50. If you need more, Starter is $39/mo for 500 pages and 3 retrains per month.

Train multiple sizes. If you have Pro or Business, train a Large model for desktop visitors and a Small one for mobile. The SDK handles device detection automatically.

Keep it fresh. When your site content changes, new products, updated policies, new docs, recrawl the relevant pages, regenerate the dataset, and retrain. The bot learns the new content in under 15 minutes.


Your bot is live. Your customers are getting instant, accurate answers. And your per-query cost is zero.

Start at kanha.ai.

Ready to try Kanha?

Train a bot on your site in under 20 minutes. Free, no credit card.

Get started free