Voice agent

A React block (a whole screen) in Beamline's AI workspace app.

A voice agent in three layouts on one session: a workspace with the agent's orb large on a stage (the line being said shows under it, questions to ask, the conversation bar) beside the transcript of typed and spoken lines, with an earlier conversation kept above this one for a returning caller; a call screen with the orb and one call button; and a support panel that mixes typing and talking. One adapter connects any provider.

Use it for

  • A support widget where people type or talk to an agent (panel).
  • A phone-style call with an agent (call).
  • Apps where voice is the main way to work with the agent (workspace).

Not for

Anatomy

  • panel: header (agent orb, name, status, menu), conversation (an earlier conversation under its label when given, a Now divider, greeting, typed and spoken lines), composer (field, voice button, send) that becomes the conversation bar during a call
  • call: agent orb (reacts to both voices), name and role, status and timer, latest line as a caption, one call button (and mute in a call), failure with fix
  • workspace: header (agent, role, microphone settings); stage (the orb large, call status and timer, the line being said now or the agent's last line as a large caption, suggestions while no call runs, the conversation bar); transcript beside it (line count, the earlier conversation under its label, a Now divider, this conversation's lines). Before the first line the stage stands alone; in a narrow room the transcript leads with the bar under it and the orb moves to the header

Variants

  • layout: panel, call, workspace

States

  • idle
  • typing (text session)
  • asking for the microphone
  • connecting
  • listening
  • thinking
  • talking
  • muted
  • reconnecting
  • ended
  • error: blocked / no microphone / connection / service
  • microphone unavailable (agent cannot hear; typing still works)

Keyboard

  • Tab order follows the layout: header, conversation, composer or bar
  • Enter sends a typed message
  • The call button, mute and voice button are buttons (Enter / Space); mute and voice are toggles
  • Escape closes the typing field in the bar

Motion

The orb and bars move only while connected and on screen; the conversation follows new lines unless you scroll up. Under reduced motion the orb holds still with a state ring and bars show numbers.

Props

PropTypeDefaultDescription
layout"panel" | "call" | "workspace""panel"panel: a support chat with a voice button; call: orb, name and one call button; workspace: empty state, transcript, conversation bar.
adapterVoiceAgent—The provider (see conversation-bar for wiring); the block then holds its own session.
sessionVoiceAgentSession—Or one session from useVoiceAgent(), shared across layouts and the rest of the screen.
agent{ name: string; role?: string; greeting?: string }{ name: "Assistant" }Agent identity shown for the session; defaults to the name Assistant.
suggestionsstring[]—Workspace: things to ask, shown on the stage while no call runs.
classNamestring—Classes on the documented visual root; no override by default.
classNamesVoiceAgentClassNames—Classes for the named visual parts; no part overrides by default.
style / refCSSProperties / Ref<HTMLElement>—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLElement>—Receives the documented root element; no ref by default.
historyVoiceAgentMessage[]—Workspace and panel: an earlier conversation shown above this one, read only (a returning caller).
historyLabelstring—The label above that earlier conversation: "Today, 9:40".

Built from

Dependencies

lucide-react, use-stick-to-bottom, streamdown

Import

import { VoiceAgent } from "@beamline/voice-agent";

Get it

Voice agent is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in AI workspace

  • AI agent workspace: Threads, a conversation that opens on the thread's earlier turns (each with its trace, the tools the agent called, a cited answer and any table it…
  • Agent runs monitor: Every run of your agents in one place: success rate, run time, tokens and spend; the last runs as a strip of status blocks; a live table where running…
  • Agent monitor: Agents in production and on test. Monitor shows every agent or one over 24 hours, 7 or 14 days: runs, tokens, estimated cost and average run time counted…
  • Conversation history: Past conversations with an assistant, ready to pick up again: the list by day with bookmarks and unsent drafts, a search through every message that…
  • Knowledge base manager: What your assistant knows and whether it is fresh: sources with live sync status (syncing with progress, out of date, failed with the reason and Retry)…
  • Reading library: A read-it-later library: saved views that are live filters (a query with every unreadable part named, the number that matches now, saved with a name; a…
  • Artifact workbench: Where the things an assistant makes are checked before they leave: every document, piece of code, small app and data result from a conversation, each…
  • AI image studio: Write a prompt, pick a shape, a style and how many, and watch the variations generate side by side; each one opens full screen and can be upscaled or…
  • Model playground: Try one prompt on up to three models side by side: pick each model with its price and speed in view, set the system prompt, temperature and length once…
  • Model inspector: A design model's objects without needing the 3D view: the model tree, where objects with the same name are told apart by id and path; the selected…
  • Model issues: Issues pinned to the objects of a design model. The queue says the scope beside every count (open in the project, on the loaded models, on this version)…
  • Agent builder: An agent's configuration beside an assistant that proposes tools. Ask for what the agent should do and the assistant's proposal lists each tool with why…
  • Workflow composer: A workflow drafted from a sentence and finished by hand. The prompt drafts steps that arrive one by one on the graph (a draft cut short keeps what came…
  • Data binding: Bind an object's properties to a view model. Each property says whether it is bound, incomplete or mismatched. A binding takes its source from the…

Read next: Connect a voice-provider adapter

Guides: Build a voice agent UI in React

Compared in: shadcn/ui alternatives for finished React app screens · Untitled UI alternatives for React teams

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.