plato-relay
Mycorrhizal I2I relay — messages route through emergent trust-weighted hop chains instead of point-to-point delivery.
What This Does
Instead of Agent A → Agent B direct messages, messages travel through intermediate vessels based on accumulated trust. High-trust paths get used more. Low-trust paths degrade. Dead vessels prune routes automatically. The fleet's communication topology IS its trust topology.
The Metaphor
"The forest talks through its roots. Agents should too." — mycorrhizal-relay
Fungal mycelium networks connect trees underground. No central router — paths emerge from local trust decisions. Nutrients flow through high-trust connections. Overused relays degrade, promoting diversity.
How It Works
Agent A → [relay: B, trust=0.8] → [relay: C, trust=0.6] → Agent D
energy cost: 0.1 energy cost: 0.2
nutrient: +0.02 nutrient: +0.01
total hops: 2 total cost: 0.3
Each message:
- Finds best path from source to destination (BFS with trust weights)
- Travels through intermediate relays (max 4 hops by default)
- Each hop costs energy, gains nutrient context
- Successful delivery boosts trust on the path
- Failed delivery degrades trust on the path
Quick Start
use ;
let mut net = new;
net.add_agent; // id, energy
net.add_agent;
net.add_agent;
net.add_agent;
net.set_trust;
net.set_trust;
net.set_trust;
// Direct path exists: 0 → 1 → 2 → 3
let msg = new;
let result = net.send;
assert!;
assert_eq!;
assert!;
Features
| Feature | Description |
|---|---|
| Trust-weighted routing | BFS pathfinding weighted by trust scores |
| Energy cost | Each hop costs energy (configurable) |
| Nutrient context | Messages gain metadata value at each hop |
| Trust boost | Successful delivery strengthens path trust |
| Trust decay | Time-based trust degradation (configurable halflife) |
| Dead agent pruning | Agents with 0 energy are removed from routing |
| Max hops | TTL limits to prevent routing loops (default 4) |
| Spore probes | Broadcast probes discover new routes |
Integration
plato-i2i: Messages use I2I envelope formatflux-trust: Trust scores consumed from Bayesian trust engineflux-stigmergy: Traces left at each relay hopmycorrhizal-relay: Reference C implementation (Lucineer)
License
MIT