Add AI Chat to Any React, Next.js, or Vue Site with One Line of Code

Add AI Chat to Any React, Next.js, or Vue Site with One Line of Code

R
Ruma AI Team
Apr 22, 2026 · 7 min read · Updated Apr 22, 2026

Nearly 60% of custom-built websites — the React apps, the Next.js storefronts, the Vue dashboards — have zero live support. Not because the owners don't care. Because adding chat always meant wrestling with plugins, API keys, and a weekend of debugging.

That's changing fast.

With the recent buzz around platform fragmentation (a new CMS called EmDash is positioning itself as the "plugin-free" successor to WordPress), a lot of developers and small business owners are asking the same question: what happens to my support tools when I move off WordPress?

The answer, if you're using Ruma AI, is: absolutely nothing changes. Because Ruma's Embed Script for any website doesn't care what framework you're using. React, Next.js, Vue, Svelte, plain HTML — one line of code, and you're live.

Let's dig into why this matters, and how to actually set it up.

flat vector illustration of a single glowing code tag embedding into a modern website interface, deep blue and teal color palette, clean geometric shapes

The Plugin Security Problem Is Real — And Bigger Than WordPress

The conversation around EmDash touches on something developers have known for years: plugin ecosystems are a liability. The more third-party plugins you stack, the more attack surface you expose. WordPress gets the headlines, but any platform with a plugin marketplace carries this risk.

Here's the uncomfortable truth: most chat widgets are plugins. They pull in external scripts, load third-party iframes, and phone home to servers you've never audited. For a small e-commerce business handling customer data, that's not just a headache — it's a compliance risk.

This is precisely why the embed script model is gaining ground. Instead of installing a plugin that hooks into your CMS internals, you drop in a single script tag. It's sandboxed. It's versioned. And you control exactly when and where it loads.

Ruma AI's embed approach was built with this in mind from day one.

What "One Line of Code" Actually Means

Here's how the setup works in practice:

  • Sign up at rumadesk.com (free plan includes 100 messages/month)
  • Configure your AI agent — give it your product catalog, FAQs, tone of voice
  • Copy your unique embed snippet
  • Paste it before the closing tag of your site
  • That's it. Whether you're on a Next.js app deployed to Vercel, a Vue SPA hosted on Netlify, or a custom React dashboard — the widget appears, and your AI agent is live.

    No npm packages to install. No webpack config to touch. No build pipeline changes.

    What the AI Agent Can Actually Do

    This is where it gets interesting — because "chatbot" undersells what's happening here. Ruma uses agentic AI, which means the agent doesn't just reply to messages. It autonomously decides which tools to use and takes action on your behalf.

    On a custom e-commerce site, that looks like:

    All of this happens inside that one embedded widget. The customer never leaves your page.

    Why This Matters for Businesses Moving Off WordPress

    If you're a small business owner evaluating a move to a headless CMS, a custom Next.js storefront, or any platform that isn't WordPress or Shopify — your support stack shouldn't hold you back.

    The Embed Script is platform-agnostic by design. Your AI agent configuration — the tools, the tone, the languages (50+ supported), the CRM connections — travels with you. You're not rebuilding from scratch when you switch platforms.

    This is the architectural argument for agentic AI that lives at the edge of your stack, not buried inside it.

    isometric 3D render of a glowing AI agent widget floating above multiple device screens showing React, Vue, and Next.js logos, warm coral and white color scheme, modern and minimal

    A Quick Real-World Example

    Imagine a boutique outdoor gear brand. They built their storefront on Next.js because they wanted speed and full design control. They sell through their own checkout, not Shopify. They were getting 40–60 support emails a day — sizing questions, shipping queries, return requests.

    After embedding Ruma's AI agent, the agent handles product questions with live catalog search, tracks orders automatically, and routes return requests to the right team member. The owner estimates it saves about three hours of support work per day. The embed took under ten minutes to set up.

    If they were on Shopify, they'd use the Shopify AI Agent. If they were on WordPress with WooCommerce, the WordPress AI Plugin would give them deep native integration. But because they built custom — the embed script is the right tool, and it's just as powerful.

    Voice, Telegram, and WhatsApp — Same Agent, More Channels

    Here's something worth knowing: the AI agent you configure for your embedded widget is the same agent that can power your WhatsApp Business integration, your Telegram bot, and even inbound voice calls. Ruma's Standalone AI Agent lets you deploy to these channels without any website at all.

    So as your business grows — or as you experiment with different platforms — your AI agent scales with you. Configure once, deploy everywhere.

    Getting Started: Pricing That Makes Sense

    Ruma AI's pricing starts with a genuine free tier — 100 messages per month, no credit card required. Paid plans start at $9/month (Go plan), with the Basic plan at $29/month covering most growing businesses. If you commit to six months, you save 15%.

    For a small business replacing even one part-time support hire, the math is obvious.


    Frequently Asked Questions

    Does the embed script work with server-side rendered frameworks like Next.js?

    Yes. The Ruma embed script is a standard JavaScript snippet that loads asynchronously — it won't block your SSR render or affect your Core Web Vitals. You can add it to your _document.js in Next.js or your index.html in Vue/React without any framework-specific configuration.

    Will the AI agent have access to my product data if I'm not on Shopify or WordPress?

    You can connect your product catalog and order data via Ruma's tool configuration during setup. For custom sites, you point the agent to your data sources — the agentic AI handles the rest autonomously at runtime. It's not limited to Shopify or WooCommerce integrations.

    What happens if a customer asks something the AI can't handle?

    The agent is designed to recognize its limits. When a query falls outside its configured knowledge or tools, it initiates a live agent handoff — transferring the customer and the full conversation transcript to a human via WebSocket. No dropped context, no frustrated customers starting over.


    The platform you build on is your choice. Your support experience shouldn't be constrained by it. If you're running a custom-built site and want AI customer support that actually works — without plugins, without platform lock-in, without a weekend of setup — Ruma AI is worth ten minutes of your time.

    embed chatbotwebsite chatbotReact AI chatNext.js chatbotagentic AIcustomer support automation

    Explore Solutions

    AI Chatbot for WordPress
    Learn more →
    AI Chatbot for Shopify
    Learn more →
    AI Chatbot for E-commerce
    Learn more →

    Enjoyed this article?

    Get AI insights and product updates delivered to your inbox.