AI agent workspace

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

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 returned) with the open turn streaming on top: reasoning, tool calls, a cited answer and a plan that waits for approval then runs step by step; and an artifacts panel with changes, sources and files from the whole thread. It renders the turns you give it and calls back for every decision.

Use it for

  • An agent or copilot product where the model plans, asks before acting and produces artifacts (code, documents, data changes) people review.

Not for

Anatomy

  • threads rail (New task when onNewTask is given, recent threads, the person) — from 768px of container; below that the header's Threads button opens the same list in a sheet from the start edge
  • thread header (threads button on narrow widths, title, search when onSearchThreads is given, artifacts button with the artifact count (none shown at 0; it rolls as artifacts arrive))
  • conversation: the earlier turns (settled, read only), then the open turn (question with files; agent turn: reasoning, tool calls that open to their input and output, cited answer, plan, summary; follow-ups), or its empty state; on narrow widths the gutters tighten so the answer keeps most of the width
  • composer (glow ring while the agent works; Stop), as wide as the conversation's reading column
  • artifacts (changes, sources, files with counts): an inline column from 1152px of container whose track eases open and shut from the header toggle (the panel keeps its width meanwhile, so nothing rewraps); below that the header button opens them in a sheet from the end edge. They open on the first tab that has content

States

  • empty (no run)
  • thinking
  • answering (streaming, log aria-busy)
  • awaiting approval
  • running plan
  • done
  • rejected
  • artifacts hidden
  • artifacts in a sheet (container under 1152px)
  • threads in a sheet (container under 768px)

Keyboard

  • Tab moves rail → thread header → conversation → composer → artifacts; the Threads and Artifacts sheets trap focus, close on Escape and return focus to their header button
  • plan: Approve / Edit plan / Reject are buttons
  • citation markers open their source on focus
  • Enter sends from the composer, Shift+Enter breaks a line

Motion

Reasoning folds when done; the answer streams in place; the conversation sticks to the bottom unless you scroll up; the composer's ring glows only while the agent works. The open thread's plate travels between threads. The artifacts column eases open and shut over the morph duration; the artifact count rolls; when the run's code change lands a consequence trace runs from the plan to the Changes tab (or to the Artifacts button when they live in a sheet). Reduced motion places the column at once and keeps the trace as a still ring.

Props

PropTypeDefaultDescription
runAgentRun—The open thread's run; without one the conversation shows its empty state.
threads / thread / defaultThread / onThreadChange{ id, title, meta? }[] / string—threads: Conversation threads available to open. Defaults to an empty list. thread: Controlled active conversation id; omit to use defaultThread. defaultThread: Initial active thread id; defaults to the first supplied thread. onThreadChange: Reports active thread id after a change; no callback by default.
onSubmit / onStop / onNewTask(message: PromptSubmission) => void | Promise / () => void—onSubmit: The composer sends (follow-ups, new tasks). onStop: Stop the run while it works. onNewTask: Starts a new agent task; no handler by default.
onApprove / onReject / onEditPlan() => void | Promise / () => void—onApprove: Runs the approval action; no handler by default. onReject: Runs the rejection action; no handler by default. onEditPlan: Opens the plan for editing; no handler by default.
onAttachmentRemove(id) => void—Removes the attachment with the supplied id; no handler by default.
composerPartial<PromptBarProps>—Extra composer props: sources, commands, models, placeholder.
panel / defaultPanel / onPanelChangeboolean—panel: The artifacts panel, controlled or not. Default open. defaultPanel: Initial details panel visibility when uncontrolled. Defaults to true. onPanelChange: Reports details panel visibility after a change; no callback by default.
user / agentName{ name, avatar? } / string—user: The person using the workspace. agentName: The agent's name, read out with its mark. Default "Agent".
classNamesAgentWorkspaceClassNames—Classes for the named visual parts; no part overrides by default.
style / refCSSProperties / Ref<HTMLDivElement>—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
onSearchThreads() => void—Open the application-owned thread search.
user{ name: string; avatar?: string | undefined; }—The person using the workspace.
agentNamestring—The agent's name, read out with its mark. Default "Agent".
threadsAgentWorkspaceThread[]—Conversation threads available to open. Defaults to an empty list.
threadstring—Controlled active conversation id; omit to use defaultThread.
defaultThreadstring—Initial active thread id; defaults to the first supplied thread.
onThreadChange((id: string) => void)—Reports active thread id after a change; no callback by default.
onNewTask(() => void)—Starts a new agent task; no handler by default.
onSubmit((message: PromptSubmission) => void | Promise<unknown>)—The composer sends (follow-ups, new tasks).
onStop(() => void)—Stop the run while it works.
onApprove(() => void | Promise<unknown>)—Runs the approval action; no handler by default.
onReject(() => void | Promise<unknown>)—Runs the rejection action; no handler by default.
onEditPlan(() => void)—Opens the plan for editing; no handler by default.
panelboolean—The artifacts panel, controlled or not. Default open.
defaultPanelboolean—Initial details panel visibility when uncontrolled. Defaults to true.
onPanelChange((open: boolean) => void)—Reports details panel visibility after a change; no callback by default.
classNamestring—Classes on the documented visual root; no override by default.
refRef<HTMLDivElement>—Receives the documented root element; no ref by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
earlierAgentRun[]—Turns before `run` in the open thread, settled and read only, oldest first; their changes and files join the artifacts. A thread the person comes back to opens on the whole conversation, not on its last question.

Built from

Dependencies

use-stick-to-bottom, streamdown, radix-ui, lucide-react, motion

Import

import { AgentWorkspace } from "@beamline/agent-workspace";

Get it

AI agent workspace 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

  • 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…
  • Voice agent: 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…
  • 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: Build an AI interface

Guides: Build an AI agent interface in React

Compared in: Mantine and Beamline for React app screens · shadcn/ui alternatives for finished React app screens · Shadcnblocks and Beamline for React product 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.