Arc
ComponentsBlocksDocsPricingTry the demo
Get Pro
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboardPro
KPI drilldownPro
Metric explorerPro
Revenue explorerPro
MRR waterfallPro
Cohort retentionPro
Usage forecastPro
Journey flowPro
Uptime statusPro
Pivot builderNewPro
Choropleth explorerPro
Connected scatterPro
Horizon chartPro
Account healthPro
Market terminalPro
Budget variancePro
Small multiplesPro
Line replayPro
AI chatPro
AI composerPro
AI answerPro
Model pickerPro
Model arenaPro
Prompt studioPro
Document extractionPro
Agent memoryPro
AI side panelPro
AI inline editPro
Research runPro
AI insight cardPro
Catch upPro
AI feature launchPro
AI search barPro
AI setup wizardPro
Call insightsPro
Lead scoringPro
Agent runPro
Agent tasksPro
Agent approvalsPro
Agent routinesPro
Agent orchestratorPro
MCP serversPro
Knowledge basePro
Eval suitePro
Agent builderPro
Agent galleryPro
SidebarPro4
Page header
Command palette
Notification center
Selection toolbarPro
Empty states
Search resultsPro
Login and sign up5, free and Pro variants
Onboarding illustrationPro
OTP input
Multi-step formPro
Two-factor setupPro
Magic linkPro
Settings pagePro
Settings commandPro
Security settingsPro
Billing overviewPro
Usage billingPro
Cancel flowPro
Onboarding surveyPro
Spend alertPro
Team membersPro
Invite peoplePro
Team directoryPro
Roles and permissionsPro
Profile pagePro
API keysPro
WebhooksPro
IntegrationsPro
Environment variablesPro
Domain verifyPro
Webhook testerPro
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Live checkoutPro
Seat managerPro
Credit top-upPro
Invoice studioPro
Wallet cardPro
Delivery trackerPro
Product listingPro
Product detailPro
Seat mapPro
Activity feedPro
Inbox triagePro
Support conversationPro
Support widgetPro
Help centerPro
Feature votingPro
File upload
Media playerPro
Week calendarPro
Availability pickerPro
Project boardPro
Gantt timelineNewPro
Release readinessPro
Kanban boardPro
Feedback boardPro
Smart schedulerPro
Task breakdownPro
Goal trackerPro
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrainPro
Revenue globePro
Customer galaxyPro
Semantic zoomPro
Layout morphPro
Exploded viewPro
What’s new4 new
BlocksAgent run

Agent run

Pro

A single card that follows one AI coding agent through a task: steps stream in with the live one shimmering, tool calls open in place, and the agent stops on a two-file diff for you to approve or send back before it writes. When the run ends, the steps fold into one line and a result shows the files changed, the checks that passed and a pull request button.

Live block · sample data

When to use

  • Coding agents and background jobs that read, search, edit and test, where people watch progress and approve the change before it is written.
  • Product surfaces that hand an agent a ticket and return a pull request, such as an issue tracker, a review tool or an IDE side panel.
  • Demos and onboarding that explain how an agent works step by step, with a real approval gate.

When not to use

  • Use research-run for a research agent that reads sources and writes a cited report.
  • Use agent-approvals for an inbox of pending approvals across many agents and tools.
  • Use agent-orchestrator when several agents work in parallel on parts of one job.
  • Use code-review for reviewing a finished pull request line by line with comments.

Installation

Pro source and install commands unlock with a Pro plan.

Usage

With no props it plays a simulated run. To show a real agent, pass run={{ status, elapsedMs, steps, result }} built from your runtime's events, plus onApprove(change), onReject(change, reason), onOpenPullRequest() and onRestart. To replay your own scenario, pass script instead; autoPlay={false} shows a Start run button.

