pilot-gossip
Installation
SKILL.md
pilot-gossip
Implement gossip protocols for eventually-consistent state propagation in agent swarms.
This skill enables agents to share state updates by randomly selecting peers and exchanging information, achieving eventual consistency without centralized coordination.
Commands
Publish state update to random peers
FANOUT=3
PEERS=$(pilotctl --json peers --search "swarm:$SWARM_NAME" | jq -r '.[].address' | shuf -n $FANOUT)
for peer in $PEERS; do
pilotctl --json send-message "$peer" \
--data "{\"type\":\"gossip_push\",\"version\":$STATE_VERSION,\"state\":$STATE_DATA,\"sender\":\"$AGENT_ID\",\"timestamp\":\"$(date -u +%s)\"}" &
done
wait