📖 User Guide

Ragleaf Platform Guide

Ragleaf allows you to build custom smart AI assistants for your business and embed them without coding. In this guide, we will walk you through how to use the dashboard, train your agent, and activate booking or payment features.

Admin Portal — Login Screen
Step 1: Sign up and Authenticate

Create a free account with your email address to access the workspace. Enter the 6-digit confirmation code sent to your email to verify and activate your dashboard in seconds.

🍃
Ragleaf Verification
Enter 6-digit code sent to your email
4
9
2
8
0
3
✓ Verified! Redirecting...

2. Pre-Built Industry Templates

Instead of designing an assistant from scratch, you can deploy a pre-configured template customized for your sector. These templates arrive fully loaded with optimized prompts, forms, and service flows.

Template Wizard Selection
✂️Hair Salon✓
🦷Dentist
🍽️Restaurant
🛒E-Commerce
🏨Hotel
🔮Influencer
Selected Template Specifications:

Hair Salon template: Appointment scheduler, service pricing, working hours inquiries, and in-chat deposit payments activated.

3. Assistant Persona & System Prompt

Configure your assistant's name, visual avatar, and system instructions (system prompt) in the editor. The system prompt controls how the assistant behaves, what rules it obeys, and how it talks to clients.

Assistant Settings & Prompt Editor
Agent Name
Model Temperature (Creativity)
0.2
System Prompt Tuning
📅 Appointments
💳 In-Chat Payments
💬 WhatsApp Support

4. Knowledge Base & Document Upload

Upload business data like service menus, pricing sheets, or custom PDFs here. Ragleaf automatically fragments documents (chunking), generates embeddings, and indexes them into the vector database.

Document Ingestion Console
📄
price-list-2026.pdf1.2 MB
✓ Processed (RAG Ready)
📄
service-menu.docx850 KB
✓ Processed (RAG Ready)

5. Appointments & Booking Settings

Configure available calendar slots, working hours, service durations, and seat capacities in the bookings panel. The AI assistant references this live database to coordinate, recommend, and book reservations.

Client-Side Scheduler Preview
Friday, June 12 — Please select a time slot:

6. Secure In-Chat Payment Collection

Collect deposits or full payments directly inside the chat window. Integrate Stripe or Iyzico credentials in the billing panel to authorize and process secure credit card payments.

In-Chat Checkout Window
💳 Secure Checkout₺450.00
Cardholder Name
Card Number
MM/YY
CVC

7. Widget Theme Customization

Match the chatbot widget with your corporate branding in the themes panel. Change primary brand colors, switch between dark and light themes, configure layouts, and customize the greeting message.

Visual Customizer & Live Sync Preview
Select Theme
Primary Color
Welcome Message
🍃
Ragleaf BotOnline
✕
Hello! Welcome to Bella Nails & Beauty. 💅
Hi! Can I get some info?
Type a reply...

8. Dashboard Analytics & Reports

Track real-time conversation volumes, booking conversion rates, top FAQs, billing details, and accumulated Ragleaf loyalty points in the analytics dashboard.

Analytics Summary Panel
Conversations
1,247
Bookings
89
Leaves loyalty
12,470 🍃
Conversation Volume Trend
⚡ Developer Docs

Quick Start

Integrating Ragleaf AI assistant to your website takes only a few minutes. Follow the steps below to start.

1. Add the Script Tag

Insert this snippet right before the closing </body> tag of your HTML pages:

HTML
<script
  src="https://cdn.ragleaf.com/widget.js"
  data-agent-id="ag_your_agent_id"
  data-api-key="rk_live_your_key"
></script>
💡
Tip: You can find your Agent ID and API Key inside your admin portal. A pre-built script snippet is ready for you.

Authentication

All REST API queries require a Bearer token inside the Authorization header. You can generate API credentials in the API Tokens page of your dashboard.

HTTP Header
Authorization: Bearer rk_live_your_api_key_here

Widget Installation

Ragleaf chat widget runs isolated within the Shadow DOM to protect your page styling. Insert the script into any HTML index file to load the assistant.

Widget Configuration Options

Configure parameters and metadata using HTML data attributes.

ParameterTypeDefaultDescription
data-agent-idstringrequiredUnique ID of the agent
data-api-keystringrequiredWidget API credentials key
data-themestringlightlight or dark
data-positionstringbottom-rightbottom-right, bottom-left
data-primary-colorstring#22c55ePrimary brand theme color (HEX)
data-languagestringautoDefault widget locale (tr, en, de, etc.)

Theme Customization (CSS)

Override layout variables inside the shadow root using custom CSS custom properties.

CSS
/* Widget CSS variables */
ragleaf-widget {
  --rg-primary: #22c55e;
  --rg-bg: #ffffff;
  --rg-text: #1a1a1a;
  --rg-border-radius: 16px;
  --rg-font: 'Inter', sans-serif;
}

Shadow DOM Isolation

The chat element renders encapsulated inside a Shadow Root, protecting your website layout styles from being modified by the chat components and vice-versa.

Chat Completions API

OpenAI-compliant chat completion endpoint. Connect custom web/mobile apps to Ragleaf database backend with minimal refactoring.

POST/v1/chat/completions
cURL
curl -X POST https://api.ragleaf.com/v1/chat/completions \
  -H "Authorization: Bearer rk_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "messages": [ {"role": "user", "content": "Hello, how do I sign up?"} ], "stream": false }'

Document Management API

Programmatically manage the knowledge base vector entries of your chatbot. Upload, query, and delete documents.

POST/api/documents/upload

Ingest a new file (multipart/form-data).

Agent Management API

Create, customize, and deploy AI assistants.

Webhook Event Types

Receive automated event callbacks to a specified callback endpoint URL.

OlayAçıklama
conversation.startedWhen a conversation starts
appointment.createdWhen an appointment is booked
payment.completedWhen an in-chat checkout finishes

Webhook Security

Node.js
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const hash = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return hash === signature;
}

Platform Integrations

Copy-paste code blocks to integrate directly with WordPress or React:

WordPress (functions.php)

PHP
add_action('wp_footer', function() {
  echo '<script src="https://cdn.ragleaf.com/widget.js"
    data-agent-id="ag_xxxxx"
    data-api-key="rk_live_xxxxx"></script>'
;
});

React Component

React
import { useEffect } from 'react';

export default function RagleafWidget() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://cdn.ragleaf.com/widget.js';
    script.setAttribute('data-agent-id', 'ag_xxxxx');
    script.setAttribute('data-api-key', 'rk_live_xxxxx');
    document.body.appendChild(script);
    return () => document.body.removeChild(script);
  }, []);
  return null;
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid API token credential
AGENT_NOT_FOUND404The specified Agent ID does not exist
LIMIT_EXCEEDED429Monthly search/query credits depleted

Rate Limiting

Standard API endpoints limits are configured at a maximum of 120 requests per minute.

Changelog

v1.1.0 — Live widget & reservation modulesJune 2026

Released live appointment schedules, table reservations, and secure in-chat credit card payment integration.

v1.0.0 — Initial Public ReleaseMay 2026

Initial release of core RAG indexing, custom knowledge ingestion systems, and embeddable widget.