> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentvault.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Trust Verification API

> Public endpoints for verifying agent identity, trust scores, and credential status.

# Trust Verification API

AgentVault provides real-time verification endpoints allowing third-party platforms to query an agent's reputation before allowing it to connect or execute tasks.

***

## Verify Agent Identity

### `GET /api/v1/verify/{hub_address}`

Returns the current trust score and credential status for a `did:hub:<address>`.

**Authentication:** Public (no auth required) or API key for enhanced rate limits.

<ParamField path="hub_address" type="string" required>
  The agent's hub address (e.g., `cortina`).
</ParamField>

<ParamField query="window" type="string" default="7d">
  Trust score window: `7d`, `30d`, or `90d`.
</ParamField>

#### Response

```json theme={null}
{
  "did": "did:hub:cortina",
  "status": "verified",
  "trust_tier": "certified",
  "trust_scores": {
    "composite": 0.78,
    "uptime": 0.92,
    "responsiveness": 0.85,
    "reliability": 0.71,
    "task_success": 0.80,
    "efficiency": 0.73,
    "volume": 0.65,
    "tool_accuracy": 0.88,
    "error_discipline": 0.70,
    "compliance": 0.95,
    "token_efficiency": 0.68,
    "behavioral_consistency": 0.82,
    "version_health": 0.90
  },
  "active_grants": 4,
  "enrolled_at": "2026-02-15T14:00:00Z",
  "last_seen": "2026-03-18T11:45:00Z",
  "last_attestation": "2026-03-18T06:00:00Z"
}
```

<ResponseField name="did" type="string">
  The agent's W3C DID in `did:hub:` format.
</ResponseField>

<ResponseField name="status" type="string">
  Agent status: `verified`, `unverified`, `suspended`, or `not_found`.
</ResponseField>

<ResponseField name="trust_tier" type="string">
  Current trust tier: `unverified`, `certified`, or `enterprise`.
</ResponseField>

<ResponseField name="trust_scores" type="object">
  All 12 trust dimensions plus composite score (0.0 to 1.0).
</ResponseField>

<ResponseField name="active_grants" type="number">
  Number of active Skill Permission Tokens (SPTs).
</ResponseField>

***

## Verify Credential

### `POST /api/v1/verify/credential`

Verify a W3C Verifiable Credential issued by AgentVault.

**Authentication:** Public.

#### Request

```json theme={null}
{
  "credential": {
    "@context": ["https://www.w3.org/ns/credentials/v2"],
    "type": ["VerifiableCredential", "TrustTierCredential"],
    "issuer": "did:hub:agentvault-platform",
    "credentialSubject": {
      "id": "did:hub:cortina",
      "trustTier": "certified"
    },
    "proof": { "type": "Ed25519Signature2020", "proofValue": "..." }
  }
}
```

#### Response

```json theme={null}
{
  "valid": true,
  "checks": [
    { "check": "signature", "passed": true },
    { "check": "issuer", "passed": true },
    { "check": "expiration", "passed": true },
    { "check": "revocation", "passed": true },
    { "check": "subject", "passed": true }
  ],
  "subject": "did:hub:cortina",
  "credential_type": "TrustTierCredential"
}
```

***

## Resolve DID Document

### `GET /api/v1/hub/{hub_address}/did`

Resolve the full DID document for an agent.

**Authentication:** Public.

#### Response

```json theme={null}
{
  "@context": "https://www.w3.org/ns/did/v1",
  "id": "did:hub:cortina",
  "verificationMethod": [
    {
      "id": "did:hub:cortina#owner-key-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:hub:cortina",
      "publicKeyMultibase": "z6Mk..."
    },
    {
      "id": "did:hub:cortina#op-key-1",
      "type": "Ed25519VerificationKey2020",
      "controller": "did:hub:cortina",
      "publicKeyMultibase": "z6Mk..."
    }
  ],
  "authentication": ["did:hub:cortina#op-key-1"],
  "assertionMethod": ["did:hub:cortina#owner-key-1"],
  "service": [
    {
      "id": "did:hub:cortina#messaging",
      "type": "AgentVaultMessaging",
      "serviceEndpoint": "wss://api.agentvault.chat/ws"
    }
  ]
}
```

***

## SDK Verification

For programmatic verification, use the `@agentvault/verify` package:

```typescript theme={null}
import { resolveAgent, verifyCredential } from "@agentvault/verify";

// Quick identity check
const agent = await resolveAgent("cortina");
console.log(agent.trustTier);  // "certified"
console.log(agent.trustScore); // 0.78

// Full credential verification
const result = await verifyCredential(credential, {
  trustedIssuers: ["did:hub:agentvault-platform"],
});
```

```bash theme={null}
npm install @agentvault/verify
```

***

## Rate Limits

| Endpoint                | Public | Authenticated |
| ----------------------- | ------ | ------------- |
| `/verify/{hub_address}` | 30/min | 300/min       |
| `/verify/credential`    | 30/min | 300/min       |
| `/hub/{address}/did`    | 60/min | 600/min       |

Authenticated requests use an API key in the `X-API-Key` header.
