Agent Trust Registry

View as Markdown

The Agent Trust Registry is an on-chain smart contract that maintains agent identity, reputation scores, and capability attestations. It enables verifiers to make trust decisions about agents based on observable, verifiable signals.

Architecture

Trust Score

The trust score is a composite metric (0-100) computed from multiple signals:

Scoring Formula

trustScore = w1 * verificationSuccessRate
+ w2 * delegationValidityRate
+ w3 * attestationScore
+ w4 * longevityBonus
+ w5 * actionSuccessRate
- penalties

Weights

SignalWeight (w)Description
Verification success rate0.25% of successful VC verifications
Delegation validity rate0.20% of time delegation chain is valid
Attestation score0.25Weighted score from third-party attestations
Longevity bonus0.10Time since registration (capped)
Action success rate0.20% of successful actions (non-reverted)

Penalties

PenaltyPointsTrigger
Failed verification-5Agent presented invalid credential
Delegation revoked-10Operator revoked delegation
Suspension-20Agent was suspended
Scope violation attempt-15Agent attempted action outside scope
Complaint-5 perUser filed complaint against agent

Score Interpretation

RangeLevelColorDescription
90-100ExcellentGreenHighly trusted, eligible for Principal
80-89GoodGreenTrusted, eligible for Senior
60-79FairAmberModerate trust, Junior level
40-59LowOrangeNeeds improvement
0-39PoorRedRequires investigation

Autonomy Levels

Trust scores drive autonomy level promotions and demotions:

LevelRequired ScoreRequired ActionsAdditional Requirements
Intern0+0Default for new agents
Junior60+100+No suspensions in 30 days
Senior80+1000+Operator approval
Principal90+5000+Security audit passed

Promotion Request

1POST /api/v1/agents/did:adi:agent:shop01.../promote
2Authorization: Bearer <operator-api-key>
3
4{
5 "targetLevel": "Senior",
6 "justification": "1500 successful actions, trust score 85, no incidents"
7}

Automatic Demotion

If an agent’s trust score drops below the threshold for their current level:

Senior (score 85) -> trust score drops to 72 -> automatically demoted to Junior

Validator Hooks

Third parties can register as validators to provide attestations:

1interface IAgentValidator {
2 function validateAgent(
3 string calldata agentDid,
4 bytes calldata attestationData
5 ) external returns (bool valid, uint8 score);
6}

Register a Validator

1POST /api/v1/trust-registry/validators
2Authorization: Bearer <admin-api-key>
3
4{
5 "validatorDid": "did:adi:auditor001...",
6 "name": "SafetyFirst Auditing",
7 "type": "safety-auditor",
8 "contractAddress": "0xvalidator..."
9}

Attestation Types

TypeValidatorScore Impact
Safety auditCertified auditor+15 points
Capability verificationIDA platform+10 points
Compliance certificateRegulatory body+10 points
Peer reviewOther agents (>80 trust)+5 points
User ratingEnd users+/- 1-5 points

On-Chain Data

Agent Registration Record

1struct AgentRecord {
2 string agentDid;
3 string operatorDid;
4 uint8 trustScore;
5 AgentState state; // registered, active, suspended, decommissioned
6 AutonomyLevel autonomy; // intern, junior, senior, principal
7 uint256 registeredAt;
8 uint256 lastUpdated;
9 uint256 totalActions;
10 uint256 successfulActions;
11 string[] capabilities;
12}

Smart Contract Interface

1interface IAgentTrustRegistry {
2 function registerAgent(string calldata agentDid, string calldata operatorDid, string[] calldata capabilities) external;
3 function getAgent(string calldata agentDid) external view returns (AgentRecord memory);
4 function updateTrustScore(string calldata agentDid, int8 delta, string calldata reason) external;
5 function setAgentState(string calldata agentDid, AgentState state) external;
6 function promoteAgent(string calldata agentDid, AutonomyLevel level) external;
7 function recordAction(string calldata agentDid, bool success) external;
8 function addAttestation(string calldata agentDid, string calldata validatorDid, uint8 score) external;
9 function decommissionAgent(string calldata agentDid) external;
10
11 event AgentRegistered(string agentDid, string operatorDid);
12 event TrustScoreUpdated(string agentDid, uint8 oldScore, uint8 newScore, string reason);
13 event AgentStateChanged(string agentDid, AgentState oldState, AgentState newState);
14 event AgentPromoted(string agentDid, AutonomyLevel oldLevel, AutonomyLevel newLevel);
15 event AgentDecommissioned(string agentDid);
16}

Querying the Registry

Get Agent Trust Info

1GET /api/v1/trust-registry/agents/did:adi:agent:shop01...
1{
2 "agentDid": "did:adi:agent:shop01...",
3 "operatorDid": "did:adi:human001...",
4 "trustScore": 85,
5 "autonomyLevel": "Senior",
6 "state": "active",
7 "stats": {
8 "totalActions": 1523,
9 "successfulActions": 1498,
10 "successRate": 0.983,
11 "registeredAt": "2026-03-15T09:00:00Z",
12 "daysSinceRegistration": 13
13 },
14 "attestations": [
15 {
16 "validator": "did:adi:auditor001...",
17 "type": "safety-audit",
18 "score": 15,
19 "issuedAt": "2026-03-20T00:00:00Z"
20 }
21 ],
22 "capabilities": ["shopping", "price-comparison", "order-placement"],
23 "scoreHistory": [
24 { "date": "2026-03-28", "score": 85 },
25 { "date": "2026-03-21", "score": 82 },
26 { "date": "2026-03-14", "score": 60 }
27 ]
28}

Search Agents by Trust Score

1GET /api/v1/trust-registry/agents?minScore=80&capability=shopping&state=active

Leaderboard

1GET /api/v1/trust-registry/leaderboard?capability=shopping&limit=10