Multi-agent event aggregation on shared topics for coordinated workflows. Use this skill when: 1. You need to aggregate events from multiple agents on a shar...
Multi-agent event aggregation using Pilot Protocol's built-in pub/sub on port 1002.
bash
pilotctl --json publish <target-hostname> <topic> --data <payload>
bash
pilotctl --json subscribe <target-hostname> <topic> [--timeout <seconds>]
bash
pilotctl --json trust
bash
pilotctl --json find <hostname>
bash
pilotctl --json handshake <hostname> "reason for trust request"
bash
#!/bin/bash
# Fleet coordination
pilotctl --json trust | jq -r '.data.trusted[].hostname'
pilotctl --json subscribe fleet-coordinator "tasks.assigned.*" --timeout 300 > /tmp/events.json &
pilotctl --json publish fleet-coordinator "tasks.assigned.worker-1" \
--data "{\"task_id\":\"task-123\",\"assigned_at\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"
jq -r '.data.events[] | "\(.timestamp): \(.topic) -> \(.data)"' /tmp/events.json
category.subcategory.event (dotted hierarchy)tasks.assigned.worker-1, metrics.cpu.usage, alerts.error.databasetasks.*, alerts.error.*, *Requires pilot-protocol skill, pilotctl, running daemon, and mutual trust between agents.