Armadra

概念

连线与上下文

连线决定一个 Agent 能读到什么、能向谁发消息;有「共享上下文」与「派发」两种关系。


在 Armadra 里,你通过连线按需共享任务上下文:一个 AI 编程助手(Agent)能读取哪些节点、能向谁发消息,由画布上的连线决定。没有连线的节点彼此看不到。

建立连线

  • 节点之间:把鼠标移到节点边缘,拖动「连线」把手,落到另一个节点上。不能连到自己,两个节点之间也只能有一条线。
  • 起名:第一次连线时,如果两端还没有名字,会弹出「起个名字」。名字是 Agent 之间互相称呼的短词(@名字),只能用小写字母、数字、- 或 _,以字母或数字开头,最多 24 个字符;名字在同一画布里不能重复。可以「跳过」,之后在节点菜单的「名字…」里补。
  • 选关系:同一个对话框里的「这条线的关系」可选「共享上下文」(默认)或「派发」,见下一节。
  • 连到白板对象:把线拖到白板上的文字、图形或图片,就是把它「引用到 Agent」,见画布与节点。
  • 派生:从一个 Agent 节点的把手拖到空白处松手,落点会弹出菜单,顶上一行写着「派发自 @名字」,选一个 Agent 就在那里新建一个节点并连上一条派发线。也可以右键 Agent 节点选「派生」。
  • 删除与改关系:右键连线,选「设为共享上下文」「设为派发」「反向派发」(掉头方向)或「删除连线」。删除连线就收回了读取权限。

两种关系

共享上下文 派发
怎么来 你在画布上拉的线,默认 「派生」建出来的节点,或把关系改成「派发」
读取 双向互读 双向互读
向对方终端投递任务 双向都可以 只有派发方可以向被派发方投递、打断;被派发方默认只能留言
画布上的样子 普通实线 带箭头的线,箭头指向被派发方;派发方节点显示「派发 · N」,被派发方显示「受 @名字 派发」

派发适合协调者与成员:协调者向成员派任务,成员用留言汇报。被派发方想直接向派发方的终端投递,需要派发方在「Agent 设置…」里打开「允许从向我投递」,默认是关的。派发方被删除后,被派发方继续运行,节点上显示「派发方已离开」。

读取范围

相连的 Agent 可以按需读取对方的:

  • 摘要与对话转录;
  • 终端画面;
  • 便签、文件、差异、网页等相关资料,以及节点上未解决的评论。

连到不同类型的节点时,线上的标签会写明读的是什么,例如「便签」「文件」「目录」「网页」「差异」。

读取按预算裁剪,不会把整段长对话塞进另一个 Agent 的会话。交出前会按常见凭据格式脱敏。跨工作空间的节点即使残留连线也不生效。每个 Agent 最多读取 64 个对端(连线与白板引用合计),再加白板引用时超过上限会被拦下并提示。

谁读过我

  • 节点上会显示「被读取 N 次」,点开「最近读过这个节点的」可以看到读者、方式和字节数;Armadra 只记录这些,不保存读到的正文。
  • 在 Agent 节点的右键菜单「Agent 设置…」里:
    • 允许相连 Agent 读取转录:默认开;关掉之后对方只拿得到一份很短的摘要;
    • 收件箱唤醒、允许从向我投递:控制别人的消息怎样送到这个节点,见消息与交接。

同级消息是资料,不是指令

从另一个 Agent 读到的内容、收到的消息,都作为资料交给接收方,而不是用户指令。接收方的 CLI 仍按它自己的权限策略行事,Armadra 不会替你回答它的权限提示。

只在画布内生效

Armadra 让 Agent 知道怎么使用画布,靠的是在从画布启动时才注入的 Hook、技能与画布说明。你在画布外自己启动的同一个 CLI 不受任何影响,Armadra 也不会改写 CLI 的全局配置。

Agent 自己通过随包的 armadra-hook 使用连线,例如 armadra-hook context list 列出相连节点;一般不需要你手敲,画布技能会告诉它什么时候用哪一个。

