What trust scores are
A trust score is a 0–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
The agent this score belongs to.
Numeric value from 0 to 100.
Named trust level derived from the score.
Percentage of all calls that were allowed.
Percentage of all calls that were denied.
Days since the agent was created.
Total authorization calls in the audit log.
Denied calls matching privilege escalation patterns.
ISO timestamp of the most recent denied call.
ISO timestamp of when this score was last computed.
How scores are computed
The formula starts at 50 and applies adjustments:50 + 2 + 10 = 62, landing in the standard band.
Trust levels
| Level | Default threshold | Meaning |
|---|---|---|
untrusted | score < 20 | New or misbehaving. Approve all sensitive actions manually. |
limited | 20 – 39 | Early history. Apply stricter rate limits. |
standard | 40 – 59 | Baseline autonomous operation. |
trusted | 60 – 79 | Established track record. Fewer restrictions warranted. |
elevated | ≥ 95 | Long-running, clean history. Maximum autonomy. |
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. KavachOS 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.