integration

AI Agents for Next.js Apps

Add a team of AI agents to your Next.js app — a support agent grounded in your content that answers with cited sources and can reach your tools via MCP, asking before it changes anything. Next.js makes embedding a one-component job.

Add a team of AI agents to your Next.js app — a support agent grounded in your content that answers with cited sources and can reach your tools via MCP, asking before it changes anything. Next.js makes embedding a one-component job.

What your visitors get

A visitor with a question gets an instant, cited answer pulled from your own pages rather than a generic guess. Behind the widget, AIML.chat runs a Support agent grounded in your content and tool-calling agents that act through the Model Context Protocol (MCP), with human write-confirm on anything that changes data. Every answer links to the exact source page, so trust stays high. It also captures a lead when it can't fully answer, so you never lose a visitor, and the analytics surface the questions your content doesn't yet cover.

Add it in three steps

  1. 1Create a website in AIML.chat and point the crawler at your app's URL (or connect its GitHub repo). It indexes and embeds your public pages automatically.
  2. 2Add the embed with the Script component from next/script. In the App Router, place it in the root app/layout.tsx; in the Pages Router, add it to a custom _app or _document.
  3. 3Deploy. The widget appears site-wide, themed to match, and stays current as you re-crawl.

Because the widget is vanilla JS under 30KB gzipped and loads with strategy="afterInteractive", it won't hurt your Core Web Vitals. As your content changes, a re-crawl — manual, scheduled, or via the GitHub Action on every push — keeps answers accurate. For docs-specific Next.js setups, see the Nextra guide.

How do I embed it in Next.js?+

Use the Script component from next/script in your root app/layout.tsx (App Router) or a custom _app/_document (Pages Router).

Will it hurt performance?+

No. The widget is under 30KB gzipped and loads after interactive, so it stays out of your critical path.

Is there a free plan?+

Yes — 100 messages a month and one website on the free tier. See pricing for higher limits.

Add AI chat to your site

Free plan · No credit card · 5 minutes