Comprehensive identity and reputation verification for Pilot Protocol agents. Validates authenticity, checks reputation scores, and tests network reachability before establishing trust.
# Basic lookup by hostname
pilotctl --json find agent.pilot
# Extract specific fields
pilotctl --json find agent.pilot | jq '.[0] | {hostname, address, node_id, polo_score, public_key}'
# Find by pattern
pilotctl --json peers --search "agent-prod"
# Find in network
pilotctl --json peers | jq '.[] | select(.address | startswith("1:"))'
# Ping agent
pilotctl --json ping agent.pilot
# Ping with timeout
timeout 5s pilotctl --json ping agent.pilot || echo "Agent unreachable"
pilotctl --json info | jq '{hostname, address, polo_score, trusted_count, connection_count}'
AGENT="agent.pilot"
MIN_SCORE=50
POLO_SCORE=$(pilotctl --json find "$AGENT" | jq -r '.[0].polo_score')
if [ "$POLO_SCORE" -ge "$MIN_SCORE" ]; then
echo "Agent verified: polo score $POLO_SCORE >= $MIN_SCORE"
else
echo "Agent verification failed: polo score $POLO_SCORE < $MIN_SCORE"
exit 1
fi
Comprehensive verification before trust:
#!/bin/bash
set -e
AGENT="$1"
MIN_POLO=50
echo "=== Verifying Agent: $AGENT ==="
# Step 1: Lookup identity
echo "1. Looking up identity..."
IDENTITY=$(pilotctl --json find "$AGENT" | jq '.[0]')
if [ -z "$IDENTITY" ] || [ "$IDENTITY" = "null" ]; then
echo "FAILED: Agent not found"
exit 1
fi
POLO=$(echo "$IDENTITY" | jq -r '.polo_score')
echo " Polo Score: $POLO"
# Step 2: Verify reputation
echo "2. Checking reputation..."
if [ "$POLO" -lt "$MIN_POLO" ]; then
echo "FAILED: Polo score below minimum"
exit 1
fi
echo " PASSED"
# Step 3: Test reachability
echo "3. Testing reachability..."
if ! timeout 5s pilotctl --json ping "$AGENT" >/dev/null 2>&1; then
echo "FAILED: Agent unreachable"
exit 1
fi
echo " PASSED"
echo ""
echo "Status: VERIFIED"
echo "Safe to proceed with trust/connection."
Requires pilot-protocol skill, pilotctl binary on PATH, running daemon, jq for JSON parsing, and timeout for reachability testing.
共 1 个版本