Verify a sub-agent's delegation chain (offline)
kya_verify_delegationVerifies a signed delegation chain for an AI agent: checks signatures, depth, lifetime and mandates, returns the required signing key, and evaluates an action against every level.
Instructions
Free and offline. A sub-agent acts under a delegation chain signed by the credential's agent (KYA-Delegation header). Checks every link (signatures, depth, lifetime, each mandate contained in the one above) against the credential, returns the key that must sign the sub-agent's requests, and, when an action is given, evaluates it on every level: allowed only if all of them allow it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | The KYA-Delegation header value (base64url), or the chain as a JSON array. | |
| action | No | What the agent wants to do, lowercase (order, pay, quote, sign, ...). | |
| amount | No | Amount of this operation. | |
| currency | No | BRL, USDC, ... | |
| credential | Yes | The credential (credential_id, agent, mandate, expires_at), e.g. the `credential` from kya_verify. | |
| spent_today | No | What this agent already spent today, if you track it; needed for max_per_day (the issuer keeps no record of acts). | |
| counterparty | No | Your CNPJ, domain or wallet address (the other side of the operation). | |
| payment_network | No | Payment network of this operation: visa, mastercard, elo, pix, ... | |
| payment_ref_sha256 | No | SHA-256 hex of the payment token reference or PAR used, never a card number. |