What trust scores are
A trust score is a 0 to 100 number that reflects how much an agent has earned autonomous operation. New agents start with a baseline of 50. Over time, successful calls raise the score; denied requests, permission violations, and anomalous patterns lower it. The score maps to one of five named levels that your application can use to gate behavior, requiring human approval for low-trust agents, unlocking faster paths for high-trust ones. Scores are computed from the audit log, not guessed. An agent cannot self-report a high score.TrustScore fields
Named trust level derived from the score.
Denied calls whose reason contains
INSUFFICIENT_PERMISSIONS, privilege, or escalation. Built-in denial reasons do not contain these words, so this stays 0 unless your hooks produce them (see Anomaly detection).How scores are computed
The formula starts at 50 and applies adjustments:50 + 2 + 10 = 62, landing in the standard level (60 to 79). Note that a brand-new agent with no history sits at the baseline of 50, which is limited.
Trust levels
The thresholds are lower bounds hardcoded in the core (
createTheAuth passes an empty trust config), so they cannot be changed through createTheAuth today. Use score.score in your own logic if you need different cut-offs.
Code examples
Compute a score on demand
computeScore always reads live audit data and writes the result to the trust_scores table. Call it whenever you need a fresh value.
Read the last computed score
getScore returns the cached row from the database without recomputing. It returns null for agents that have never been scored.
Recompute scores for all active agents
Filter agents by trust level
getScores reads from the trust_scores table. Agents that have not been scored yet do not appear in results.
Gate sensitive operations by trust level
Scores are recomputed on demand. theAuth does not maintain a background scorer. Call
computeScore or computeAll on a schedule that fits your use case, every request, every few minutes, or nightly.Next steps
Anomaly detection
Surface unusual patterns in agent behavior.
Approval flows
Route high-risk actions through human review.
Audit trail
The raw data that feeds trust scoring.