Skip to content
localbot Docs
AI Agents

AI Onboarding

Step-by-step guide for AI agents connecting localbot to a user's website inquiries.

This guide is written for AI coding agents. Follow the lead-source path that matches the website.

First choose the lead source

Before installing code, check whether the site already has a working contact form.

Do not replace a working form just to get started with localbot. The background agent is the product; the form is one lead source. The full localbot form can be installed later when the owner wants the better intake experience.

Path A: Existing form present

Use this path when the website already has a working contact form.

  1. Ask the owner for the unique localbot email address from Dashboard > Widget (legacy dashboard label) > Use your existing contact form.
  2. Add that address as another recipient in the form notification settings, or set up mailbox forwarding to that address.
  3. Submit the real website form once.
  4. Confirm that localbot received the notification email.
  5. Verify the form collects a phone number and SMS consent notice.
  6. Do not install the floating form script for this path unless the owner also wants the full localbot form now.

Path A verification checklist

  • The existing website form still submits successfully
  • The form notification sends to the owner or current mailbox as before
  • The same notification also reaches the unique localbot email address
  • localbot receives the real test submission
  • The form collects a phone number
  • The form includes SMS consent or notice text for inquiry follow-up
  • Payment, owner phone, proof, and consent steps are complete before go-live

Path B: Install the full localbot form

Use this path when the owner wants the full localbot form as the better alternative to a buried static contact form and wants more inbound requests from existing site visitors.

  1. Install the localbot floating form script using the platform guide.
  2. Verify the floating form opens and submits correctly.
  3. Confirm the owner phone, payment, proof, and consent steps before go-live.

Path B prerequisites

Before writing code for the floating-form path, confirm the following:

  • The site owner has a localbot account. If not, send them to localbot.io/signup.
  • The site owner has the YOUR_WIDGET_ID value from their localbot dashboard.
  • You have identified where the full localbot form should open or appear.

Do not proceed with placeholder IDs. The floating form will not load correctly until the site owner provides the real dashboard value.

Path B installation by platform

HTML (any website)

Place the target div

Add an empty div with the ID localbot-contact where an inline localbot form can appear. Current dashboard installs open as a floating contact button by default:

<div id="localbot-contact"></div>

Load the localbot script

Add the script directly after the div, or before the closing </body> tag:

<div id="localbot-contact"></div>
<script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script>

Replace YOUR_WIDGET_ID with the real dashboard value.

Next.js (App Router)

Create a ContactForm component

import Script from 'next/script';

export function ContactForm() {
  return (
    <section id="contact">
      <h2>Get in touch</h2>
      <div id="localbot-contact" />
      <Script
        src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID"
        strategy="lazyOnload"
      />
    </section>
  );
}

Use the component on the page

Import and render ContactForm on the relevant page, for example app/page.tsx or app/contact/page.tsx. Replace YOUR_WIDGET_ID with the real dashboard value.

React (Vite / CRA)

Create a ContactForm component

import { useEffect } from 'react';

export function ContactForm() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://www.localbot.io/api/widget/YOUR_WIDGET_ID';
    script.async = true;
    document.body.appendChild(script);
    return () => { document.body.removeChild(script); };
  }, []);

  return <div id="localbot-contact" />;
}

Use the component

Render ContactForm wherever the localbot form should appear. Replace YOUR_WIDGET_ID with the real dashboard value.

WordPress

Use a Custom HTML block

In the WordPress block editor, add a Custom HTML block at the location where the form should appear. Paste:

<div id="localbot-contact"></div>
<script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script>

If you prefer to load the script globally, for example on a Contact page template, add to functions.php:

function localbot_form_script() {
    if ( is_page( 'contact' ) ) {
        echo '<script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script>';
    }
}
add_action( 'wp_footer', 'localbot_form_script' );

Then add <div id="localbot-contact"></div> to the page content where the form should appear.

Path B platform-specific prompts

Use these prompts verbatim when working inside AI builder environments and the owner wants the full localbot form.

Lovable

