Skip to content

AI Agent Components

Varo Agent UI provides standalone Demo → Basic Usage → Props → Events → Slots → Target Notes pages for its foundational surfaces; this overview also records the new Agent Workspace contract. The current delivery contains 42 dual-target Agent components plus Agent Chat and Agent Workspace Blocks, all consuming the shared @varo-ui/ai event and thread-version contracts.

Complete Conversation Demo

VARO AGENT UI

A real incremental event stream, not a static screenshot

H5 uses Markstream RAF; mini programs use timed frames with the same Markdown AST.
idle
Varo Agent44 dual-target AI UI surfaces connected
Varo Agent

我是 Varo Agent UI 文档演示。下面的回答由真实增量事件流渲染。

Capability ledger44 / 44
AgentLoadingAgentThinkingAgentMarkdownAgentStreamAgentMessageAgentConversationAgentMessageScrollerAgentToolChipAgentToolResultAgentTaskListAgentActivityAgentApprovalAgentToolApprovalAgentRecommendationAgentEventRendererAgentRadioGroupAgentPromptSuggestionsAgentComposerAgentResponseActionsAgentSelectionActionsAgentCommandSearchAgentArtifactAgentAttachmentListAgentSourceListAgentCitationsAgentContextCardAgentCodeBlockAgentFileDiffAgentImageGenerationAgentSidebarAgentInsightCardAgentDiffTableAgentRecordsTableAgentFilterTableAgentFlowchartAgentFineTuneAgentChat Block

Conversation and Streaming

ComponentResponsibility
AgentLoadingLoading, elapsed time, and running feedback
AgentThinkingReasoning, search, and execution traces
AgentMarkdownSafe incremental Markdown AST
AgentStreamStreaming response, errors, cursor, and actions
AgentMessageUser, assistant, and system messages
AgentConversationMessage history composition
AgentMessageScrollerReader-aware conversation viewport

Execution, Tools, and Approval

ComponentResponsibility
AgentToolChipCompact tool state
AgentToolResultCollapsible terminal and request output
AgentTaskListAgent plan and progress
AgentTaskRunnerRetry, approval, and cancellation controls
AgentActivityMixed reasoning, search, and tool activity
AgentApprovalGeneral human approval
AgentToolApprovalTool permission approval
AgentRecommendationAgent suggestion with confidence
AgentEventRendererSnapshot-to-response state projection

Prompt and Response Actions

ComponentResponsibility
AgentRadioGroupAnimated single-choice decisions
AgentPromptSuggestionsPrompt suggestions
AgentComposerAgent input and send state
AgentComposerScopePre-submit source permission and context budget
AgentResponseActionsCopy, retry, like, and dislike
AgentSelectionActionsAI actions for selected text
AgentCommandSearchAgent command search

Context, Citations, and Artifacts

ComponentResponsibility
AgentArtifactCode, document, file, and image artifacts
AgentAttachmentListAttachment preview and removal
AgentSourceListSource list
AgentCitationsCollapsible citations
AgentRetrievalProgressVisible retrieval queue and failed-item retry
AgentSourceReceiptPost-answer source read receipt
AgentContextCardRetrieved knowledge chunks
AgentCodeBlockStandalone streaming code block
AgentFileDiffFile-level diff
AgentImageGenerationImage generation lifecycle

Structured Data and Workspace

ComponentResponsibility
AgentSidebarAI workspace sidebar
AgentThreadVersionsThread branch and version selection
AgentShellPage, docked, and sheet placement
AgentInsightCardPaged Agent insight
AgentDiffTableAI-proposed table changes
AgentRecordsTableSortable records table
AgentFilterTableStatus-filtered table
AgentFlowchartAgent workflow
AgentFineTuneDesign property tuning panel

Agent Workspace Contract

ComponentKey inputsUser events
AgentComposerScopesources, usagePercent, disabledtoggle(source, enabled), connect(source)
AgentRetrievalProgressitemsretry(item)
AgentSourceReceiptitems, summaryopen(item), connect(item)
AgentTaskRunnertasks, busyretry(task), approve(task), cancel
AgentThreadVersionsversions, activeIdselect(version), branch(version), pin(version)
AgentShellplacement, open, titleclose

createAgentThreadController() in @varo-ui/ai owns the immutable acyclic version graph; components only render its snapshot and forward decisions. AgentWorkspace exposes qualified events such as toggleSource, retryRetrieval, retryTask, and selectVersion so unrelated retry and connect surfaces never collide.

Complete Block

  • AgentChat: composes history, streaming responses, reasoning, tools, approval, and prompt input.
  • AgentWorkspace: composes source permission, retrieval progress, task controls, thread versions, conversation, and three placement modes.

Beautiful UI / beUI / ReUI Coverage

Varo does not copy React or Framer Motion source. It rewrites the interaction contracts for Vue 3, weapp-vite, wevu, and weapp-tailwindcss.

  • Beautiful UI’s 20 Agent surfaces are mapped: Loading, Thinking, Streaming, Approval, Tool Chips, Task Rows, Chat, Prompt Bar, Recommendation, Context, Diff Table, Records Table, Filter Table, Sidebar, Search, Flowchart, Insight, Code Block, Fine-tune, and Selection Actions.
  • beUI Agent capabilities are mapped: Message / Bubble, Message Scroller, Prompt Input, Todo List, Code Block, Approval Card, File Diff, Tool Result, Streaming Response, Image Generation, Tool Approval, Citations, Agent Activity, Loading States, AI Sidebar, and Chat App.
  • ReUI AI Chat 1 / 6 / 9 / 12 flows map to AgentComposerScope, AgentRetrievalProgress, AgentSourceReceipt, AgentTaskRunner, AgentThreadVersions, AgentShell, and AgentWorkspace. Varo adopts the interaction structure without copying React/Radix source or its desktop visual shell.
  • React-only motion/layoutId, DOM selection, and browser clipboard behavior are not carried into mini programs verbatim. Equivalent behavior uses WXML state, CSS motion, controlled events, and product callbacks.

Install

bash
pnpm dlx @varo-ui/cli add --target h5 components/agent-ui
pnpm dlx @varo-ui/cli add --target weapp components/agent-ui
pnpm dlx @varo-ui/cli add --target weapp blocks/agent-chat
pnpm dlx @varo-ui/cli add --target h5 blocks/agent-workspace
pnpm dlx @varo-ui/cli add --target weapp blocks/agent-workspace

Event Protocol

Streaming surfaces share these transport events:

  • message.start / message.end
  • text.delta
  • reasoning.*
  • tool.*
  • approval.*
  • data / error / done

Thread branches are not streaming transport events. Product code uses createAgentThreadController() to append, fork, and select, then passes the readonly versions snapshot to AgentThreadVersions. Source permission, retry, approval, and shell close remain controlled UI callbacks.

H5 uses Markstream Core RAF scheduling. Mini programs use timed-frame scheduling. Both consume the same safe Markdown AST.