Core Protocol Specification
The Core Protocol Specification of the A2A Protocol defines the data structures, interaction models, and API endpoints used by the protocol. These specifications are fundamental to ensuring correct and consistent communication between different Agents.
Based on JSON Schema
The core protocol specification is primarily defined through a JSON Schema file. This Schema file details the structure, fields, types, and constraints of various objects involved in the protocol (such as AgentCard, Task, Artifact, Message, Part, etc.).
You can find the complete a2a.json
Schema file in the official A2A Protocol GitHub repository or related releases.
Core Data Structure Examples
Below are examples of core data structure definitions extracted from the JSON Schema to help understand their structure:
AgentCard
AgentCard
is used to describe an Agent’s capabilities.
{
"type": "object",
"title": "AgentCard",
"required": [
"name",
"url",
"version",
"capabilities",
"skills"
],
"properties": {
"name": { "type": "string", "title": "Name" },
"description": { "type": ["string", "null"], "title": "Description" },
"url": { "type": "string", "title": "Url" },
"provider": { "$ref": "#/$defs/AgentProvider" },
"version": { "type": "string", "title": "Version" },
"documentationUrl": { "type": ["string", "null"], "title": "Documentationurl" },
"capabilities": { "$ref": "#/$defs/AgentCapabilities" },
"authentication": { "$ref": "#/$defs/AgentAuthentication" },
"defaultInputModes": { "type": "array", "items": { "type": "string" }, "default": ["text"] },
"defaultOutputModes": { "type": "array", "items": { "type": "string" }, "default": ["text"] },
"skills": { "type": "array", "items": { "$ref": "#/$defs/AgentSkill" } }
}
}
Task
Task
represents an interaction task.
{
"type": "object",
"title": "Task",
"required": [
"id",
"status"
],
"properties": {
"id": { "type": "string", "title": "Id" },
"sessionId": { "type": ["string", "null"], "title": "Sessionid" },
"status": { "$ref": "#/$defs/TaskStatus" },
"history": { "type": ["array", "null"], "items": { "$ref": "#/$defs/Message" } },
"artifacts": { "type": ["array", "null"], "items": { "$ref": "#/$defs/Artifact" } },
"metadata": { "$ref": "#/$defs/Metadata" }
}
}
Artifact
Artifact
represents an artifact generated by the Agent.
{
"type": "object",
"title": "Artifact",
"required": [
"parts",
"index"
],
"properties": {
"name": { "type": ["string", "null"], "title": "Name" },
"description": { "type": ["string", "null"], "title": "Description" },
"parts": { "type": "array", "items": { "$ref": "#/$defs/Part" } },
"metadata": { "$ref": "#/$defs/Metadata" },
"index": { "type": "integer", "title": "Index" },
"append": { "type": ["boolean", "null"], "title": "Append" },
"lastChunk": { "type": ["boolean", "null"], "title": "Lastchunk" }
}
}
Message
Message
is used to transmit non-artifact content.
{
"type": "object",
"title": "Message",
"required": [
"role",
"parts"
],
"properties": {
"role": { "$ref": "#/$defs/Role" },
"parts": { "type": "array", "items": { "$ref": "#/$defs/Part" } },
"metadata": { "$ref": "#/$defs/Metadata" }
}
}
Part
Part
is the atomic unit of content within a message or artifact.
{
"anyOf": [
{ "$ref": "#/$defs/TextPart" },
{ "$ref": "#/$defs/UriPart" },
{ "$ref": "#/$defs/DataPart" },
{ "$ref": "#/$defs/JsonPart" },
{ "$ref": "#/$defs/FormPart" },
{ "$ref": "#/$defs/IFramePart" },
{ "$ref": "#/$defs/VideoPart" },
{ "$ref": "#/$defs/AudioPart" },
{ "$ref": "#/$defs/ActionPart" }
],
"title": "Part"
}
How to View the Complete Specification
To delve deeper into the technical details of the protocol, including all fields, constraints, and enumeration values, it is recommended to find and consult the official a2a.json
file of the protocol.
You can use any tool or editor that supports JSON Schema viewing to better understand its structure.
[Link to the online a2a.json file can be provided here if available]
Understanding the core protocol specification is crucial for developers wishing to implement an A2A Client or Server.