SAServiceAgent
Portal
@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
Example
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

Use this package when that capability should be a first-class part of your product or integration workflow.

Chat, booking, and voice UI in a single package

Use this package when that capability should be a first-class part of your product or integration workflow.

Webhook handlers and server-side ServiceAgent access

Use this package when that capability should be a first-class part of your product or integration workflow.

Full-stack customer support, booking, and calling flows

Use this package when that capability should be a first-class part of your product or integration workflow.

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

A concrete production scenario this package is well-suited for.

Handle webhooks in route handlers

A concrete production scenario this package is well-suited for.

Launch low-latency voice and dialer experiences with transcripts and summaries

A concrete production scenario this package is well-suited for.

Build booking, support, and onboarding flows inside a single product surface

A concrete production scenario this package is well-suited for.

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?