Expand description
P2-5: defense against malicious agents.
A4A agents can be impersonated, tampered with, or hostile. This module provides the building blocks to trust only what you should:
- Trust directory —
TrustRegistrymaps agent identities (their cardurl) to the verification key the directory attests, and keeps a revocation list (CRL). Cards are only trusted when they come from a known agent and their signature verifies against the registered key. - Trust chain propagation —
TrustRegistry::verify_chainwalks a delegation path root → … → leaf, verifying every hop was signed by its parent, enforcing a maximum delegation depth and decaying the trust score with each hop (TrustConfig). - Least privilege —
SandboxConfigrestricts an agent’s file/network access and payload size, checked viaSandboxConfig::check.
Signature primitives are the HMAC-SHA256 card signatures shared with the
client (sign_agent_card / verify_card_signature), so a registry and a
client can agree on the same key material.
Structs§
- Sandbox
Config - Least-privilege limits for a delegated agent (P2-5 sandbox).
- Trust
Config - Delegation-depth and trust-decay policy for chain verification.
- Trust
Registry - Trust directory: known agents, a revocation list (CRL), and chain policy.
- Trust
Verification - Result of a successful trust verification.
- Trusted
Agent - An agent the registry trusts, with the key used to verify its card.
Enums§
- Access
Request - A resource access attempt to be checked against a
SandboxConfig. - Security
Error - Error raised when a security check fails.
- Trust
Role - Role of an agent in a trust hierarchy. Drives the base trust score before hop decay is applied.