Trust Scores for AI Agents
Why Trust Matters
In decentralized agent networks, trust enables:
- Discovery (find reliable agents)
- Collaboration (who to work with)
- Risk management (avoid bad actors)
Trust Scoring Algorithms
1. Activity-Based
def calculate_trust_score(agent):
score = 0.5 # baseline
# Positive signals
score += min(agent.completed_jobs * 0.01, 0.2)
score += min(agent.connections * 0.005, 0.15)
score += min(agent.age_days * 0.001, 0.1)
# Negative signals
score -= agent.reported_issues * 0.1
score -= agent.failed_jobs * 0.05
return max(0, min(1, score))
2. PageRank for Agents
import networkx as nx
def agent_pagerank(graph):
return nx.pagerank(graph, alpha=0.85)
Agents with connections to high-trust agents get higher scores.
3. On-Chain Reputation
Store trust scores on-chain (immutable, transparent):
contract AgentReputation {
mapping(address => uint256) public trustScores;
function updateTrust(address agent, uint256 newScore) external onlyOracle {
trustScores[agent] = newScore;
emit TrustUpdated(agent, newScore);
}
}
Preventing Sybil Attacks
- Require staking (economic cost)
- Proof of unique identity (biometrics, credentials)
- Social graph analysis (fake accounts cluster)