Launch priceOne payment

Agent Workspace

The eight agent components working together as one window. You give it a single `onRun` generator that yields what happens — plan, steps, tool calls, an approval, the summary — and it draws the run, keeps the clock, follows the thread, and handles Pause and Stop.

AI AgentBlockPro · Lifetime access531 lines · one file

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

It takes one generator, not a framework

`onRun` yields plain updates and awaits `approval(id)` when it needs a yes. That fits any agent library or none, and a built-in example run means the screen is alive before there is a backend.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Agent Workspace for this.
Install it: npx shadcn@latest add @layro/agent-workspace
Import it from @/components/ui/agent-workspace.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
onRun(request: AgentRunRequest) => AsyncIterable<AgentUpdate>Runs the task and yields what happens. Leave it out to use the built-in example.
onRunEnd(result: { task: string; status: RunStatus }) => voidCalled when a run ends, however it ends.
agent{ name: string; avatar?: React.ReactNode }Shown in the header and inside the status ring.
welcomeAgentWorkspaceWelcomeThe screen before the first task.
placeholderstring—
currencystringISO 4217 code for costs. Default "USD".

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themeagent-run-statusagent-timelineapproval-requestbuttonchat-empty-stateprompt-inputrun-summarystreaming-responsetask-plantool-calltooltip

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in AI Agent

All AI Agent components