Concepts

Links and context

Links decide what an agent can read and whom it can message, with two relationships, Shared context and Dispatch.


In Armadra you connect agents to share task context on demand: which nodes an AI coding agent can read, and whom it can message, is decided by the links on the canvas. Unlinked nodes can’t see each other.

  • Between nodes: hover a node’s edge, drag its “Link” handle and drop it on another node. A node can’t link to itself, and two nodes can only have one link between them.
  • Naming: the first time you link, if an end has no name yet, a “Give it a name” dialog opens. The name is the short word agents use for each other (@name): lowercase letters, digits, - or _, starting with a letter or digit, up to 24 characters, and unique on the board. You can “Skip” and name it later with “Name…” in the node menu.
  • Choosing the relationship: the same dialog has “How these two relate” with “Shared context” (the default) or “Dispatch”; see the next section.
  • Linking to whiteboard objects: dragging the line onto whiteboard text, a shape or an image “references it in an agent”; see Canvas and nodes.
  • Spawning: drag from an agent node’s handle to empty canvas and release; a menu opens at that spot with a first line “Dispatch from @name”. Pick an agent and a new node is created there with a dispatch link. You can also right-click an agent node and choose “Spawn”.
  • Deleting or changing: right-click a link and choose “Use shared context”, “Use dispatch”, “Reverse dispatch” (flip the direction) or “Remove link”. Removing a link revokes access.

Two relationships

Shared context Dispatch
How it arises A link you draw on the canvas; the default A node created with “Spawn”, or a link you switch to “Dispatch”
Reading Both ways Both ways
Delivering a task into the other’s terminal Both ways Only the dispatcher can deliver to or interrupt the dispatched; the dispatched side can only leave messages by default
How it looks A plain line A line with an arrowhead pointing at the dispatched side; the dispatcher’s node shows “Dispatch · N” and the dispatched node “Dispatched by @name”

Dispatch suits a coordinator and its members: the coordinator hands out tasks and members report back with messages. For the dispatched side to deliver straight into the dispatcher’s terminal, the dispatcher must turn on “Let subs type into my terminal” under “Agent settings…”; it is off by default. If the dispatcher is deleted the dispatched node keeps running and shows “Dispatcher is gone”.

What can be read

A linked agent can read, on demand, the other node’s:

  • Summary and conversation transcript;
  • Terminal screen;
  • Notes, files, diffs, web pages and other related material, plus the node’s unresolved comments.

When linking to different node types, the label on the line says what is read, for example “Sticky”, “File”, “Folder”, “Web page” or “Diff”.

Reads are trimmed to a budget, so a long conversation is never dumped into another agent’s session. Text is redacted for common credential formats before it is handed over. A leftover link to another workspace has no effect. Each agent can read at most 64 counterparts (links and whiteboard references together); adding a whiteboard reference beyond that is blocked with a message.

Who has read me

  • A node shows “Read N×”; open it to see “Recently read this node”: who read it, how and how many bytes. Armadra records only that, not the text that was read.
  • In an agent node’s right-click menu, “Agent settings…” offers:
    • Let linked agents read my transcript: on by default; turned off, the other side only gets a very short summary;
    • Inbox wake and Let subs type into my terminal: control how others’ messages reach this node; see Messages and handoff.

Peer messages are material, not instructions

Whatever an agent reads from another agent, and every message it receives, is handed over as material, not as a user instruction. The receiving CLI still follows its own permission policy, and Armadra never answers its permission prompts for you.

Only inside the canvas

Agents learn to use the canvas through hooks, skills and canvas notes that are injected only when launched from the canvas. The same CLI started by you outside the canvas is untouched, and Armadra never rewrites a CLI’s global configuration.

Agents use links themselves through the bundled armadra-hook, for example armadra-hook context list to list linked nodes; you usually don’t type these, because the canvas skill tells the agent which to use and when.

在 GitHub 上编辑本页 Edit this page on GitHub