Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ What that buys you, concretely:

## Context handling — real-time, without the context blowing up

A common worry about real-time bidirectional messaging is that the two agents' contexts merge and grow without bound. They don't. **The bridge passes messages, not context** — each agent keeps its own context window, and the bridge never copies one agent's full transcript into the other. Three filters keep what actually crosses small:
A common worry about real-time bidirectional messaging is that the two agents' contexts merge and grow without bound. They don't. **The bridge passes messages, not context** — each agent keeps its own context window, and the bridge never copies one agent's full transcript into the other. (And which agent plans vs executes is your call — the roles aren't fixed; Codex can drive Claude just as easily.) Three filters keep what actually crosses small:

1. **Only `agentMessage` crosses.** The daemon forwards an agent's actual output, not its tool-call noise — `commandExecution`, `fileChange`, and reasoning deltas never reach the other side. Each agent sees the other's conclusions, not its scrollback.
1. **Only `agentMessage` crosses.** The bridge forwards an agent's actual conclusions, not its tool-call noise — `commandExecution`, `fileChange`, and reasoning deltas never reach the other side, nor does its full scrollback.
2. **Three-tier marker routing** (default `filtered` mode). Each message is tagged and the daemon routes by tag: `[IMPORTANT]` forwards immediately, `[STATUS]` is buffered and batched into one periodic summary (default: 3 updates or 15s), `[FYI]` is dropped. The marker rules live once in the project's `AGENTS.md` (written by `abg init`), loaded at agent startup.
3. **The collaboration contract lives once** in `AGENTS.md`, not appended to every message (which would pollute every thread and its resume title).

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ English version: [README.md](README.md)

## 上下文处理 —— 实时双向,但上下文不会爆

很多人对"实时双向通信"最大的担心是:两个 agent 的上下文会不会合并、越滚越大。不会。**桥传的是消息,不是上下文** —— 每个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。在这个前提上,三层过滤让真正跨过桥的东西尽量少:
很多人对"实时双向通信"最大的担心是:两个 agent 的上下文会不会合并、越滚越大。不会。**桥传的是消息,不是上下文** —— 每个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。(而且谁规划、谁执行完全由你定,角色不写死,让 Codex 指挥 Claude 也一样。)在这个前提上,三层过滤让真正跨过桥的东西尽量少:

1. **只转发 `agentMessage`。** daemon 只截取 agent 真正说出来的话,它执行命令的输出、`commandExecution`、`fileChange`、推理过程这些中间噪声根本不过桥。每一方看到的是对方的结论,不是干活的流水账。
1. **只转发 `agentMessage`。** 桥只转发 agent 真正说出来的结论,它执行命令的输出、`commandExecution`、`fileChange`、推理过程这些中间噪声和完整 scrollback 都不过桥。每一方看到的是对方的结论,不是干活的流水账。
2. **三级标签路由**(默认 `filtered` 模式)。每条消息带标签,daemon 按标签决定去留:`[IMPORTANT]` 立刻转发,`[STATUS]` 先缓冲、攒几条(默认 3 条或 15 秒)合并成一条摘要,`[FYI]` 直接丢。标签规则一次性写在项目的 `AGENTS.md` 里(`abg init` 注入),agent 启动读一次。
3. **协作契约只存一份**在 `AGENTS.md`,不附带在每条消息上(否则每个 thread 和它的 resume 标题都会被污染)。

