Repository navigation
feat(a2a): behavioural trust score for federated peers — continuous evaluation, instant downgrade on misbehaviour #7358
Copy link
Copy link
Closed
Labels
Description
Problem
autobot-backend/a2a/security.py handles authentication (HMAC signing of Agent Cards) but does not model trust as a continuous variable. Every authenticated peer is treated equivalently — there's no notion that:
- A peer that has succeeded on 100 prior tasks should be granted broader access than one that just authenticated
- A peer that suddenly starts producing malformed/suspicious payloads should have its access throttled before a human investigates
- Discovery information vs full memory access should be gated by accumulated reliability, not a static config
This only matters when AutoBot starts collaborating across trust boundaries (multi-tenant deployments, partner instances, public agent registries). Today's single-tenant deployments don't need it. But once federation is in scope, retrofitting trust scoring is much harder than designing it in.
Proposed change
New module autobot-backend/a2a/trust_score.py:
- Score formula —
trust = 0.4×success_rate + 0.2×uptime + 0.2×threat_score + 0.2×integrity_scoreper peer, computed continuouslysuccess_rate— fraction of tasks completed without retry/error in trailing windowuptime— fraction of expected heartbeats received in trailing windowthreat_score— derived from PII pipeline events (frequent BLOCKs lower it), prompt-injection attempts, schema violationsintegrity_score— derived from card-signature verification failures, replay attempts, TTL violations
- Trust levels —
UNTRUSTED(≤0.3),LIMITED(0.3-0.6),STANDARD(0.6-0.85),TRUSTED(>0.85) - Asymmetric updates — promotion requires sustained good behaviour over a window (e.g. 50 successful tasks); demotion is instant on any threat/integrity violation
- Per-level capability gates —
UNTRUSTEDpeers see discovery info only;LIMITEDcan submit tasks but not query memory;STANDARDcan query memory;TRUSTEDcan be the source of new agent definitions - Persistence — scores in Redis (
a2a:trust:{peer_id}), with periodic snapshot to SQLite for audit
Acceptance criteria
-
trust_score.pywith formula implementation + unit tests for each component - Trust-level enum and per-level capability matrix documented
- Score recomputed on every A2A interaction (success, failure, signature event)
- Demotion path is instant; promotion requires window threshold
- Audit-log entry on every trust-level change
- Integration test: peer with 50 successes promoted to STANDARD; one PII BLOCK event demotes to LIMITED instantly
- At least one production caller gates capabilities by trust level (process: systemic premature-closure pattern — 7+ feature trackers closed before integration (orchestration audit evidence) #6836 gate)
- Snapshots flushed to SQLite for forensic audit
Why P3 (not higher)
- Only relevant when cross-trust-boundary federation is in scope — single-tenant deployments don't benefit
- Should be designed in before federation hardens, but doesn't need to ship before federation does
- Builds on the PII-pipeline issue and the existing security-card flow
Dependencies
- PII pipeline issue (provides
threat_scoreevents) - Existing A2A
security.py(providesintegrity_scoreevents)
Out of scope
- Reputation transfer between AutoBot instances (cross-federation reputation is a much harder problem)
- Adversarial trust attack hardening (Sybil resistance, etc.) — defer until concrete attack model
Reactions are currently unavailable
Activity
mrveiss commentedon May 9, 2026
Depends on #7355 (PII pipeline supplies the
threat_scoreevent stream).alex-pathcourse commentedon May 10, 2026
github-actions commentedon May 26, 2026
PR #8736 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
feat(a2a): continuous behavioural trust scoring for federated peers (…
mrveiss commentedon May 27, 2026
Resolved by PR#8838 (merged to Dev_new_gui). Continuous behavioural trust scoring for federated peers implemented.