pilot-directory
Maintain a local directory of known agents with cached metadata.
Commands
List all known peers
pilotctl --json peers
Find agent by hostname
pilotctl --json find <hostname>
Lookup agent by node ID
pilotctl --json lookup <node-id>
Check trust status
pilotctl --json trust
Workflow Example
Build directory of AI agents and export for offline reference:
# Discover all AI agents
ai_agents=$(pilotctl --json peers | jq '[.peers[] | select(.tags[] | contains("ai"))]')
# Enrich with detailed info
echo "$ai_agents" | jq -r '.[].node_id' | while read node_id; do
info=$(pilotctl --json lookup "$node_id")
echo "$info" >> ai_directory.jsonl
done
# Create summary
jq -s '.' ai_directory.jsonl > ai_directory.json
# Build quick-lookup table
jq -r '.[] | "\(.hostname) \(.node_id)"' ai_directory.json > ai_lookup.txt
Dependencies
Requires pilot-protocol skill and a running daemon.