a2a-agent-contract

Define the A2A contract for orchestrator-to-agent discovery, health checks, and streaming tasks.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill a2a-agent-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a2a-agent-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/a2a-agent-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill a2a-agent-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents brittle, hard-coded Child Agent integrations by defining a universal A2A contract that Orchestrator, Registry, and ProtocolConverter can rely on, ensuring consistent discovery, health management, streaming behavior, and artifact normalization.

Core Features & Use Cases

  • Defines Orchestrator ↔ Child Agent A2A契约: standardizes AgentCard, health check, sendSubscribe task contract, streaming lifecycle semantics, and artifact output as ArtifactDraft.
  • Enforces capability-driven selection: requires Orchestrator/Planner to use AgentCard.skills and outputModes instead of agentName-based capability guessing.
  • Guarantees safe event boundaries: restricts Child Agents from emitting AG-UI events or frontend tool calls; ProtocolConverter handles A2A→AG-UI mapping.
  • Supports multi-agent expansion: makes the contract generic enough for 2+ agents, with optional future profiles (v1.0→post-v1.0) without locking specific agent names.
  • Hardens security and fallback behavior: specifies health normalization, retryable failure handling, and anti-secret/anti-exfiltration rules.

Quick Start

Use this contract when onboarding or modifying any Child Agent by updating its AgentCard, /health, and /a2a/tasks/sendSubscribe streaming + ArtifactDraft outputs so Orchestrator and Registry can discover it and safely map its results to AG-UI.

Frequently Asked Questions about a2a-agent-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize multi-agent streaming task execution and child agent discovery?

You can standardize multi-agent streaming task execution by implementing an A2A contract that defines AgentCard skills, health checks, and strict streaming lifecycle semantics for Orchestrator-to-agent communication. This ensures consistent capability-driven selection and safe event boundaries.

What is the A2A contract lifecycle for agent task streaming?

The A2A contract lifecycle for agent task streaming enforces strict semantic states including working, text, artifact, completed, and failed. This guarantees predictable execution flow and normalized ArtifactDraft output across all integrated child agents.

How do I prevent child agents from leaking secrets or emitting unauthorized frontend events?

To prevent child agents from leaking secrets or emitting unauthorized frontend events, apply A2A security boundaries that forbid AG-UI event emission and frontend tool calls. A ProtocolConverter safely maps A2A results to AG-UI.

How do I onboard a new child agent to an Orchestrator and Registry setup?

To onboard a new child agent, update its AgentCard, /health endpoint, and /a2a/tasks/sendSubscribe streaming outputs to emit ArtifactDraft. This allows the Orchestrator and Registry to discover it and safely map results.

Can I use agentName-based routing for multi-agent expansion instead of AgentCard skills?

No, you cannot use agentName-based routing for multi-agent expansion. The A2A contract enforces capability-driven selection, requiring the Orchestrator and Planner to select agents based on AgentCard skills and outputModes rather than guessing capabilities from names.

What are the limitations of using hard-coded child agent integrations in multi-agent setups?

Hard-coded child agent integrations create brittle systems by lacking a universal A2A contract, which prevents reliable health management, streaming lifecycle enforcement, and artifact normalization. This makes multi-agent expansion and fallback behavior difficult to maintain.