@burtson-labs/agent-ui

中文文档
1.0.90发布于 2026/11/08Apache-2.0TypeScriptESM + CJS近 30 天下载 1856

UI primitives for the Bandit Agent Framework.

原始使用文档
文档目录6 节
  1. Install
  2. Quick start
  3. What's in the box
  4. Status
  5. Authoring a new component
  6. License
Burtson Labs

@burtson-labs/agent-ui

UI primitives shared between the Bandit Stealth web app and the VS Code extension webview.

Host-agnostic React components — they consume a normalized event stream from the runtime and don't know whether they're rendering inside Vite, a VS Code webview, or the workbench harness.


Install

pnpm add @burtson-labs/agent-ui

Peer-depends on React 19, MUI 7, and emotion — the host app provides them. The runtime side (the event stream the components consume) comes from @burtson-labs/agent-core or the pre-wired @burtson-labs/stealth-core-runtime.

Quick start

Components are pure — they consume props and don't reach for any host. Import the CSS once at your app root, then drop components in:

import {
  MarkdownMessage,
  ChatComposer,
  ChatConversation,
  PlanTree,
  DiffStream,
  TelemetryPanel,
  AgentConsole
} from "@burtson-labs/agent-ui";
import "@burtson-labs/agent-ui/styles/agent-ui.css";

function ChatPanel({ messages, onSend }) {
  return (
    <>
      <ChatConversation messages={messages} />
      <ChatComposer onSubmit={onSend} placeholder="Type a message…" />
    </>
  );
}

Import from the package root. import resolves to an ES module build and the package marks only its stylesheet as a side effect, so bundlers keep just the components you use: one card from the root adds about 7 KB, not the whole library. require still gets the CommonJS build.

What's in the box

ComponentWhat it renders
ChatComposerMulti-line input + submit, with model picker, mode toggle, and skill chips
ChatConversationStreaming message list with assistant / user / tool / reasoning blocks
MarkdownMessageSingle message bubble — markdown + syntax highlighting + file-reference links
PlanTreePlan + steps tree with progress states
PlanActivityPer-step activity feed (tool calls, diffs, logs)
DiffStreamLive unified-diff viewer for proposed edits
DiffReview/DiffReviewPanelMulti-file accept / reject before applying
TelemetryPanelToken usage + per-iteration timing; counts a provider never reported read "Unknown"
UsageMeter / ContextMeterUsed-of-limit meter that shows unknown usage as unknown and draws no bar without a reported limit
AgentConsoleCombined chat + plan + diff cockpit for the simple case
PermissionCardInline allow/deny prompt for write-tool execution. Pass status to let the host own the decision state (pending, submitting, resolved, error, expired); a request never reports a decision twice. Focuses itself while pending (without scrolling the page); autoFocus={false} opts out
QuestionCardask_user questions: radio options, typed answers, tabs plus a review step for several questions. toUserInputResponse builds the host's userInputResponse message. Focuses itself on mount without scrolling the page; autoFocus={false} opts out (e.g. a demo below the fold)
TaskListCompact list of in-flight + recent agent runs
BackgroundTaskTileLive tile for a subagent the parent turn spawned

Status

Stable. Used by the Bandit Stealth web app, the Bandit VS Code extension webview, and a mock-driven dev workbench. Breaking changes need a coordinated PR across the consumers.

Authoring a new component

Components live under src/components/. Each one should:

  1. Consume props only — no global state, no host-specific imports
  2. Be testable from a mock event-source harness
  3. Match the existing visual language (MUI primitives, dark/light theme aware)

License

Apache License 2.0 — Copyright 2026 Burtson Labs.

版本与发布记录

@burtson-labs/agent-ui 共发布 77 个版本,首次发布于 2026/06/05;过去 12 个月发布了 77 个版本。

版本发布日期距今
1.0.90latest2026/11/081 天前
1.0.892026/10/2218 天前
1.0.882026/09/261 个月前
1.0.872026/09/261 个月前
1.0.862026/09/251 个月前
1.0.852026/09/221 个月前

关于 @burtson-labs/agent-ui 的常见问题

@burtson-labs/agent-ui 是什么?

UI primitives for the Bandit Agent Framework.

如何安装 @burtson-labs/agent-ui?

在项目目录运行 npm install @burtson-labs/agent-ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18.2.0 <20.0.0)、react-dom(>=18.2.0 <20.0.0)、@mui/material(>=7.0.0)、@emotion/react(>=11.0.0)、@emotion/styled(>=11.0.0)、@mui/icons-material(>=7.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@burtson-labs/agent-ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@burtson-labs/agent-ui 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@burtson-labs/agent-ui 可以商用吗?

@burtson-labs/agent-ui 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@burtson-labs/agent-ui 的下载量有多少?

根据 npm 官方下载统计,@burtson-labs/agent-ui 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,856 次,日均约 62 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@burtson-labs/agent-ui 还在维护吗?

最新版本 1.0.90 发布于 2026/11/08(1 天前);至今共发布 77 个版本,其中过去 12 个月发布了 77 个;首次发布于 2026/06/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。