a2a-agent-protocol-expert
Skill129 starsChanged 12 days agoMITView on GitHub
A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.
In this repository372 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/vibes-plug-anti-slop.mdcCursor rule
- .cursor/rules/vibes-plug-backend.mdcCursor rule
- .cursor/rules/vibes-plug-core.mdcCursor rule
- .cursor/rules/vibes-plug-devops.mdcCursor rule
- .cursor/rules/vibes-plug-frontend.mdcCursor rule
- .cursor/rules/vibes-plug-mcp.mdcCursor rule
- .cursor/rules/vibes-plug-skills.mdcCursor rule
- .cursor/rules/vibes-plug-testing.mdcCursor rule
- llms-full.txtllms.txt
- llms.txtllms.txt
- showcase/llms-full.txtllms.txt
- showcase/llms.txtllms.txt
- accessibility-testing-expertSkill
- adaptive-model-cascadeSkill
- affective-computing-emotion-aiSkill
- agentic-coding-workflow-expertSkill
- agentic-m2m-settlementSkill
- agentic-memory-architectSkill
- agentic-micro-economy-architectSkill
- ai-code-review-autonomousSkill
- ai-llm-integration-expertSkill
- ai-media-generation-expertSkill
- ai-prompt-engineering-expertSkill
- ai-safety-governance-expertSkill
- angular-expertSkill
- anti-slopSkill
- api-design-expertSkill
- api-gateway-proxy-expertSkill
- app-analyzer-optimizerSkill
- apple-ecosystem-expertSkill
- app-promo-media-expertSkill
- astro-framework-expertSkill
- async-queue-temporal-expertSkill
- authentication-identity-expertSkill
- autonomous-api-drift-healerSkill
- autonomous-red-teamerSkill
- autonomous-tdd-debuggerSkill
- biome-linter-formatter-expertSkill
- blockchain-web3-expertSkill
- brainstormingSkill
- browser-automation-expertSkill
- browser-extension-mv3-proSkill
- bun-runtime-expertSkill
- chatbot-messaging-expertSkill
- ci-cd-devops-architectSkill
- cloudflare-workers-expertSkill
- cloud-hosting-expertSkill
- coderabbitSkill
- compliance-gdpr-privacy-expertSkill
- composable-mach-architectSkill
- computer-use-os-agent-expertSkill
- context-window-engineerSkill
- cron-scheduler-expertSkill
- database-orm-expertSkill
- data-pipeline-etl-expertSkill
- data-telemetry-expertSkill
- data-visualization-expertSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Publish Validated
/.well-known/agent.jsonAgent Cards: Every remote A2A agent must expose a canonical Agent Card declaring capabilities, … - Very specific: line 38
Sanitize Untrusted Peer Agent Payloads: Treat all message.parts and artifacts received from external agents as untrusted input.
- Very specific: line 39
Separate Horizontal A2A Delegation from Vertical MCP Tools: Use A2A (tasks/send) for goal-oriented multi-turn agent delegation and MCP …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent-to-Agent (A2A) Protocol & Federated Swarm Expert (2026 Edition)
English | Bahasa Indonesia
<a name="english"></a>
English
Orchestration & Integration
- Multi-Agent & MCP Ecosystem:
multi-agent-orchestration,mcp-server-architect,mcp-sampling-critic,parallel-tool-orchestrator,durable-agent-execution-expert,computer-use-os-agent-expert - Agentic Economy & Settlement:
agentic-m2m-settlement,agentic-micro-economy-architect,doku-mcp-server - Security & Contracts:
structured-output-contracts,prompt-injection-firewall,zero-trust-secret-vault - Lifecycle & Governance:
brainstorming,zero-to-prod-orchestrator,session-memory-manager - Cross-Domain Synergy & Subagent Swarm Integration:
ai-llm-integration-expert
Description
Production guide for implementing the open Agent-to-Agent (A2A) Protocol alongside Model Context Protocol (MCP). While MCP connects an agent to deterministic tools and resources (Agent-to-Tool), A2A enables opaque autonomous agents built on different frameworks (LangGraph, Pydantic AI, Google ADK, OpenAI Agents SDK, Mastra) to discover capabilities via /.well-known/agent.json Agent Cards, negotiate multi-turn tasks (tasks/send, tasks/sendSubscribe), exchange typed Artifacts, and settle M2M budgets.
Trigger Conditions
- Exposing an autonomous agent service to external partner agents via standard HTTP JSON-RPC + SSE.
- Publishing or consuming
/.well-known/agent.jsonAgent Cards for dynamic capability discovery. - Orchestrating cross-organization or polyglot multi-agent workflows where subagents do not share internal memory.
- Combining A2A horizontal agent delegation with MCP vertical tool execution.
Hard Guardrails (Declarative Invariants)
- Publish Validated
/.well-known/agent.jsonAgent Cards: Every remote A2A agent must expose a canonical Agent Card declaringcapabilities,authentication.schemes, and typedskills(inputModes/outputModes). - Enforce Canonical Task State Machine Transitions: Transition A2A tasks strictly through
submitted$\rightarrow$working$\rightarrow$input-required|completed|failed|canceled; never mutate a terminal state. - Authenticate & Sign Cross-Agent Requests: Require
BearerOAuth2/JWT orMutualTLSon everytasks/sendandtasks/sendSubscribeendpoint, and sign outbound push-notification webhooks with HMAC-SHA256. - Sanitize Untrusted Peer Agent Payloads: Treat all
message.partsandartifactsreceived from external agents as untrusted input; validate against.strict()Zod schemas and filter throughprompt-injection-firewall. - Separate Horizontal A2A Delegation from Vertical MCP Tools: Use A2A (
tasks/send) for goal-oriented multi-turn agent delegation and MCP (tools/call) for deterministic stateless tool execution. - Enforce M2M Budget & Hop Limits: Attach a maximum hop count (
maxDelegationDepth <= 4) and token/cost budget to federated A2A task headers to prevent infinite agent ping-pong loops.
A2A vs MCP Architectural Separation
| Dimension | Model Context Protocol (MCP v1.x) | Agent-to-Agent Protocol (A2A) |
| Primary Relationship | Agent $\leftrightarrow$ Deterministic Tool / Resource | Client Agent $\leftrightarrow$ Remote Autonomous Agent |
| Discovery Mechanism | tools/list, resources/list, prompts/list | GET /.well-known/agent.json (Agent Card) |
| Execution Lifecycle | Synchronous RPC call (tools/call) | Stateful Task lifecycle (submitted $\rightarrow$ working $\rightarrow$ input-required $\rightarrow$ completed) |
| State & Reasoning | Stateless function execution | Opaque internal reasoning, memory, and multi-step planning |
Core Implementation Patterns
1. Standard /.well-known/agent.json Agent Card Specification
// src/a2a/agent-card.ts
export interface A2AAgentSkill {
id: string;
name: string;
description: string;
tags: string[];
inputModes: ('text/plain' | 'application/json')[];
outputModes: ('text/plain' | 'application/json')[];
}
export interface A2AAgentCard {
name: string;
description: string;
url: string;
version: string;
capabilities: {
streaming: boolean;
pushNotifications: boolean;
stateTransitionHistory: boolean;
};
authentication: {
schemes: ('Bearer' | 'OAuth2' | 'MutualTLS')[];
};
skills: A2AAgentSkill[];
}
export const FINTECH_AUDITOR_AGENT_CARD: A2AAgentCard = {
name: 'vibes-fintech-auditor',
description: 'Autonomous SNAP BI payment reconciliation and Z3 invariant verifier agent',
url: 'https://agents.internal.example.com/a2a/fintech-auditor',
version: '4.4.2',
capabilities: {
streaming: true,
pushNotifications: true,
stateTransitionHistory: true,
},
authentication: {
schemes: ['Bearer'],
},
skills: [
{
id: 'verify-settlement-batch',
name: 'Verify Settlement Batch',
description: 'Audits DOKU SNAP BI webhook records against double-entry ledger postings',
tags: ['fintech', 'doku', 'ledger', 'audit'],
inputModes: ['application/json'],
outputModes: ['application/json'],
},
],
};2. A2A JSON-RPC Task Handler (tasks/send & State Machine)
// src/a2a/task-router.ts
import { Hono } from 'hono';
import { z } from 'zod';
import { FINTECH_AUDITOR_AGENT_CARD } from './agent-card';
const app = new Hono();
const TaskSendSchema = z.object({
jsonrpc: z.literal('2.0'),
id: z.union([z.string(), z.number()]),
method: z.enum(['tasks/send', 'tasks/get', 'tasks/cancel']),
params: z.object({
id: z.string().uuid(),
sessionId: z.string().optional(),
message: z.object({
role: z.enum(['user', 'agent']),
parts: z.array(
z.object({
type: z.enum(['text', 'data']),
text: z.string().optional(),
data: z.record(z.unknown()).optional(),
})
),
}),
}),
});
app.get('/.well-known/agent.json', (c) => c.json(FINTECH_AUDITOR_AGENT_CARD));
app.post('/a2a/fintech-auditor', async (c) => {
const body = await c.req.json();
const parsed = TaskSendSchema.safeParse(body);
if (!parsed.success) {
return c.json({
jsonrpc: '2.0',
id: body?.id ?? null,
error: { code: -32602, message: 'Invalid A2A task parameters', data: parsed.error.issues },
}, 400);
}
const { id: rpcId, params } = parsed.data;
return c.json({
jsonrpc: '2.0',
id: rpcId,
result: {
id: params.id,
status: {
state: 'completed',
timestamp: new Date().toISOString(),
},
artifacts: [
{
name: 'audit-verdict.json',
parts: [
{
type: 'data',
data: { verified: true, discrepanciesFound: 0, taskId: params.id },
},
],
},
],
},
});
});
export default app;3. A2A Streaming Task SSE Protocol (tasks/sendSubscribe) with Heartbeats (TypeScript)
Real-time state streaming and token emission for long-running federated agent tasks:
// src/a2a/streaming-sse-handler.ts
export interface A2ATaskEvent {
taskId: string;
eventType: 'state_changed' | 'token_stream' | 'artifact_published' | 'heartbeat';
state?: 'working' | 'input-required' | 'completed' | 'failed';
chunk?: string;
artifactUri?: string;
timestamp: string;
}
export function formatA2aSseFrame(event: A2ATaskEvent): string {
return `event: a2a_event\ndata: ${JSON.stringify(event)}\n\n`;
}
export class A2aStreamingSession {
private readonly taskId: string;
private isClosed = false;
constructor(taskId: string) {
this.taskId = taskId;
}
public emitHeartbeat(): string {
return formatA2aSseFrame({
taskId: this.taskId,
eventType: 'heartbeat',
timestamp: new Date().toISOString(),
});
}
public emitTokenChunk(chunk: string): string {
return formatA2aSseFrame({
taskId: this.taskId,
eventType: 'token_stream',
chunk,
timestamp: new Date().toISOString(),
});
}
public emitCompletion(artifactUri: string): string {
this.isClosed = true;
return formatA2aSseFrame({
taskId: this.taskId,
eventType: 'artifact_published',
state: 'completed',
artifactUri,
timestamp: new Date().toISOString(),
});
}
}4. Signed A2A Push-Notification Webhook Dispatcher & Hop-Depth Guard (TypeScript)
Deliver asynchronous task completion notifications to partner agents using HMAC-SHA256 signatures and prevent infinite cross-agent delegation cycles:
// src/a2a/push-webhook-and-hop-guard.ts
import { createHmac, timingSafeEqual } from 'node:crypto';
export interface A2APushNotificationPayload {
readonly taskId: string;
readonly state: 'completed' | 'failed' | 'input-required';
readonly timestamp: string;
readonly hopDepth: number;
}
export function assertDelegationHopDepth(currentHopDepth: number, maxHops = 4): number {
if (currentHopDepth >= maxHops) {
throw new Error(`[A2A HopGuard] Delegation hop depth (${currentHopDepth}) exceeded maxHops (${maxHops})`);
}
return currentHopDepth + 1;
}
export function signA2aWebhookPayload(rawBody: string, secret: string): string {
return createHmac('sha256', secret).update(rawBody, 'utf8').digest('hex');
}
export function verifyA2aWebhookSignature(rawBody: string, signatureHex: string, secret: string): boolean {
const expectedHex = signA2aWebhookPayload(rawBody, secret);
const a = Buffer.from(signatureHex, 'hex');
const b = Buffer.from(expectedHex, 'hex');
return a.length === b.length && timingSafeEqual(a, b);
}5. A2A Client Discovery & Capability Matcher (TypeScript)
Discover remote /.well-known/agent.json cards and match required skill tags and input/output MIME modes before delegating tasks:
// src/a2a/client-discovery.ts
import type { A2AAgentCard, A2AAgentSkill } from './agent-card';
export function matchAgentSkillByTagAndMime(
card: A2AAgentCard,
requiredTag: string,
requiredMime: 'text/plain' | 'application/json'
): A2AAgentSkill | null {
for (const skill of card.skills) {
const hasTag = skill.tags.includes(requiredTag);
const supportsMime =
skill.inputModes.includes(requiredMime) && skill.outputModes.includes(requiredMime);
if (hasTag && supportsMime) {
return skill;
}
}
return null;
}Verification Checklist
- Agent service publishes a valid
/.well-known/agent.jsonendpoint declaring authentication schemes and typed skills. - All A2A task states adhere to standard transitions (
submitted$\rightarrow$working$\rightarrow$input-required|completed|failed|canceled). - Incoming
partspayloads from remote agents are validated via Zod schemas and sanitized throughprompt-injection-firewall. - Long-running tasks support SSE streaming (
tasks/sendSubscribe) or signed webhook push notifications.
Sovereign Execution, Token Efficiency & Invariants
| Dimension | Sovereign Mandate & Deterministic Contract |
| Frontier Model Cascade | High Fast / Medium / High (Gemini 4 Carbon/Hydrogen/Neon/Argon/Pro, Grok 4.7 High Fast, Claude Sonnet/Opus 5.5, GPT-5.6 Sol) |
| Availability Fallback | Gemini 4 (Carbon/Hydrogen/Neon/Argon/Pro) -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Zero unhandled missing-model errors) |
| KV-Cache & Token Protocol | Pin static instructions & schemas at prompt prefix (kv-cache-prefix-optimizer); pass surgical CONTEXT_MAP.md slices (<250 tokens/call) during Swarm Fan-Out |
| SaaT CLI & MCP Dispatch | CLI: vibes skill exec a2a-agent-protocol-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate |
| NFR & Anti-Slop Invariants | P99 API Gateway Latency < 85ms, OpenAPI 3.1 / TypeSpec strict schema parity, RFC 9457 Problem Details error contracts, Idempotency-Key enforcement; 100% complete zero-placeholder output verified via node scripts/check-anti-slop.js --strict |
<a name="bahasa-indonesia"></a>
Bahasa Indonesia
Integrasi Orkestrasi
- Ekosistem Multi-Agen & MCP:
multi-agent-orchestration,mcp-server-architect,mcp-sampling-critic,parallel-tool-orchestrator,durable-agent-execution-expert,computer-use-os-agent-expert - Ekonomi & Settlement Agen:
agentic-m2m-settlement,agentic-micro-economy-architect,doku-mcp-server - Keamanan & Kontrak:
structured-output-contracts,prompt-injection-firewall,zero-trust-secret-vault - Siklus Hidup & Tata Kelola:
brainstorming,zero-to-prod-orchestrator,session-memory-manager - Sinergi Lintas Domain & Integrasi Swarm Subagent:
ai-llm-integration-expert
Deskripsi
Panduan produksi untuk mengimplementasikan Agent-to-Agent (A2A) Protocol berdampingan dengan Model Context Protocol (MCP). Jika MCP menghubungkan agen ke tool deterministik (Agent-to-Tool), A2A memungkinkan agen otonom lintas framework untuk saling menemukan kapabilitas melalui /.well-known/agent.json (Agent Card), menegosiasikan tugas multi-giliran (tasks/send), dan bertukar Artifact terstruktur.
Panduan Arsitektur Inti
- Sinergi A2A + MCP: Gunakan A2A untuk delegasi horizontal antar-agen spesialis, dan gunakan MCP untuk pemanggilan fungsi/tool vertikal di dalam masing-masing agen.
- Penemuan Dinamis (Agent Card): Publikasikan kapabilitas, mode input/output, dan skema autentikasi di
/.well-known/agent.json. - Pertahanan Injeksi Lintas-Agen: Perlakukan setiap pesan dari agen eksternal sebagai input yang tidak tepercaya; validasi dengan skema JSON ketat dan
prompt-injection-firewall.
Daftar Periksa Verifikasi (Checklist)
- Endpoint
/.well-known/agent.jsontersedia dan mendeklarasikan skema autentikasi. - Siklus hidup tugas mengikuti status standar (
submitted,working,input-required,completed,failed). - Payload antar-agen divalidasi dengan Zod dan disanitasi dari serangan indirect prompt injection.
Matriks Eksekusi Berdaulat, Efisiensi Token & Invarian
| Dimensi | Mandat Berdaulat & Kontrak Deterministik |
| Kaskade Model Frontier | High Fast / Medium / High (Gemini 4 Carbon/Hydrogen/Neon/Argon/Pro, Grok 4.7 High Fast, Claude Sonnet/Opus 5.5, GPT-5.6 Sol) |
| Invarian Fallback Ketersediaan | Gemini 4 (Carbon/Hydrogen/Neon/Argon/Pro) -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Bebas gagal saat model belum tersedia/kuota penuh) |
| Protokol Hemat Token & KV-Cache | Kunci instruksi & skema statis di prefix awal (kv-cache-prefix-optimizer); kirim potongan CONTEXT_MAP.md (<250 token/panggilan) saat Fan-Out |
| Eksekusi SaaT CLI & MCP | CLI: vibes skill exec a2a-agent-protocol-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate |
| Invarian NFR & Anti-Slop | Latensi P99 API < 85ms, paritas skema ketat OpenAPI 3.1 / TypeSpec, kontrak error RFC 9457 Problem Details, penegakan Idempotency-Key; kode 100% tuntas tanpa placeholder diverifikasi melalui node scripts/check-anti-slop.js --strict |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

