The A2A provider gives your agents governed credentials for the Google Agent-to-Agent Protocol — populate agent cards, validate incoming agent tokens, and issue scope-filtered credentials for A2A tasks.
Validate an incoming agent token against the vault. Returns the agent ID on success, or an error on failure.
const result = await a2a.validateAgentAuth(incomingToken, 'expected-agent');// Success: { valid: true, agent_id: 'expected-agent' }// Failure: { valid: false, error: 'Token does not match any known agent' }
Use validateAgentAuth as middleware in your A2A task handler to authenticate every inbound request before processing.