> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.adid.dev/llms.txt.
> For full documentation content, see https://docs.adid.dev/llms-full.txt.

# Trust Scoring Data Flow

**Used in:** §6.6 Trust Scores, §11.5 AgentTrustRegistry
**Audience:** Agent Operator, SC Developer
**IA ID:** extra (extends D21)

```mermaid
flowchart LR
  E1["Agent registered"] --> Q
  E2["Successful task / VC issued"] --> Q
  E3["Negative event (revocation, dispute)"] --> Q
  E4["Delegation created"] --> Q
  Q["Event queue (DB + on-chain emit)"] --> Calc["Score calculator (weights + decay)"]
  Calc --> Reg["AgentTrustRegistry.updateScore(did, score)"]
  Reg --> Cache["Off-chain cache (DB, Redis)"]
  Cache --> Portal["Agent Marketplace card / Detail page"]
  Cache --> SDK["AgentOperations.getTrust()"]
```

**Reading guide:** Score is computed off-chain from raw events, then anchored on-chain via `AgentTrustRegistry`. The portal reads from the cache, not the chain, for latency.

***