example.tsx
1import { AgentRun } from "@/components/arc/blocks/agent-run/agent-run";2 3// Simulated demo4<AgentRun />5 6// Live: build the state from your agent runtime's events7export function AgentPanel({ run, task }) {8  return (9    <AgentRun10      task={task}11      run={run} // { status: "working" | "waiting" | "done", elapsedMs, steps, result }12      onApprove={change => agent.approve(change.id)}13      onReject={(change, reason) => agent.reject(change.id, reason)}14      onOpenPullRequest={() => agent.openPullRequest()} // resolves to { number, url }15      onRestart={() => agent.restart()}16    />17  );18}19 20// A step while it runs, and an approval step waiting for a decision21const steps = [22  { id: "tests", mark: "npm", verb: "Running tests", doneVerb: "Ran tests", doneTarget: "12 passed", status: "running", progress: { value: 8, total: 12 } },23  { id: "review", mark: "review", verb: "Preparing", doneVerb: "Approved", doneTarget: "changes to 2 files", status: "waiting", change },24];
Built fromButtonInputText shimmerTooltip

API reference

2 parts. The first is the root.

AgentRun

One card that follows an AI coding agent through a task. The header holds the task, the model with its mark, a live status word (Working with a shimmer, Waiting for you, Done) and an elapsed timer. Steps stream into a list named Steps, the live verb shimmering; tool steps open in place to show their input and output in mono, and finished steps settle to secondary text with a drawn check. Before it writes, the agent stops on a compact unified diff with one tab per file and Approve and Reject; Reject asks for a short note and the agent revises once. When the run ends the steps fold into one line and a result appears: the closing message, files changed with a diffstat, checks, and Open pull request.

PropTypeDefaultDescription
taskstring"Add rate limiting to the public API"What the agent was asked to do, shown as the card title.
model{ name: string; mark?: ReactNode }Claude Sonnet 5.5 with the Claude markThe model doing the work. The mark is decorative; the name is read out.
scriptRunScriptsampleScriptThe simulated run: steps with durations, approval steps carrying a ProposedChange and an optional revise branch, and the tests and checks to report. Ignored when run is set.
runAgentRunState–A live run from your agent runtime: { status, elapsedMs, steps, result }. Map your runtime's events onto it; the card renders exactly what you pass. Leave it out to simulate script.
autoPlaybooleantrueStart the simulation once the card is on screen. When false, the card shows a Start run button.
onApprove(change: ProposedChange) => void–Called when someone approves a change. A simulation then writes it and carries on.
onReject(change: ProposedChange, reason: string) => void–Called with the note when someone rejects a change. A simulation revises once, then stops on a second rejection.
onOpenPullRequest() => Promise<PullRequest | void> | PullRequest | void–Opens a pull request from the result and returns { number, url }. Throw to report a failure. Without it the preview simulates PR #482 and says so in a live region.
onRestart() => void–Called by Restart run. A simulation restarts on its own.
classNamestring–Class on the root section.

useSimulatedRun

The hook behind the simulation, exported for tests and custom shells. Plays a RunScript on one animation frame clock and returns { state, start, restart, approve, reject }. The clock stops while a change waits, while the card is off screen and while the tab is hidden.

PropTypeDefaultDescription
scriptRunScript–The script to play.
options.runningboolean–Whether the clock may tick, for example only while the card is in view.

Keyboard interactions

Tab
Moves through Restart run, each finished step, the file tabs and code of a waiting diff, Reject and Approve, the folded steps line and Open pull request.
Enter, Space
On a step, opens or closes its input and output. On the folded line, shows or hides the steps.
Arrow leftorArrow right, Home, End
On the diff's file tabs, switches file.
Enter
In the rejection note, sends the change back to the agent.
Escape
In the rejection note, cancels and returns focus to Reject.