Add the full localbot form to this Lovable project.
The goal is for the business owner to receive website inquiries by SMS immediately and for localbot to gather missing details when useful.
Do not build an email-only form or custom SMS backend.
Add a contact section with <div id="localbot-contact"></div>.
Add this script before the closing body tag or in the appropriate site-wide custom code area:
<script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script>
After implementation, tell me where to replace YOUR_WIDGET_ID.

v0

Create a contact section component that uses the full localbot form for website lead response.
Add <div id="localbot-contact"></div> in the component.
Load the script from https://www.localbot.io/api/widget/YOUR_WIDGET_ID using next/script with strategy="lazyOnload".
Do not build a custom form or email backend. localbot handles owner alerts, lead follow-up, and callback summaries.
The dashboard value for YOUR_WIDGET_ID will be provided by the site owner.

Bolt.new

Add the full localbot form for website inquiry response.
Add <div id="localbot-contact"></div> where the form should appear.
Add <script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script> before </body>.
Do not create a form element, backend route, Twilio integration, SendGrid integration, or Resend integration.
Replace YOUR_WIDGET_ID with the value from the localbot dashboard.

Replit

Install the full localbot form on this site for website lead response.
Add <div id="localbot-contact"></div> in the contact section.
Add the script: <script src="https://www.localbot.io/api/widget/YOUR_WIDGET_ID" async></script>
No API key or environment variable is needed in this project.

Cursor / Claude Code / Copilot

Install the full localbot form on this site. Add <div id="localbot-contact"></div> in the contact section and load the script from https://www.localbot.io/api/widget/YOUR_WIDGET_ID asynchronously. No API key is needed in this project. The site owner will provide the dashboard value for YOUR_WIDGET_ID.

Path B verification for coding agents

Use the embed snippet above as the install source of truth unless the site owner explicitly provides a localbot CLI. Do not run npx localbot; that npm package name belongs to an unrelated project.

For account-bound checks, ask the site owner to create a scoped API key and call the verification endpoints:

POST /api/v1/widgets/YOUR_WIDGET_ID/verify-install
Authorization: Bearer lb_sk_live_xxx
Content-Type: application/json

{"url":"https://example.com/contact"}

POST /api/v1/widgets/YOUR_WIDGET_ID/test-lead
Authorization: Bearer lb_sk_live_xxx
Content-Type: application/json

{"source":"agent-handoff"}

The API key should only include the scopes needed for the task: widgets:read, installs:verify, and leads:test.

The test-lead endpoint saves a simulated lead for install verification. It does not send owner SMS.

Path B verification checklist

  • The floating form button opens on the page, or inline mode shows the form in the expected location
  • Submitting the form shows a confirmation message
  • A proof or test submission appears in localbot
  • There is exactly one <div id="localbot-contact"> in the DOM
  • There is exactly one script loading https://www.localbot.io/api/widget/YOUR_WIDGET_ID
  • The script URL contains the real dashboard value for YOUR_WIDGET_ID
  • No console errors mention localbot or Content-Security-Policy
  • Payment, owner phone, proof, and consent steps are complete before go-live

Common mistakes

These are the most frequent errors made by AI agents connecting localbot. Avoid all of them.

Do not replace a working contact form for day-one setup. Use Path A when the site already has a working form.

Do not build a custom HTML form for Path B. The full localbot form is loaded by the localbot script. Adding a <form> element alongside it creates a duplicate.

Do not create a backend route for Path B. There is no /api/contact route to write. Floating-form submissions go directly from the browser to localbot.

Do not add Twilio, SendGrid, or Resend. localbot handles owner alerts, SMS follow-up, and handoff summaries. Add separate infrastructure only if the user explicitly asks to own it.

Do not add the script to <head>. Load the script immediately before </body> or use strategy="lazyOnload" in Next.js. Loading from <head> without async blocks page rendering.

Do not load the script more than once. Check that the localbot script does not appear in both a layout file and a page component.

Last updated: 2026-05-23. Maintained by Benjam Indrenius.

On this page