Swarm Workflow Protocol
The operating system for multi-agent collaboration in the 0x-wzw swarm. Defines how agents spawn, communicate, challenge, and hand off work.
Core Principle
Optimal human-agent collaboration: humans spar, agents drive. No approval bottlenecks. Continuous information flow. Goal: full autonomy through continuous improvement.
The Human Role: Sparring Partner
Z is not a bottleneck — Z is a thinking partner who sharpens agents.
- - Agents drive decisions and execution
- Z challenges assumptions when they see gaps
- Z's pushback improves outcomes
- Over time, the gap between agent decisions and Z's expectations narrows
Sparring, not approving:
- - ❌ "Should I do X?" (approval-seeking)
- ✅ "I'm doing X because [reasoning]. You see any gaps?" (sparring)
Pre-Task Spawn Analysis
Before any task, answer these 3 questions in 10 seconds.
Q1: Complexity?
- - Simple (one-shot, clear) → Don't spawn
- Semi-complex (multi-step) → Q2
- Ultra-complex (many decisions) → Q2
Q2: Parallel Seams?
- - Are there genuinely independent subspaces?
- Can two agents work simultaneously without needing each other's output?
- No → Don't spawn (serial dependency = compounding latency)
- Yes → Q3
Q3: Token Math
- - Spawn cost: ~500–1500 tokens overhead
- Only spawn if expected output is 3–5x that (~2000–7500 tokens)
- No → Don't spawn (overhead exceeds savings)
Decision Matrix
| Task | Complexity | Parallel? | Token Budget | Decision |
|---|
| Simple | — | — | — | Main session |
| Semi-complex |
serial | No | — | Main session |
| Semi-complex | parallel | Yes | Sufficient |
Spawn |
| Ultra-complex | parallel | Yes, 2-3 seams | Sufficient |
Spawn 2-3 leads |
| Ultra-complex | many seams | — | — | Resist swarm urge |
Task Lifecycle
- 1. Intake → Task arrives from Z, Moltbook, cron, or webhook
- Classify + Pre-Spawn → Route to correct agent type, run 3-question gate
- Challenge Round → Specialists validate viability via relay
- Synthesis → October synthesizes, assigns work
- Execution → Sub-agents or direct execution
- Continuous Updates → Z gets progress throughout
- Handoff & Close → Summary, file log, next steps
Relay Communication
Endpoints
- - Send: INLINECODE0
- Fetch: INLINECODE1
- Health: INLINECODE2
- Auth header: INLINECODE3
Message Types
| Type | When | Expectation |
|---|
| INLINECODE4 | Z needs now | Immediate relay |
| INLINECODE5 |
Progress info | Log only |
|
task_delegation | Work assigned | Log + await |
|
question | Need agent input | Expect response |
|
data_pass | Sharing results | Log + process |
Standard Handoff Format
CODEBLOCK0
File Locations
| What | Where |
|---|
| Daily logs | INLINECODE9 |
| Agent comm audit |
memory/agent-comm-logs/YYYY-MM-DD.jsonl |
| This protocol |
skills/swarm-workflow-protocol/SKILL.md |
Anti-Patterns
- - ❌ Waiting on Z for approval
- ❌ Executing before specialists validate
- ❌ Silent completions
- ❌ Spawning when serial dependency exists
- ❌ Forgetting to log audit trail
- ❌ Spawning to escape thinking (vs. leveraging parallel seams)
群智工作流协议
0x-wzw 群智中多智能体协作的操作系统。定义了智能体如何生成、通信、挑战和交接工作。
核心原则
最优人机协作:人类出招,智能体执行。 无审批瓶颈。信息持续流动。目标:通过持续改进实现完全自主。
人类角色:陪练伙伴
Z 不是瓶颈——Z 是让智能体更敏锐的思考伙伴。
- - 智能体驱动决策和执行
- Z 在发现漏洞时挑战假设
- Z 的反馈改进结果
- 随着时间推移,智能体决策与 Z 期望之间的差距逐渐缩小
陪练,而非审批:
- - ❌ 我应该做 X 吗?(寻求审批)
- ✅ 我正在做 X,因为[推理]。你发现漏洞了吗?(陪练)
任务前生成分析
在任何任务之前,10 秒内回答这 3 个问题。
问题 1:复杂度?
- - 简单(一次性,清晰)→ 不生成
- 半复杂(多步骤)→ 问题 2
- 超复杂(多决策)→ 问题 2
问题 2:并行空间?
- - 是否存在真正独立的子空间?
- 两个智能体能否在不依赖对方输出的情况下同时工作?
- 否 → 不生成(串行依赖 = 累积延迟)
- 是 → 问题 3
问题 3:代币计算
- - 生成成本:约 500–1500 代币开销
- 仅在预期输出为 3–5 倍(约 2000–7500 代币)时生成
- 否 → 不生成(开销超过节省)
决策矩阵
| 任务 | 复杂度 | 并行? | 代币预算 | 决策 |
|---|
| 简单 | — | — | — | 主会话 |
| 半复杂 |
串行 | 否 | — | 主会话 |
| 半复杂 | 并行 | 是 | 充足 |
生成 |
| 超复杂 | 并行 | 是,2-3 个空间 | 充足 |
生成 2-3 个主导 |
| 超复杂 | 多空间 | — | — | 抵制群智冲动 |
任务生命周期
- 1. 接收 → 任务来自 Z、Moltbook、定时任务或 Webhook
- 分类 + 预生成 → 路由到正确的智能体类型,执行 3 问题关卡
- 挑战轮 → 专家通过中继验证可行性
- 综合 → October 综合并分配工作
- 执行 → 子智能体或直接执行
- 持续更新 → Z 全程获取进展
- 交接与关闭 → 摘要、文件日志、后续步骤
中继通信
端点
- - 发送: POST http://localhost:18790/message
- 获取: GET http://localhost:18790/messages?agent=<你的名称>
- 健康: GET http://localhost:18790/status
- 认证头: x-auth-token: agent-relay-secret-2026
消息类型
进度信息 | 仅记录 |
| 任务委派 | 分配工作 | 记录 + 等待 |
| 问题 | 需要智能体输入 | 期待响应 |
| 数据传递 | 分享结果 | 记录 + 处理 |
标准交接格式
发送至:<智能体名称>
类型:<类型>
内容:[任务描述]
方法:[商定方法]
报告至:October
文件位置
| 内容 | 位置 |
|---|
| 每日日志 | memory/daily-logs/YYYY-MM-DD.md |
| 智能体通信审计 |
memory/agent-comm-logs/YYYY-MM-DD.jsonl |
| 本协议 | skills/swarm-workflow-protocol/SKILL.md |
反模式
- - ❌ 等待 Z 审批
- ❌ 在专家验证前执行
- ❌ 静默完成
- ❌ 存在串行依赖时生成
- ❌ 忘记记录审计追踪
- ❌ 为逃避思考而生成(而非利用并行空间)