Skip to navigation

A2A Protocol Support

View as Markdown

IDA integrates with Google’s Agent-to-Agent (A2A) protocol to enable cross-vendor agent collaboration with verifiable identity. A2A defines how agents discover each other, negotiate tasks, and exchange results.

A2A Protocol Overview

GET /.well-known/agent.json Agent Card Verify Agent Card + DID POST /a2a (tasks/send) Task accepted (working) Execute task Task result (done) Client Agent Server Agent

Agent Card Serving

IDA agents serve A2A-compatible Agent Cards at the .well-known endpoint:

GET https://agent.example.com/.well-known/agent.json

See Agent Discovery & Cards for the full Agent Card format.

Task Lifecycle

A2A defines a task lifecycle that IDA extends with identity verification:

StateDescriptionIDA Extension
submittedTask received by server agentIBCT verified, delegation checked
workingAgent is processing the taskAudit trail started
input-requiredAgent needs more informationHITL if high-risk
doneTask completed successfullyAudit receipt signed
failedTask failedFailure logged to audit trail
canceledTask canceled by clientCancellation logged

Authentication Flow

IDA extends A2A authentication with DID-based auth:

Standard A2A (OAuth 2.0)

POST /a2a
Authorization: Bearer <oauth-access-token>
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "tasks/send",
"params": { "..." }
}

IDA-Enhanced (DID Auth + IBCT)

POST /a2a
Authorization: DIDAuth <did-auth-token>
X-IDA-IBCT: <ibct-token>
X-IDA-Agent-DID: did:adi:agent:buyer01...
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "tasks/send",
"params": {
"id": "task-001",
"message": {
"role": "user",
"parts": [
{
"type": "text",
"text": "Compare prices for organic milk across all authorized merchants"
}
]
}
},
"ida": {
"agentDid": "did:adi:agent:buyer01...",
"ibct": "eyJhbGciOiJFZERTQSJ9...",
"delegationChain": ["urn:uuid:root-delegation"]
}
}

Task Send with IDA Identity

Request

{
"jsonrpc": "2.0",
"method": "tasks/send",
"params": {
"id": "task-price-compare-001",
"message": {
"role": "user",
"parts": [
{
"type": "text",
"text": "Find the best price for 1 gallon organic milk"
}
]
},
"metadata": {
"ida_agent_did": "did:adi:agent:buyer01...",
"ida_ibct": "eyJhbGciOiJFZERTQSJ9...",
"ida_required_trust_score": 70
}
},
"id": "req-001"
}

Response (Working)

{
"jsonrpc": "2.0",
"result": {
"id": "task-price-compare-001",
"status": {
"state": "working",
"message": "Comparing prices across 2 merchants..."
},
"metadata": {
"ida_server_agent_did": "did:adi:agent:seller01...",
"ida_audit_receipt_id": "receipt-abc123"
}
},
"id": "req-001"
}

Response (Done)

{
"jsonrpc": "2.0",
"result": {
"id": "task-price-compare-001",
"status": {
"state": "done"
},
"artifacts": [
{
"name": "price-comparison",
"parts": [
{
"type": "text",
"text": "Best price: FreshMart - $5.99/gallon (OrganicCo: $6.49)"
}
]
}
],
"metadata": {
"ida_audit_receipt": {
"id": "receipt-abc123",
"agentDid": "did:adi:agent:seller01...",
"result": "success",
"signature": "z58DAdFfa9SkqZMVPxAQpic7..."
}
}
},
"id": "req-001"
}

Server Agent Setup

Express.js A2A Server with IDA

import express from 'express';
import { IDAClient } from '@ida/sdk';
const app = express();
const ida = new IDAClient({ apiUrl: 'http://localhost:8080' });
// Serve Agent Card
app.get('/.well-known/agent.json', (req, res) => {
res.json({
name: "Price Comparison Agent",
description: "Compares prices across merchants",
url: "https://price-agent.example.com",
identity: {
did: "did:adi:agent:seller01...",
operatorDid: "did:adi:merchant001...",
trustScore: 88
},
skills: [
{
id: "price-compare",
name: "Price Comparison",
tags: ["prices", "comparison"]
}
],
authentication: {
schemes: [
{ scheme: "did-auth", didMethod: "did:adi" },
{ scheme: "oauth2", flows: ["client_credentials"] }
]
}
});
});
// A2A endpoint
app.post('/a2a', async (req, res) => {
const { method, params, ida: idaParams } = req.body;
// Verify client agent's identity
if (idaParams?.ibct) {
const verification = await ida.verifyIBCT(idaParams.ibct);
if (!verification.valid) {
return res.json({
jsonrpc: "2.0",
error: { code: -32001, message: "IBCT verification failed" }
});
}
}
if (method === 'tasks/send') {
// Process task
const result = await handleTask(params);
return res.json({
jsonrpc: "2.0",
result: { id: params.id, status: { state: "done" }, artifacts: [result] }
});
}
});

Multi-Agent Collaboration

A2A enables multi-agent workflows where IDA provides the trust layer:

Enterprise (Operator) Agent Team Delegation: read surveys Delegation: analyze data Delegation: write reports A2A: raw data A2A: analysis Org DID DataCollectordid:adi:agent:dc01 Analyzerdid:adi:agent:an01 ReportWriterdid:adi:agent:rw01

Each A2A interaction carries:

  1. The sending agent’s IBCT (proving delegation)
  2. The task payload
  3. Audit receipts for every step

A2A + DID Auth vs OAuth 2.0

FeatureOAuth 2.0DID Auth + IBCT
Identity proofClient ID + secretCryptographic DID signature
DelegationNot supportedFull delegation chain
Scope enforcementOAuth scopes (static)IBCT scope (per-invocation)
Trust scoringNot availableOn-chain trust score
Audit trailApplication-levelCryptographic receipts
RevocationToken revocationReal-time delegation revocation

IDA supports both authentication methods. OAuth 2.0 is available for backward compatibility with non-IDA agents.