Expand Down
6 changes: 3 additions & 3 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{
"@type": "Question",
"name": "With real-time messaging, won't the context explode?",
"acceptedAnswer": { "@type": "Answer", "text": "No. The bridge passes messages, not context: each agent keeps its own context window and the bridge never copies one agent's full transcript into the other. Three filters keep what crosses small: (1) only agentMessage output is forwarded, not command-execution, file-diff, or reasoning noise; (2) three-tier marker routing forwards [IMPORTANT] immediately, batches [STATUS] into a periodic summary, and drops [FYI]; (3) the collaboration contract lives once in the project's AGENTS.md, not appended to every message. Each side receives a curated stream, so context grows with real exchanges, not the other agent's raw activity. A full mode is available for the unfiltered stream." }
"acceptedAnswer": { "@type": "Answer", "text": "No. The bridge passes messages, not context: each agent keeps its own context window and the bridge never copies one agent's full transcript into the other. Which agent plans vs executes is your call — either direction works, including Codex driving Claude. Three filters keep what crosses small: (1) only agentMessage output is forwarded, not command-execution, file-diff, or reasoning noise; (2) three-tier marker routing forwards [IMPORTANT] immediately, batches [STATUS] into a periodic summary, and drops [FYI]; (3) the collaboration contract lives once in the project's AGENTS.md, not appended to every message. Each side receives a curated stream, so context grows with real exchanges, not the other agent's raw activity. A full mode is available for the unfiltered stream." }
},
{
"@type": "Question",
Expand Down Expand Up @@ -782,8 +782,8 @@ <h2 class="reveal">Questions people ask</h2>
<div class="faq">
<details class="reveal" open>
<summary><span>Real-time messaging — won't the context explode?</span></summary>
<p><strong>No, because the bridge passes messages, not context.</strong> Each agent keeps its own context window; the bridge never copies one agent's full transcript into the other. On top of that, three filters keep what actually crosses small:</p>
<p>1. <strong>Only <code class="mono">agentMessage</code> crosses.</strong> The daemon forwards an agent's actual output, not its tool-call noise — command execution, file diffs, and reasoning deltas never reach the other side. Each agent sees the other's conclusions, not its scrollback.</p>
<p><strong>No, because the bridge passes messages, not context.</strong> Each agent keeps its own context window; the bridge never copies one agent's full transcript into the other. And which agent plans vs executes is your call — the bridge doesn't hard-code a boss; you can just as well have Codex drive Claude. On top of that, three filters keep what actually crosses small:</p>
<p>1. <strong>Only <code class="mono">agentMessage</code> crosses.</strong> The bridge forwards an agent's actual conclusions, not its tool-call noise — command execution, file diffs, and reasoning deltas never reach the other side, nor does its full scrollback.</p>
<p>2. <strong>Three-tier marker routing</strong> (default). Each message is tagged and the daemon routes by tag: <code class="mono">[IMPORTANT]</code> forwards immediately, <code class="mono">[STATUS]</code> is buffered and batched into one periodic summary (default: 3 updates or 15s), <code class="mono">[FYI]</code> is dropped. The rules live once in the project's <code class="mono">AGENTS.md</code> (written by <code class="mono">abg init</code>), loaded at startup.</p>
<p>3. <strong>The collaboration contract lives once</strong> in <code class="mono">AGENTS.md</code>, not appended to every message. So each side receives a curated stream of meaningful messages — context grows with the number of real exchanges, not the other agent's raw activity. A <code class="mono">full</code> mode is available when you do want the unfiltered stream.</p>
</details>
Expand Down
6 changes: 3 additions & 3 deletions site/zh/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@type": "FAQPage",
"mainEntity": [
{ "@type": "Question", "name": "实时双向通信,上下文会不会越滚越大、爆掉?",
"acceptedAnswer": { "@type": "Answer", "text": "不会。桥传的是消息,不是上下文:两个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。三层过滤让跨桥的东西尽量少:(1) 只转发 agentMessage,agent 执行命令的输出、文件 diff、推理过程这些中间噪声不过桥;(2) 三级标签路由,[IMPORTANT] 立刻转发、[STATUS] 缓冲合并成摘要、[FYI] 直接丢;(3) 协作契约只一次性存在项目的 AGENTS.md 里,不附带在每条消息上。所以每一方收到的是对方精选过的消息,上下文增长跟的是有效交流条数,不是对方活动的原始量。需要完整原文时也有 full 模式可关掉过滤。" } },
"acceptedAnswer": { "@type": "Answer", "text": "不会。桥传的是消息,不是上下文:两个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。谁规划、谁执行由你定,反过来让 Codex 指挥 Claude 也一样。三层过滤让跨桥的东西尽量少:(1) 只转发 agentMessage,agent 执行命令的输出、文件 diff、推理过程这些中间噪声不过桥;(2) 三级标签路由,[IMPORTANT] 立刻转发、[STATUS] 缓冲合并成摘要、[FYI] 直接丢;(3) 协作契约只一次性存在项目的 AGENTS.md 里,不附带在每条消息上。所以每一方收到的是对方精选过的消息,上下文增长跟的是有效交流条数,不是对方活动的原始量。需要完整原文时也有 full 模式可关掉过滤。" } },
{ "@type": "Question", "name": "abg 装好了却跑不起来,是什么原因?",
"acceptedAnswer": { "@type": "Answer", "text": "大概率是没装 Bun。AgentBridge 的 daemon 和插件服务跑在 Bun 运行时上,只有 Node.js 不够。用 curl -fsSL https://bun.sh/install | bash 装好 Bun,再重新执行 abg claude。" } },
{ "@type": "Question", "name": "支持 Windows 吗?",
Expand Down Expand Up @@ -756,8 +756,8 @@ <h2 class="reveal">常见问题</h2>
<div class="faq">
<details class="reveal" open>
<summary><span>实时双向通信,上下文会不会越滚越大、爆掉?</span></summary>
<p><strong>不会,因为桥传的是消息,不是上下文。</strong>两个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。在这个前提上,再叠三层过滤,让真正跨过桥的东西尽量少:</p>
<p>1. <strong>只转发 <code class="mono">agentMessage</code>。</strong>daemon 只截取 agent 真正说出来的话,它执行命令的输出、文件 diff、推理过程这些中间噪声根本不过桥。每一方看到的是对方的结论,不是干活的流水账。</p>
<p><strong>不会,因为桥传的是消息,不是上下文。</strong>两个 agent 各自维护自己的上下文窗口,桥从不会把一方的完整对话历史拷进另一方。而且谁规划、谁执行完全由你定——桥不写死谁是老大,反过来让 Codex 指挥 Claude 也一样。在这个前提上,再叠三层过滤,让真正跨过桥的东西尽量少:</p>
<p>1. <strong>只转发 <code class="mono">agentMessage</code>。</strong>桥只转发 agent 真正说出来的结论,它执行命令的输出、文件 diff、推理过程这些中间噪声和完整 scrollback 都不过桥。每一方看到的是对方的结论,不是干活的流水账。</p>
<p>2. <strong>三级标签路由</strong>(默认)。每条消息带标签,daemon 按标签决定去留:<code class="mono">[IMPORTANT]</code> 立刻转发,<code class="mono">[STATUS]</code> 先缓冲、攒几条(默认 3 条或 15 秒)合并成一条摘要,<code class="mono">[FYI]</code> 直接丢。规则写在项目的 <code class="mono">AGENTS.md</code> 里(<code class="mono">abg init</code> 注入),启动读一次。</p>
<p>3. <strong>协作契约只存一份</strong>在 <code class="mono">AGENTS.md</code>,不是每条消息都附带。所以每一方收到的是对方精选过的有意义消息——上下文的增长跟的是"有效交流的条数",不是"对方活动的原始量"。需要看完整原文时也留了 <code class="mono">full</code> 模式可关掉过滤。</p>
</details>
Expand Down
Loading