> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sketricgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy to Custom Website

> Embed a SketricGen AI agent as a chat bubble or inline iframe on any website — step-by-step guide for custom web deployment.

<Tabs>
  <Tab title="Floating Chat Bubble">
    ## **Step 1: Create your SketricGen account**

    To get started with the integration, **[sign in to your SketricGen account](https://www.sketricgen.ai)**. If you don't have an account yet, you can create one for **[free](https://www.sketricgen.ai)**. Once you're logged in, begin setting up your agent workflow by uploading your data sources. These can include files, text snippets, websites, or Q\&A pairs, which will serve as the knowledge base for your agent workflow.

    If you need assistance with setting up a working SketricGen agent workflow, refer to the **[step-by-step guide](https://docs.sketricgen.ai/getting-started/quickstart)** for creating and deploying your agent workflow.

    ## **Step 2: Copy the SketricGen agent workflow Embed Code**

    After configuring your agent workflow, go to the dashboard and click **Publish** to copy the embed code. The code will look similar to this:

    ```html theme={null}
    <script src="https://jswidget.sketricgen.ai/widget-embed.js" data-agent-id="YOUR_AGENT_ID"></script>
    ```

    > **Note:** Make sure your agent workflow is set to **Public** to embed it on your website.

    <img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/custom-website/screenshot1.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=14bb07ce932d6f185dd3048c558f824f" alt="Screenshot showing SketricGen dashboard with Publish button and embed code copy option" width="2291" height="1117" data-path="images/custom-website/screenshot1.png" />

    ## **Step 3: Add the embed code to your website**

    If you have direct access to your website's files:

    1. Open the file where you want to add the agent workflow (typically index.html, .astro, .jsx, or your template file)
    2. Add the embed code in the `<head>` section of your document
    3. Save the file and upload it to your web server

    > **For multi-page websites:** Adding the script to the `<head>` section of your base template or layout file ensures the chat bubble appears consistently across all pages of your website, giving visitors a seamless experience.

    ```html theme={null}
    <!DOCTYPE html>
    <html>
      <head>
        <!-- Your existing head content -->
        
        <!-- SketricGen Widget Script - Best placed in the head for consistent appearance across pages -->
        <script src="https://jswidget.sketricgen.ai/widget-embed.js" data-agent-id="YOUR_AGENT_ID"></script>
      </head>
      <body>
        <!-- Your website content -->
      </body>
    </html>
    ```

    ## **Step 4: Test your agent workflow**

    After adding the embed code:

    1. Preview or publish your website
    2. Verify that the chat bubble appears (typically in the bottom right corner)
    3. Test the agent workflow by clicking on the bubble and asking a question

           <img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/custom-website/screenshot2.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=549a1c1d22ce607094b8931b54e05b37" alt="Screenshot showing custom website with embedded SketricGen floating chat widget" width="2856" height="1394" data-path="images/custom-website/screenshot2.png" />

    🎉 **Congratulations!** Your SketricGen agent workflow is now live on your website, ready to assist your visitors.
  </Tab>

  <Tab title="Inline iFrame Embed">
    ## **Step 1: Create your SketricGen account**

    To get started with the integration, **[sign in to your SketricGen account](https://www.sketricgen.ai)**. If you don't have an account yet, you can create one for **[free](https://www.sketricgen.ai)**. Once you're logged in, begin setting up your agent workflow by uploading your data sources. These can include files, text snippets, websites, or Q\&A pairs, which will serve as the knowledge base for your agent workflow.

    If you need assistance with setting up a working SketricGen agent workflow, refer to the **[step-by-step guide](https://docs.sketricgen.ai/getting-started/quickstart)** for creating and deploying your agent workflow.

    ## **Step 2: Copy the SketricGen agent workflow iFrame Code**

    From your dashboard, click **Publish > Direct Embed** and copy the iframe code. It should look similar to this:

    ```html theme={null}
    <iframe src="https://www.sketricgen.ai/iframe-widget/asst_yK4xJuMWAoWobKOYKsF0QmMS" width="100%" height="700px" frameborder="0"></iframe>
    ```

    > **Note:** The agent workflow must be set to **Public** for the iframe embed to work.

    <img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/custom-website/screenshot3.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=3f63d9383e77c173e31bc51ec8ee61f4" alt="Screenshot showing SketricGen Direct Embed iframe code copy interface" width="2273" height="1126" data-path="images/custom-website/screenshot3.png" />

    ## **Step 3: Add the iFrame to your website**

    If you have direct access to your website's files:

    1. Open the file where you want to embed the agent workflow (typically index.html, .astro, .jsx, or your template file)
    2. Locate the section where you want the agent workflow to appear
    3. Paste the iframe code
    4. Adjust the width and height as needed
    5. Save the file and upload it to your web server

    ```html theme={null}
    <div class="chat-container">
      <h2>Chat with our AI Assistant</h2>
      <iframe src="https://www.sketricgen.ai/iframe-widget/asst_yK4xJuMWAoWobKOYKsF0QmMS" width="100%" height="700px" frameborder="0"></iframe>
    </div>
    ```

    ## **Step 4: Test your agent workflow**

    After adding the iframe:

    1. Preview or publish your website
    2. Verify that the agent workflow iframe appears correctly
    3. Test the agent workflow by typing a question in the iframe

           <img src="https://mintcdn.com/sketricgen/c4HlQLmBiw0POS1H/images/custom-website/screenshot4.png?fit=max&auto=format&n=c4HlQLmBiw0POS1H&q=85&s=d99f50cdb41848530b167d85f1883ad4" alt="Screenshot showing custom website with embedded SketricGen iframe widget" width="1598" height="771" data-path="images/custom-website/screenshot4.png" />

    🎉 **Congratulations!** You've successfully added the SketricGen agent workflow to your website using an iframe embed.
  </Tab>
</Tabs>
