Back to Documentation

Quickstart Guide

Launch your first Mentoros-powered AI assistant in under 10 minutes.

1. Include the SDK

Add the Mentoros stylesheet and script to your HTML head or before the closing body tag.

<!-- Mentoros SDK CSS -->
<link rel="stylesheet" href="https://sdk.mentoros.gr/latest/chatbot.min.css">

<!-- Mentoros SDK JS -->
<script src="https://sdk.mentoros.gr/latest/chatbot.min.js"></script>

2. Initialize the Assistant

Create a container element and initialize the `SecureLightChatbot` with your credentials.

<div id="chatbot-container"></div>

<script>
  const bot = new SecureLightChatbot({
    clientToken: 'YOUR_CLIENT_TOKEN',
    appId: 'YOUR_APP_ID',
    baseUrl: 'https://api.mentoros.gr',
    
    // Security & Environment
    encrypted: true,
    debug: false,

    // Customization
    botName: 'Mentoros Assistant',
    greeting: 'Hello! How can I help you today?',

    // Task Configuration
    tasks: {
      autoExecute: true,
      confirmation: 'none',
      stopOnError: false,
      validateParams: true
    }
  });

  // Initialize the chatbot UI
  bot.init('#chatbot-container');
</script>

3. Register Actions

Connect the AI to your website's functionality by registering frontend actions.

bot.registerAction('cart.addItem', async ({ sku, qty = 1 }) => {
  // Your logic to add item to cart
  console.log('Adding to cart:', sku, qty);
  return { success: true, message: 'Added to cart' };
});

Next Steps

Once your assistant is live, head over to the Merchant Portal to customize the brand styling and response rules.

Was this article helpful?