How it fits together
1
Build the agent
Two ways in, same result.In the app: open the Composer, describe the agent in plain English, or point it at your website URL and let it scrape the business, write an optimized prompt, and deploy a live agent in about 30 to 60 seconds. Set the name, first message, and voice, then toggle it active.Over MCP: connect your AI client to the live MCP server and ask it to build the agent for you. For Claude Code, connect over the hosted cloud endpoint (OAuth in the browser, no API key, no config file):Then just ask: “Create a voice agent from example.com and give me the widget install code.” The
smartalex_create_agent tool builds and deploys the agent, and smartalex_get_widget_install_code returns the exact snippet to paste. ChatGPT, Cursor, VS Code, and Windsurf connect to the same server (see supported clients).2
Pick a widget variant
In Widget Studio, choose how the agent appears and which agent answers. For a Lovable landing page, two variants cover most cases:
- Voice pill (
voice_pill): a compact floating button, voice only. Best when you want the fastest “tap to talk” call to action. - Ask Alex (
ask_alex_v2): a full messenger with both voice and text, so visitors can type or talk. Good for support and richer conversations.
pill variant is voice-first with a chat fallback and is a safe choice if you are unsure. One widget is active per workspace at a time. You can restyle the colour, position, and greeting here later without touching your site again.3
Copy your install code
Grab your
data-tenant-id from the widget code panel in the app, or from the MCP tool if you built over MCP. Then paste one of the two snippets below into your Lovable project.Paste it into your Lovable project
Lovable outputs a React app, so use the component method. If you ever export a static build (or you are on a plain HTML site), the script tag works too.YOUR_TENANT_ID for your real value. There is no package to install: it is a single external script loaded from the SmartAlex storage host, so it will not touch your bundle or add dependencies.
The widget reads its published configuration (variant, colours, agent) at load time. Change the look or swap the answering agent in Widget Studio and the live site updates on the next page load, no redeploy required.
Works for any React or static site
Nothing here is specific to Lovable. The React component drops into any React or Next.js app (v0, Bolt, Replit, or hand-written). The script tag works on any static or CMS site, with the same one-line install used for WordPress, Shopify, Wix, and Squarespace. The voice itself runs on a curated, high-accuracy stack of speech, language, and voice models, kept abstracted, so there is nothing for you to tune or wire up. Your visitors get a fast, natural conversation and you keep a plain script tag.Building programmatically today happens over the live MCP server and Custom HTTP Tools. A public REST API and a TypeScript SDK are in private beta and coming soon. For now, the widget embeds via the script tag or the React component above, which is all a Lovable site needs.
Related
Widget Studio
Configure the variant, appearance, and answering agent before you install.
Installing the widget
Copy-paste guides for React, WordPress, Shopify, Wix, and Squarespace.
Cursor, v0, and Bolt
The same voice widget in other AI-native builders and editors.
Build with Claude Code
Create and manage agents end to end over the MCP server.

