Agent assist
Give the panel the number your agent is talking to. It finds the active call, turns on live transcription, streams the conversation and keypad events as they happen, and shows the AI summary when it lands after hangup.
Installation
npx shadcn@latest add @handset/agent-assistInstalls call-transcript and call-keypad as dependencies. Your server proxy needs the POST /calls/{id}/transcription allowlist entry — included in current next-routes / express-routes / remix-routes; add the one line by hand if you installed the proxy earlier.
Usage
Pair it with anything that knows who's on the line — the softphone, a click-to-call button, or your own dialer state:
import { AgentAssistPanel } from "@/components/handset/agent-assist";
import { useSoftphone } from "@handset/webrtc/react";
function AgentWorkspace() {
const { call } = useSoftphone(softphone);
return <AgentAssistPanel remoteNumber={call?.remoteNumber ?? null} />;
}The panel matches the number against active calls on the API (last 10 digits, so formatting differences don't matter), then follows that call by id: transcript and keypad views poll while the call is live, and after hangup the panel waits for the call.summary to generate.
How transcription starts
On mount the panel calls POST /v1/calls/{id}/transcription — the on-demand switch that works on any in-progress call, inbound or outbound. It's idempotent, so calls created with transcribe: true are unaffected. Transcription bills per transcribed minute; set autoTranscribe={false} to render only what's already flowing.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| remoteNumber | string | null | — | The far party's number. Null renders nothing. |
| autoTranscribe | boolean | true | Start live transcription once the call is found. |
| className | string | — | Merged onto the panel wrapper. |