经 AI Skill Hub 精选评估,ACP组件库 获评「推荐使用」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
提供ACP工作流的UI组件库,实现完整的工作流管理
ACP组件库 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
提供ACP工作流的UI组件库,实现完整的工作流管理
ACP组件库 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g acp-components # 方式二:npx 直接运行(无需安装) npx acp-components --help # 方式三:项目依赖安装 npm install acp-components # 方式四:从源码运行 git clone https://github.com/zvzuola/acp-components cd acp-components npm install npm start
# 命令行使用
acp-components --help
# 基本用法
acp-components [options] <input>
# Node.js 代码中使用
const acp_components = require('acp-components');
const result = await acp_components.run(options);
console.log(result);
# acp-components 配置说明 # 查看配置选项 acp-components --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export ACP_COMPONENTS_CONFIG="/path/to/config.yml"
LoginDialog component, env_var and terminal-based auth methods, and programmatic authenticate/authenticateWithEnv actionsonTerminal handler and useTerminals hook--acp-* design tokens); extensible via data-acp-theme attributeacp subcommand)pnpm install
pnpm add @acp-components/core @acp-components/react
Peer dependencies: react (^18 || ^19), react-dom (^18 || ^19)
```bash
pnpm build
pnpm build:core pnpm build:react
import ReactDOM from 'react-dom/client';
import {
I18nProvider,
AcpProvider,
Workbench,
ProjectOpener,
SessionList,
ChatView,
PermissionDialog,
LoginDialog,
} from '@acp-components/react';
import { useAcpStore } from '@acp-components/react';
function App() {
const activeSessionId = useAcpStore((s) => {
if (!s.activeWorkspaceCwd) return null;
return s.workspaces.get(s.activeWorkspaceCwd)?.activeSessionId ?? null;
});
return (
<I18nProvider>
<AcpProvider
agents={[
{
id: 'main',
name: 'Main Agent',
transport: { type: 'websocket', url: 'ws://127.0.0.1:3100' },
},
]}
theme="dark"
defaultCwd="/path/to/project"
>
<Workbench
sidebar={
<>
<ProjectOpener />
<SessionList />
</>
}
main={<ChatView sessionId={activeSessionId} />}
/>
<PermissionDialog sessionId={activeSessionId} />
<LoginDialog />
</AcpProvider>
</I18nProvider>
);
}
ReactDOM.createRoot(document.getElementById('root')!).render(<App />);
Connect to multiple agents in different modes simultaneously:
<AcpProvider
agents={[
{
id: 'craft',
name: 'Craft Agent',
transport: { type: 'websocket', url: 'ws://127.0.0.1:3100' },
clientCapabilities: { fs: { readTextFile: true, writeTextFile: true } },
},
{
id: 'ask',
name: 'Ask Agent',
transport: { type: 'stdio', command: 'opencode', args: ['acp', '--mode', 'ask'] },
},
]}
theme="dark"
>
<App />
</AcpProvider>
The @acp-components/core package has zero React dependency. You can use it with any framework:
import { acpStore, sessionStore, createAcpProvider, sendPrompt } from '@acp-components/core';
// 1. Create multi-agent provider
const provider = createAcpProvider({
agents: [
{ id: 'main', name: 'Main', transport: { type: 'stdio', command: 'opencode', args: ['acp'] } },
],
});
// 2. Wait for ready
provider.subscribe(() => {
if (provider.ready) {
console.log('All agents connected!');
}
});
// 3. Read from vanilla stores
acpStore.getState().workspaces; // workspace state tree
acpStore.getState().agents; // agent connection statuses
acpStore.subscribe((state) => { }); // watch for changes
// 4. Use actions (need to provide client and agentId)
const client = provider.getClient('main');
await sendPrompt(client!, sessionId, blocks);
// 5. Add/remove agents dynamically
await provider.addAgent({ id: 'analyze', name: 'Analyze', transport: { type: 'websocket', url: 'ws://...' } });
await provider.removeAgent('analyze');

```bash
Each agent in the agents array gets its own transport configuration:
// Stdio — spawn an agent process directly (Electron / Tauri / Node.js desktop)
{
id: 'desktop-agent',
name: 'Desktop',
transport: { type: 'stdio', command: 'opencode', args: ['acp'] },
}
// HTTP — connect via HTTP POST
{
id: 'http-agent',
name: 'HTTP',
transport: { type: 'http', url: 'http://localhost:8080/acp', headers: { 'Authorization': 'Bearer token' } },
}
// WebSocket — connect to a bridge server (browser environments)
{
id: 'ws-agent',
name: 'WebSocket',
transport: { type: 'websocket', url: 'ws://127.0.0.1:3100' },
}
// Custom — provide your own AcpTransport implementation
{
id: 'custom-agent',
name: 'Custom',
transport: { type: 'custom', transport: myCustomTransport },
}
| Variable | Default | Description |
|---|---|---|
ACP_PORT | 3100 | WebSocket server port |
ACP_HOST | 127.0.0.1 | WebSocket server host |
ACP_AGENT | opencode | Agent command to spawn |
ACP_AGENT_ARGS | acp | Arguments passed to the agent |
A universal frontend component library for building AI Agent interfaces based on the Agent Client Protocol (ACP). Designed with a data-layer / UI-layer separation architecture:
@acp-components/core — Framework-agnostic TypeScript module: transport communication, state management, business logic@acp-components/react — React component library: UI rendering and user interactionYou can use the data layer alone to build UI component libraries with Vue, Svelte, or any other frontend framework.
| Package | Description |
|---|---|
| [@acp-components/core](packages/core) | Framework-agnostic: multi-agent transport layer, AcpClient, vanilla Zustand stores (workspace + agent + session), and imperative actions |
| [@acp-components/react](packages/react) | React bindings: context provider, hooks (useSyncExternalStore), and 15+ UI components |
| Component | Description |
|---|---|
AcpProvider | Top-level provider: connects to multiple agents in parallel, manages agent lifecycle, wires session updates to stores, renders a loading spinner until all agents are ready. Props: agents, theme, defaultCwd, onFileRead, onFileWrite, onTerminal |
Workbench | Three-panel layout (sidebar, main, panel) using CSS Grid |
ProjectOpener | Editable workspace directory display with dropdown to switch between active workspaces |
SessionList | Sidebar session list grouped by agent within the active workspace, with create / select / delete actions per agent |
ChatView | Main chat area: groups messages into user/agent rounds, renders plan, usage bar, and config panel. Props: sessionId, onNavigateFile |
MessageBubble | Renders message parts (content blocks, thought blocks, tool calls) with Markdown via react-markdown |
Markdown | Reusable Markdown renderer with syntax-highlighted code blocks and GFM support |
ChatComposer | Text input with slash-command palette integration and send / cancel controls |
StreamingIndicator | Animated typing indicator shown during agent streaming |
ToolCallCard | Displays tool call name, status, input/output, file locations |
ThoughtView | Collapsible view for agent reasoning / thinking content |
PlanView | Displays the agent's plan entries during streaming |
DiffView | Side-by-side diff viewer for file changes |
PermissionDialog | Modal for approving / rejecting tool permission requests |
LoginDialog | Modal for agent authentication: supports env_var and terminal-based auth methods, env var form input, 5-minute timeout |
TerminalView | Embedded terminal output display |
ConnectionStatus | Per-agent connection state indicator with agent name and version |
UsageBar | Token usage progress bar showing context window consumption |
SessionConfigPanel | Dropdown for session configuration options |
CommandPalette | Slash-command palette for available agent commands |
Control how agents create and manage terminals:
<AcpProvider
agents={[...]}
onTerminal={{
create: async (params) => {
// params: { sessionId, command, args?, cwd? }
const proc = spawn(params.command, params.args ?? [], { cwd: params.cwd ?? undefined });
return {
terminalId: generateId(),
getOutput: async () => ({ output: allOutput }),
waitForExit: async () => new Promise((resolve) => proc.on('exit', resolve)),
kill: async () => proc.kill(),
release: async () => {},
onOutputChange: (fn) => proc.stdout.on('data', fn),
onExit: (fn) => proc.on('exit', fn),
};
},
}}
>
Terminal states are accessible via the useTerminals(sessionId) hook and rendered with the TerminalView component.
Control how agents read and write files:
<AcpProvider
agents={[...]}
onFileRead={async (req) => {
const content = await nativeFs.readTextFile(req.path);
return { content };
}}
onFileWrite={async (req) => {
await nativeFs.writeTextFile(req.path, req.content);
return {};
}}
>
高质量的ACP工作流UI组件库,值得使用
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
AI Skill Hub 点评:ACP组件库 的核心功能完整,质量良好。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | acp-components |
| 原始描述 | 开源AI工作流:UI component library for the Agent Client Protocol (ACP), providing a complete s。⭐6 · TypeScript |
| Topics | acptypescriptgui |
| GitHub | https://github.com/zvzuola/acp-components |
| 语言 | TypeScript |
收录时间:2026-05-30 · 更新时间:2026-05-31 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端