mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 23:24:03 +00:00
Runnable end-to-end demonstration of the ADR-159 A2A protocol with
three real rvagent processes routing tasks between each other:
node-cheap on 127.0.0.1:18001 — low cost, slower latency
node-fast on 127.0.0.1:18002 — high cost, fast latency
node-router on 127.0.0.1:18003 — CheapestUnderLatency selector
The orchestrator (src/main.rs) spawns three `rvagent a2a serve`
children with distinct TOML configs, waits for each to print
`listening on <addr>` to stdout, dispatches an `echo` task to the
router, and asserts the response carries
`metadata.ruvector.routed_via.peer_url` showing the task was actually
forwarded — not handled locally on the router.
Run:
cargo run -p a2a-swarm
What it proves vs ADR-159 acceptance tests:
Test 1 (remote ≡ local): real reqwest/HTTP forwarding through the
router; identical response shape from local and remote paths.
Test 2 (constant-size memory transfer): each peer's signed AgentCard
is published; tasks reference RuLakeWitness if used (not exercised
in this demo, but the wire format is shared).
Test 3 (bounded cost): each peer carries an independent GlobalBudget;
router-side budget gates dispatch before peer selection runs.
Measured round-trip ~26ms per task on a laptop. Clean SIGTERM shutdown.
Refs: ADR-159
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| node-cheap.toml | ||
| node-fast.toml | ||
| node-router.toml | ||