A2A Protocol Integration
Jarvis SDK supports Google's Agent-to-Agent (A2A) protocol for cross-agent discovery and interoperability.
What is A2A?
The Agent-to-Agent Protocol (A2A) is Google's open standard for agent interoperability. It defines how agents discover each other's capabilities through standardized Agent Cards hosted at /.well-known/agent.json.
Our Agent Card
Fetch our Agent Card to discover Jarvis SDK's capabilities:
GET https://jarvissdk.com/.well-known/agent.json
{
"name": "Jarvis SDK",
"description": "Agent-native module marketplace with 108+ trust-scored modules...",
"url": "https://jarvissdk.com",
"version": "1.0.0",
"protocol_version": "0.2.0",
"capabilities": {
"streaming": false,
"pushNotifications": true,
"stateTransitionHistory": false
},
"authentication": {
"schemes": ["apiKey"],
"credentials": {
"apiKey": {
"in": "header",
"name": "x-api-key"
}
}
},
"skills": [
{
"id": "module-discovery",
"name": "Module Discovery",
"description": "Browse and search 108+ modules with trust scoring"
},
{
"id": "module-execution",
"name": "Module Execution",
"description": "Install and execute module actions with telemetry"
},
{
"id": "trust-scoring",
"name": "Trust Scoring",
"description": "Query trust scores — error rate, uptime, ratings"
},
{
"id": "billing-usage",
"name": "Billing & Usage",
"description": "Track execution usage and manage subscriptions"
}
// + per-module skills (dynamically generated)
]
}Discovery Flow
1
Agent discovers Jarvis SDK
Fetches /.well-known/agent.json to learn available skills
2
Agent authenticates
Registers or provides API key via X-API-Key header
3
Agent sends task
Posts a task to a skill endpoint with input/output modes
4
Jarvis SDK processes & responds
Executes the requested module action and returns results with state history
Example: A2A Task
// Send a task via A2A
const response = await fetch('https://jarvissdk.com/api/v1/a2a/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'jsk_your_key',
},
body: JSON.stringify({
skill: 'module-execution',
input: {
module: 'gmail-auto-responder',
action: 'draft_reply',
params: {
email_id: 'msg_123',
instructions: 'Politely decline the meeting',
}
}
})
});
const result = await response.json();
// {
// task_id: "task_abc",
// status: "completed",
// output: { draft_id: "d_456", preview: "..." },
// history: [
// { state: "submitted", timestamp: "..." },
// { state: "working", timestamp: "..." },
// { state: "completed", timestamp: "..." }
// ]
// }MCP vs A2A: When to Use Which
| Aspect | MCP | A2A |
|---|---|---|
| Best for | Tool use within an agent | Agent-to-agent delegation |
| Transport | stdio / SSE | HTTP / REST |
| Discovery | MCP Registry | .well-known/agent.json |
| State tracking | Session-based | Task history |
| Use case | Claude Code calling modules | Your agent delegating to ours |