Support inbox with an AI copilot, built from the agent primitives: open a ticket and the agent reads it, looks up the customer, searches the help center on a live activity timeline, drafts a reply with citations and asks before it issues a refund. Ticket list, customer panel and a send step included. Scripted end to end, so it runs with no backend until you plug in your model.
Set your access key from API keys as NEXTUI_TOKEN in .env.local and add the @nextui namespace below to components.json once. Then every item installs by name. Each install counts as a copy on a free account.
$pnpm dlx shadcn@latest add @nextui/support-agent
1{2"registries": {3"@nextui": {4"url": "https://nextui.dev/r/{name}.json",5"headers": { "Authorization": "Bearer ${NEXTUI_TOKEN}" }6}7}8}
1"use client";23import { SupportAgent } from "@/components/pages/support-agent";45export default function Page() {6return (7<SupportAgent8brand="Helpline"9onApprove={(ticket, action) => console.log("approved", action.toolName, ticket.id)}10onSend={(ticket, reply) => console.log("send", ticket.id, reply)}11/>12);13}
| Prop | Type | Default | Description |
|---|---|---|---|
| brand | string | "Helpline" | Product name above the ticket list |
| tickets | Ticket[] | 3 sample tickets | Each ticket's customer, message and the copilot's script: reasoning, steps, lookup, draft, sources and an optional action that needs approval |
| initialTicket | string | the first ticket | Id of the ticket open on load |
| onApprove | (ticket, action) => void | – | An action such as a refund was approved |
| onSend | (ticket, reply) => void | – | The reply was sent |
| className | string | – | Extra classes on the section |
Sign in to see the code
Preview it freely. A free account copies code and prompts a few times a day.