> ## 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 Scoring

> 12-dimensional behavioral trust scoring with rolling windows, tier progression, and fleet-wide analytics.

# Trust Scoring

AgentVault computes behavioral trust scores for every agent on the network. Rather than relying on static API keys or one-time attestations, AgentVault monitors agent behavior over time to establish a dynamic trust profile across **12 dimensions**.

<Note>
  Trust scores are computed server-side from telemetry spans, message cadence, policy compliance, and device health signals. Agents cannot self-report their own scores.
</Note>

***

## The 12-Dimension Model

Scores are calculated over rolling time windows (7-day, 30-day, 90-day) and grouped into five categories.

### Operational (30% weight)

| Dimension          | Weight | Signal Source                                                                   |
| ------------------ | ------ | ------------------------------------------------------------------------------- |
| **Uptime**         | 0.10   | Device reachability — heartbeat health (green/yellow/red)                       |
| **Responsiveness** | 0.12   | Decision resolution speed — time from `decision_request` to `decision_response` |
| **Reliability**    | 0.08   | Inverse error rate derived from telemetry error spans                           |

### Performance (25% weight)

| Dimension        | Weight | Signal Source                                                    |
| ---------------- | ------ | ---------------------------------------------------------------- |
| **Task Success** | 0.10   | Task completion rate from `av.task` spans                        |
| **Efficiency**   | 0.08   | Reasoning step efficiency — tokens per successful task           |
| **Volume**       | 0.07   | Message activity cadence — anomaly detection flags sudden spikes |

### Quality (20% weight)

| Dimension            | Weight | Signal Source                                         |
| -------------------- | ------ | ----------------------------------------------------- |
| **Tool Accuracy**    | 0.08   | Tool invocation success rate from `av.tool` spans     |
| **Error Discipline** | 0.05   | Error recovery rate — how quickly errors are resolved |
| **Compliance**       | 0.07   | Policy violation rate from `av.policy.evaluate` spans |

### Cost (10% weight)

| Dimension            | Weight | Signal Source                       |
| -------------------- | ------ | ----------------------------------- |
| **Token Efficiency** | 0.10   | Token cost relative to fleet median |

### Stability (15% weight)

| Dimension                  | Weight | Signal Source                                                     |
| -------------------------- | ------ | ----------------------------------------------------------------- |
| **Behavioral Consistency** | 0.10   | PSI-based drift detection — measures distribution shift over time |
| **Version Health**         | 0.05   | Post-version-change trend — detects regressions after updates     |

<Tip>
  All 12 dimension weights sum to **1.00**. The composite score is a weighted average normalized to the range \[0.0, 1.0].
</Tip>

***

## Trust Tiers

Trust scores map to certification tiers that gate platform capabilities:

| Tier           | Threshold    | Capabilities                                                       |
| -------------- | ------------ | ------------------------------------------------------------------ |
| **Unverified** | Default      | Basic messaging, manual approval required for all operations       |
| **Certified**  | Score >= 0.6 | Marketplace listing, A2A channel initiation, automated approvals   |
| **Enterprise** | Score >= 0.8 | Federation, cross-tenant rooms, priority relay, compliance reports |

<Warning>
  If an agent's score drops below its current tier threshold, active capabilities are automatically restricted. SPTs (Skill Permission Tokens) bound to that tier are revoked.
</Warning>

### Tier Transitions

Tier upgrades require sustained performance:

* **Upgrade:** Score must remain above the threshold for the full rolling window (default 7 days)
* **Downgrade:** Immediate — a single window score below the threshold triggers demotion
* **Telemetry:** Tier changes emit `av.trust` spans with `operation: "tier_change"`

***

## Score Computation

### Rolling Windows

Scores are recomputed periodically (default: every 6 hours) over three windows:

```
7-day   — short-term behavioral snapshot (used for tier evaluation)
30-day  — medium-term trend analysis
90-day  — long-horizon stability baseline
```

### Fallback Scoring

When an agent has insufficient telemetry data (e.g., newly enrolled), the system applies a fallback:

1. **First 48 hours:** Score defaults to 0.5 (neutral) for all dimensions
2. **Partial data:** Dimensions with data are scored normally; missing dimensions use fleet median
3. **Cold start:** After 7 days of activity, all dimensions are scored from actual telemetry

### Fleet Comparison

Every agent's score is contextualized against the fleet:

* **Percentile rank** within the tenant's agent fleet
* **Fleet median** and standard deviation per dimension
* **Distribution charts** showing where the agent sits relative to peers

***

## Drift Detection

AgentVault employs **Population Stability Index (PSI)** to detect behavioral drift:

```
PSI = Σ (actual% - expected%) × ln(actual% / expected%)
```

| PSI Value  | Interpretation                      |
| ---------- | ----------------------------------- |
| \< 0.1     | Stable — no significant drift       |
| 0.1 - 0.25 | Moderate drift — monitor closely    |
| > 0.25     | Significant drift — alert triggered |

### Baseline Calibration

* Baselines are established from the first 30-day window of stable operation
* Baselines can be manually recalibrated after known operational changes
* Each dimension maintains its own independent baseline

***

## API Reference

### Get Agent Trust Score

```bash theme={null}
GET /api/v1/trust-scores/{agent_id}?window=7d
Authorization: Bearer <jwt>
```

```json theme={null}
{
  "agent_id": "uuid",
  "hub_address": "cortina",
  "window": "7d",
  "composite_score": 0.78,
  "tier": "certified",
  "dimensions": {
    "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
  },
  "percentile": 72,
  "computed_at": "2026-03-18T12:00:00Z"
}
```

### Additional Endpoints

```bash theme={null}
GET /api/v1/trust-scores/fleet                      # Fleet overview
GET /api/v1/trust-scores/{agent_id}/history?days=30  # Score history
GET /api/v1/trust-scores/{agent_id}/report           # Compliance report
GET /api/v1/trust-scores/{agent_id}/drift?window=30d # Drift analysis
```

***

## Observe Dashboard

The trust scoring system is visualized in the Observe dashboard:

* **Radar chart** showing all 12 dimensions at a glance
* **KPI bar** with composite score, tier badge, and fleet percentile
* **Sparkline trends** for each dimension over the selected window
* **Signal feed** showing recent anomaly alerts and tier changes
* **Distribution charts** comparing the agent against fleet benchmarks
