Attributed, resolvable artifact references for agent handoffs — a ~30-byte token instead of pasted context. MCP-native; the reference layer for the agent-harness world.
$git clone https://github.com/modiqo/waggleInstalls into the current project.
Install waggle by running `git clone https://github.com/modiqo/waggle`, then use it for the current task and follow its documentation at https://github.com/modiqo/waggle.
| 1 | <h1 align="center"> |
| 2 | <img src="docs/assets/logo.svg" width="52" alt="the waggle mark: a figure-eight dance with the waggle run as an arrow" align="center"> waggle |
| 3 | </h1> |
| 4 | |
| 5 | <p align="center"> |
| 6 | <strong>Not a path. Not a URL. A handoff that answers back.</strong> |
| 7 | </p> |
| 8 | |
| 9 | <p align="center"> |
| 10 | Locations are dumb — no per-agent shaping, no receipts, no way to fix them |
| 11 | once sent. waggle's 30-byte <strong>token</strong> resolves into each |
| 12 | agent's own view, <strong>counts every read</strong>, and propagates a |
| 13 | correction to every holder. A path can't do that; a URL needs a server; |
| 14 | this needs neither. |
| 15 | </p> |
| 16 | |
| 17 | <a href="https://trendshift.io/repositories/82635?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-82635" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/82635/weekly?language=Rust" alt="modiqo%2Fwaggle | Trendshift" width="250" height="55"/></a> |
| 18 | |
| 19 | <a href="https://trendshift.io/repositories/82635?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-82635" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/82635/daily?language=Rust" alt="modiqo%2Fwaggle | Trendshift" width="250" height="55"/></a> |
| 20 | |
| 21 | |
| 22 | |
| 23 | <p align="center"> |
| 24 | <a href="#the-problem">The problem</a> · |
| 25 | <a href="#how-it-works">How it works</a> · |
| 26 | <a href="#install">Install</a> · |
| 27 | <a href="#wire-it-into-your-harness">Harness setup</a> · |
| 28 | <a href="#by-file-type">By file type</a> · |
| 29 | <a href="#reach-local--machines--the-edge">Reach</a> · |
| 30 | <a href="#the-tmux-switchboard">Switchboard</a> · |
| 31 | <a href="docs/design/essay.md">The essay</a> · |
| 32 | <a href="paper/">The paper</a> |
| 33 | </p> |
| 34 | |
| 35 | <p align="center"> |
| 36 | <img src="docs/assets/hero.svg" alt="The handoff, before and after: pasting the whole artifact to every subagent, versus handing off a 30-byte token that each consumer resolves into its own projection" width="940"> |
| 37 | </p> |
| 38 | |
| 39 | ## The problem |
| 40 | |
| 41 | We are entering the world of agent harnesses: Claude Code orchestrators |
| 42 | fanning out subagents, Codex sessions delegating in parallel, cross-vendor |
| 43 | agents discovering each other over open protocols. And every one of these |
| 44 | handoffs, today, works the same way: **forward the context and hope.** |
| 45 | |
| 46 | The costs are measured, not hypothetical. Multi-agent systems consume ~15× |
| 47 | the tokens of a chat session — the overhead attributed by the vendor itself |
| 48 | to *"duplicating context across agents… and summarizing results for |
| 49 | handoffs,"* whose one-line summary is **"each handoff loses context."** |
| 50 | Roughly 37% of multi-agent failures trace to exactly this seam. |
| 51 | |
| 52 | Waggle's competitor is not another protocol. It is |
| 53 | `"Here's /tmp/analysis.md. Use it."` — and that instinct is *correct*: a |
| 54 | path is a 30-byte reference, which is exactly the right size for a handoff. |
| 55 | But a raw path has **no attribution** (who made this, from what), **no |
| 56 | adaptation** (the small-context model gets the same 9,000 tokens as the |
| 57 | frontier model), **no lifecycle** (a stale path silently serves wrong data |
| 58 | forever), **no telemetry** (which subagent actually read its input? which |
| 59 | stalled?), and **no reach** (it dies at the machine boundary). |
| 60 | |
| 61 | <p align="center"> |
| 62 | <img src="docs/assets/context.svg" alt="Three context windows compared: a full handoff fills the window with the artifact again; a raw path is cheap but blind; a waggle token stays small and pulls back only budgeted slices through resolve, search, and read" width="940"> |
| 63 | </p> |
| 64 | |
| 65 | Only the *string* enters the consumer's context — the artifact behind it |
| 66 | never travels unless something fetches it. Waggle standardizes that third |
| 67 | pattern and enforces its one hard rule **by type**: the token travels; the |
| 68 | artifact never auto-expands; `resolve`, `read`, and `search` return only the |
| 69 | projection or slice the consumer asked for, under byte budgets. Cheap like a |
| 70 | path — but the reference answers back. |
| 71 | |
| 72 | ## "But my subagents share a filesystem — that's already share-by-reference" |
| 73 | |
| 74 | It is, |