Paperclip's Agent Orchestration Stack: How Multi-Agent Teams Track Work, Budgets, and Tool Permissions in Production

本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。

Paperclip’s Agent Orchestration Stack: How Multi-Agent Teams Track Work, Budgets, and Tool Permissions in Production

大多数多智能体框架仅止步于消息传递。Paperclip 将智能体协作视为公司组织架构问题:包含层级、委派规则、预算上限和权限边界。这个开源技术栈(拥有超过 109K 星标,采用 Node.js 服务器 + React UI)将自身定位为个体智能体之上的“公司”层。如果 OpenClaw 是员工,那么 Paperclip 就是集人力资源系统、财务部门和项目管理办公室于一体的综合平台。

Most multi-agent frameworks stop at message passing. Paperclip treats agent coordination as a company org chart problem: hierarchies, delegation rules, budget caps, and permission boundaries. The open-source stack (109K+ stars, Node.js server + React UI) positions itself as “the company” layer above individual agents. If OpenClaw is an employee, Paperclip is the HR system, finance department, and project management office rolled into one.

这一点至关重要,因为生产环境中的智能体团队需要与人类团队相同的运营基础设施。你需要知道是哪个智能体昨天在 API 调用上花费了 47 美元,谁将任务委派给了谁,以及为什么内容生成智能体无法访问你的数据库。Paperclip 为大多数编排工具所忽视的这些问题提供了基础原语。

This matters because production agent teams need the same operational infrastructure as human teams. You need to know which agent spent $47 on API calls yesterday, who delegated a task to whom, and why the content-generation agent can’t access your database. Paperclip exposes primitives for these problems that most orchestration tools ignore.

公司抽象 (The Company Abstraction)

Paperclip 的核心隐喻是组织结构。你将智能体定义为团队成员,为其分配技能、设置预算限额并跟踪其工作历史。系统维护一个组织架构图,用于确定委派路径和升级规则。关键原语包括:智能体配置文件(每个智能体都有模型选择、执行环境和技能集)、目标层级(顶级业务目标分解为任务)、预算跟踪(针对 API 调用、工具使用和计算时间的按智能体成本归因)以及权限边界(智能体从其在组织架构中的位置继承权限)。

The Company Abstraction: Paperclip’s core metaphor is organizational structure. You define agents as team members, assign them skills, set budget limits, and track their work history. The system maintains an org chart that determines delegation paths and escalation rules. Key primitives: Agent profiles (model selection, harness, skill set), Goal hierarchies (business goals decomposed into tasks), Budget tracking (per-agent cost attribution), and Permission boundaries (inherited from org chart position).

架构:Node.js 编排器 + React 仪表板

Paperclip 作为 Node.js 服务器运行,用于管理智能体状态,并提供 React 前端供人类监督。服务器处理任务分配、预算执行和工具权限检查。UI 显示实时智能体活动、成本明细和任务进度。编排器维护一个任务队列,当新目标到达时,它会将其分解为子任务,并根据技能匹配度将其分配给智能体。如果智能体达到预算上限,编排器会暂停其任务并升级给主管智能体(或人类)。

Architecture: Node.js Orchestrator + React Dashboard: Paperclip runs as a Node.js server that manages agent state and a React frontend for human oversight. The server handles task assignment, budget enforcement, and tool permission checks. The UI shows real-time agent activity, cost breakdowns, and task progress. The orchestrator maintains a task queue, decomposing goals into subtasks and assigning them based on skill matches. If an agent hits its budget cap, the orchestrator pauses its tasks and escalates to a supervisor agent (or a human).

任务路由与委派

Paperclip 的任务分配使用技能匹配算法。每个任务声明所需技能,每个智能体声明可用技能。编排器寻找最佳匹配并分配任务。委派规则允许智能体将任务委派给下属,但如果下属的预算上限低于任务的预估成本,则需要明确批准。当智能体无法完成任务时,系统会自动触发升级流程。系统会跟踪完整的委派链,这对于调试和成本归因至关重要。

Task Routing and Delegation: Paperclip’s task assignment uses a skill-matching algorithm. Each task declares required skills, and each agent declares available skills. The orchestrator finds the best match and assigns the task. Delegation rules allow agents to delegate to subordinates, requiring approval if the subordinate’s budget cap is lower than the task’s estimated cost. Escalation happens automatically when an agent can’t complete a task. The system tracks delegation chains, which is vital for debugging and cost attribution.

预算跟踪与成本归因

每一次工具调用、API 请求和计算分钟数都会记录预估成本。Paperclip 按智能体、任务和时间窗口汇总这些成本。预算上限是硬性限制:当智能体耗尽预算时,编排器会暂停其任务。系统支持预算结转(未使用的预算结转到下一周期)和预算池(团队预算共享),这些均作为配置选项而非硬编码策略存在。

Budget Tracking and Cost Attribution: Every tool call, API request, and compute minute gets logged with a cost estimate. Paperclip aggregates these costs per agent, per task, and per time window. Budget caps are hard limits: when an agent exhausts its budget, the orchestrator pauses its tasks. The system supports budget rollover and budget pooling as configuration options rather than hardcoded policies.

权限边界与工具访问

智能体从其组织架构位置继承权限。初级智能体可能只能读取知识库而不能写入,高级智能体可以批准一定金额的费用,而主管则可以访问生产数据库。权限是声明式的,每个工具都会声明其所需的权限。

Permission Boundaries and Tool Access: Agents inherit permissions from their org chart position. A junior agent might only read from the knowledge base, a senior agent can approve expenses, and a supervisor can access production databases. Permissions are declarative, with each tool declaring its required permissions.