Accessibility

  • The card is a section named by the task. Steps are an ordered list named Steps; each expandable step is a button with aria-expanded and aria-controls.
  • A polite live region announces each step as it starts, the wait for approval, the end of the run with the test count, and stopping. A second region reports the pull request, including that the preview only simulates it.
  • Status is never color alone: the status word sits beside an icon, finished steps change to past tense with a check, and a sent back step reads Sent back with the note.
  • Diff lines carry hidden Added and Removed prefixes; the + and − markers and the tints are decorative. The file tabs are a tablist with tabpanels, and the hidden panel is inert.
  • Approving or rejecting moves focus to that step's row, opening the note moves focus into it, and cancelling returns it to Reject.
  • Pointer focus draws no ring; keyboard focus shows Arc's shared focus ring.

Motion

  • New steps open their height on a critically damped spring and fade in; nothing bounces.
  • The live verb shimmers with Text shimmer. When a step finishes, the verb crossfades to past tense (100ms out, 160ms in from 2px) while its slot follows the measured width, and the check draws its stroke once.
  • The header status word swaps with the same crossfade; the timer uses tabular numerals in a reserved width.
  • Every diff file shares one grid cell, so switching tabs only crossfades and the card never resizes. The reject note swaps in place while the footer height follows on the smooth spring.
  • At the end the steps fold to one line and the result opens below; the closing message streams in chunks of a few words every 34ms, laid out in advance so nothing reflows.
  • The pull request button keeps every label in one cell, so Open pull request, Opening and PR #482 opened crossfade without changing width.
  • Reduced motion drops travel, fades and the shimmer and keeps every state, label and announcement.

Responsive behavior

  • The card is up to 720px wide and works from 320px. Below 520px the step durations hide, the step details lose their indent, the diffstat blocks hide and the approval buttons take a full row.
  • Long step labels and file paths truncate on one line; the full path stays in the tab title and the panel label.
  • Diff and tool output scroll sideways inside their own frame, so the card never scrolls horizontally.

Performance

  • The simulation commits about 25 times a second from one requestAnimationFrame loop and pauses off screen, in a hidden tab and while waiting.
  • Finished steps keep the same object and the rows are memoized, so only the live row re-renders on each beat.
  • Streaming text renders its chunks once and only flips their opacity; there is no per-word animation.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use it for one agent on one task with a human approval before writes. For a fleet of agents use agent-orchestrator; for a queue of approvals use agent-approvals.
  • Pass run for a live agent. Each step needs id, mark, verb, doneVerb and status; add target, doneTarget, progress, io, text or change as they apply. The card derives labels: running shows verb + target, waiting shows Review + doneTarget, done shows doneVerb + doneTarget.
  • An approval step carries change: { id, summary, files: [{ path, status, lines }], outcome }. Diff lines are { type: "add" | "del" | "ctx", old?, new?, text }.
  • Marks: think, read, search, edit, terminal and review are lucide icons; npm, typescript and github are real brand marks. Pass icon on a step for your own.
  • Set result when status is done: summary, files with additions and deletions, tests and checks. elapsedMs should count only time the agent worked.
  • Do not show it as executing real code in a demo; the default script is simulated and the pull request is simulated unless onOpenPullRequest is wired.
/components/blocks/agent-run/markdown

The full library index for assistants is at /llms.txt.

Related

Research runProBlockDeep research that plans searches, reads sources with their marks, and streams a cited answer where every chip lights up the sentence it supports.Agent approvalsProBlockOne approval card for agents: the waiting tool call reads like a permission prompt with the tool's mark, the agent's reason and its arguments, and you approve, deny or allow it from now on.Agent orchestratorProBlockA lead agent splits a goal into a plan, fans the subtasks out to parallel worker lanes and merges what comes back, with each lane's model, progress and result in view.Agent tasksProBlockA home for background coding agents: start a task on a repository and branch, watch each card move from queued to running to ready for review, and open a pull request from the result.Text shimmerComponentShow ongoing work with a calm light across the words.
PreviousLayout morphNextWeek calendar
Arc · 134 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

Add rate limiting to the public API

Claude Sonnet 5.5Ready0:00