Ziyarn Docs

Getting Started

Set up Ziyarn in under 5 minutes.

This guide walks you through creating your first domain, configuring an agent, and embedding the widget.

Prerequisites

  • A Ziyarn account (sign up)
  • A website where you can add HTML/JavaScript

Step 1: Create a Domain

  1. Go to Dashboard → Domains
  2. Click Create Domain
  3. Enter:
    • Name — what you call it in the dashboard, e.g. "Acme Support"
    • Slug — the short name in its address, e.g. acme-support
    • Business type — optional; it decides the pages and labels your agent uses
  4. Click Create domain

Your domain gets its own agent, knowledge base and embed secret. The slug is what visitors see and what goes in the embed snippet — changing it later breaks every live install, so pick it carefully.

Step 2: Configure Your Agent

Your first domain comes with an agent already. Go to Dashboard → Agents, select your domain, and edit it — or click New agent to add another.

Give it:

  • Name — what it is called, e.g. "Sales assistant"
  • About this business — what your business does; this is what shapes how the agent answers
  • Filter questions — one per line. These are asked at the start of each conversation and saved with the lead, so you know who you are talking to

The agent uses your domain's knowledge base, tools and products when it answers.

Step 3: Add Knowledge

Your agent needs information to answer questions. Add knowledge from:

Websites

  1. Go to Dashboard → Knowledge
  2. Click Crawl Website
  3. Enter your website URL
  4. Wait for the crawl to complete

Documents

  1. Go to Dashboard → Knowledge
  2. Click Upload Document
  3. Select a PDF, text, or markdown file

Manual Entries

Add specific Q&A pairs for common questions.

Step 4: Embed the Widget

Add this code before the closing </body> tag of your HTML:

<script defer src="https://ziyarn.vercel.app/widget.js"></script>
<zy-widget
  data-slug="YOUR_DOMAIN_SLUG"
  data-secret="YOUR_EMBED_SECRET"
></zy-widget>

Copy the snippet from Dashboard → Domains → [Domain] → Install — it already carries the right slug and secret. data-slug is the domain's slug (the short name in its address), not its id.

Step 5: Test It

  1. Open your website
  2. Click the chat widget in the bottom-right corner
  3. Send a message
  4. Your agent should respond using the knowledge you provided

What's Next?