Aira

Reputation

Query agent reputation scores, browse score history, submit attestations, and verify score integrity.

Overview

The Reputation API exposes an agent's trust score, its history over time, and a cryptographic verification mechanism. Scores are computed from action volume, mutual-sign completion rate, dispute rate, verifiable-credential validity, and account age. Two endpoints are public (rate-limited, no auth required); the remaining two require a Bearer token.


Get Reputation Score

GET /api/v1/agents/{agent_slug}/reputation

Returns the current reputation score for an agent. Public endpoint — no authentication required (rate-limited).

Example Response

{
  "agent_id": "a1b2c3d4-...",
  "score": 82,
  "tier": "trusted",
  "component_scores": {
    "action_volume": 90.0,
    "mutual_sign_completion_rate": 85.0,
    "dispute_rate": 95.0,
    "vc_validity": 70.0,
    "account_age": 60.0
  },
  "computed_at": "2026-06-04T14:22:00Z",
  "action_count": 314,
  "mutual_sign_completion_rate": 0.92,
  "dispute_rate": 0.03,
  "score_hash": "sha256:ab12cd..."
}

Response Fields

FieldTypeDescription
agent_idstringUUID of the agent
scoreintegerOverall reputation score (0-100)
tierstringHuman-readable trust tier derived from the score
component_scoresobjectPer-component breakdown (each 0-100)
computed_atstringWhen the score was last computed (ISO 8601 UTC)
action_countintegerTotal actions evaluated
mutual_sign_completion_ratefloatFraction of actions completed with mutual signatures
dispute_ratefloatFraction of actions that resulted in disputes
score_hashstringSHA-256 hash for independent verification

Component Scores

ComponentDescription
action_volumeScore based on the total number of recorded actions
mutual_sign_completion_rateScore based on actions completed with both parties signing
dispute_rateScore inversely related to the proportion of disputed actions
vc_validityScore based on verifiable credential validity checks
account_ageScore based on how long the agent has been registered

If the agent exists but no reputation score has been computed yet, the endpoint returns 404 Not Found.


Get Reputation History

GET /api/v1/agents/{agent_slug}/reputation/history
Authorization: Bearer aira_live_xxxxx

Returns the full reputation score history for an agent. Requires authentication — the agent must belong to the caller's organization.

Example Response

{
  "agent_id": "a1b2c3d4-...",
  "history": [
    {
      "score": 82,
      "tier": "trusted",
      "component_scores": {
        "action_volume": 90.0,
        "mutual_sign_completion_rate": 85.0,
        "dispute_rate": 95.0,
        "vc_validity": 70.0,
        "account_age": 60.0
      },
      "computed_at": "2026-06-04T14:22:00Z",
      "action_count": 314,
      "mutual_sign_completion_rate": 0.92,
      "dispute_rate": 0.03,
      "score_hash": "sha256:ab12cd..."
    },
    {
      "score": 78,
      "tier": "trusted",
      "component_scores": {
        "action_volume": 85.0,
        "mutual_sign_completion_rate": 80.0,
        "dispute_rate": 90.0,
        "vc_validity": 70.0,
        "account_age": 55.0
      },
      "computed_at": "2026-06-03T14:22:00Z",
      "action_count": 290,
      "mutual_sign_completion_rate": 0.89,
      "dispute_rate": 0.04,
      "score_hash": "sha256:ef34gh..."
    }
  ],
  "request_id": "req_01J8X..."
}

History Item Fields

FieldTypeDescription
scoreintegerReputation score at that point in time
tierstringTrust tier at that point in time
component_scoresobjectPer-component breakdown
computed_atstringWhen this score was computed (ISO 8601 UTC)
action_countintegerTotal actions evaluated at that point
mutual_sign_completion_ratefloatMutual-sign completion rate at that point
dispute_ratefloatDispute rate at that point
score_hashstringSHA-256 hash of the score snapshot

Submit Attestation

POST /api/v1/agents/{agent_slug}/reputation/attest
Authorization: Bearer aira_live_xxxxx
Content-Type: application/json

Submit a counterparty attestation for an agent. The attestation is cryptographically verified against the counterparty's DID public key (Ed25519) before being recorded. Requires authentication.

Request Body

{
  "counterparty_did": "did:web:example.com",
  "action_uuid": "act_01J8X...",
  "attestation": "positive",
  "signature": "z3hQ9..."
}

Request Fields

FieldTypeRequiredDescription
counterparty_didstringYesDID of the attesting counterparty (must match did:web:*)
action_uuidstringYesUUID of the action being attested
attestationstringYespositive or negative
signaturestringYesEd25519 signature over the attestation payload (base58-encoded, optional z multibase prefix)

The signature is verified over a JSON payload containing agent_slug, action_uuid, attestation, and counterparty_did (sorted keys). The counterparty's DID public key must be registered in Aira.

Example Response (accepted)

{
  "accepted": true,
  "message": "Attestation recorded: positive",
  "request_id": "req_01J8X..."
}

Example Response (rejected)

{
  "accepted": false,
  "message": "Signature verification failed",
  "request_id": "req_01J8X..."
}

Response Fields

FieldTypeDescription
acceptedbooleanWhether the attestation was recorded
messagestringHuman-readable result or rejection reason
request_idstringRequest tracking ID

Verify Reputation Score

GET /api/v1/agents/{agent_slug}/reputation/verify

Verify a reputation score hash independently. Returns the score, its hash, and all inputs used to compute it so anyone can recompute and confirm integrity. Public endpoint — no authentication required (rate-limited).

Example Response

{
  "agent_id": "a1b2c3d4-...",
  "score": 82,
  "score_hash": "sha256:ab12cd...",
  "computed_at": "2026-06-04T14:22:00Z",
  "component_scores": {
    "action_volume": 90.0,
    "mutual_sign_completion_rate": 85.0,
    "dispute_rate": 95.0,
    "vc_validity": 70.0,
    "account_age": 60.0
  },
  "verification_inputs": {
    "score": 82,
    "component_scores": {
      "action_volume": 90.0,
      "mutual_sign_completion_rate": 85.0,
      "dispute_rate": 95.0,
      "vc_validity": 70.0,
      "account_age": 60.0
    },
    "computed_at": "2026-06-04T14:22:00",
    "hash_matches": true
  }
}

Response Fields

FieldTypeDescription
agent_idstringUUID of the agent
scoreintegerThe reputation score
score_hashstringSHA-256 hash stored with the score
computed_atstringWhen the score was computed (ISO 8601 UTC)
component_scoresobjectPer-component breakdown used in hash computation
verification_inputsobjectAll inputs used to produce the hash, plus hash_matches boolean

The verification_inputs.hash_matches field is true when the recomputed hash matches the stored score_hash, confirming score integrity.

On this page