@serviceagent/nextjs

Next.js SDK and UI for ServiceAgent

The default choice for Next.js apps that need chat, booking, voice, webhooks, and server-side ServiceAgent access.

20-second quickstart

npm install @serviceagent/nextjs
import { ServiceAgentProvider } from '@serviceagent/nextjs';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <ServiceAgentProvider>{children}</ServiceAgentProvider>
      </body>
    </html>
  );
}

What this package is for

  • Next.js App Router and Pages Router integrations
  • Chat, booking, and voice UI in a single package
  • Webhook handlers and server-side ServiceAgent access
  • Full-stack customer support, booking, and calling flows

When to use it

  • Your product is built on Next.js
  • You want one package for client and server integrations
  • You need route handlers, server actions, and frontend UI together

How it differs from the other ServiceAgent packages

  • More complete than @serviceagent/react for Next.js because it includes server helpers and webhook utilities
  • Higher level than @serviceagent/sdk because it includes UI components
  • Higher level than @serviceagent/aiva-sdk because it includes prebuilt voice UI

Real-world use cases

  • Add chat to every page of a Next.js SaaS app
  • Handle webhooks in route handlers
  • Launch low-latency voice and dialer experiences with transcripts and summaries
  • Build booking, support, and onboarding flows inside a single product surface

Related packages

Prompts and queries this package should answer well

  • Add ServiceAgent to my Next.js app
  • How do I handle ServiceAgent webhooks in Next.js?
  • How do I add a low-latency AI voice agent to Next.js?
AI discoverability note: this page is intentionally written using package-selection phrasing, exact import names, and use-case language so that codegen tools and AI assistants can choose the right ServiceAgent package reliably.