{"openapi":"3.0.3","info":{"title":"A2A Protocol API","description":"API specification for the A2A (Agent-to-Agent) Protocol","version":"1.0.0"},"paths":{"/tasks/send":{"post":{"operationId":"sendTask","summary":"Send a task request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskRequest"}}}},"responses":{"200":{"description":"Task sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSONRPCError"}}}}}}},"/tasks/sendSubscribe":{"post":{"operationId":"sendTaskStreaming","summary":"Send a task request with streaming response","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskStreamingRequest"}}}},"responses":{"200":{"description":"Task sent successfully with streaming response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskStreamingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSONRPCError"}}}}}}},"/tasks/get":{"post":{"operationId":"getTask","summary":"Get task information","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaskRequest"}}}},"responses":{"200":{"description":"Task retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaskResponse"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotFoundError"}}}}}}},"/tasks/cancel":{"post":{"operationId":"cancelTask","summary":"Cancel a running task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTaskRequest"}}}},"responses":{"200":{"description":"Task canceled successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTaskResponse"}}}},"400":{"description":"Task cannot be canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotCancelableError"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotFoundError"}}}}}}},"/tasks/pushNotification/set":{"post":{"operationId":"setTaskPushNotification","summary":"Set push notification for a task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTaskPushNotificationRequest"}}}},"responses":{"200":{"description":"Push notification set successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTaskPushNotificationResponse"}}}},"400":{"description":"Push notification not supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationNotSupportedError"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotFoundError"}}}}}}},"/tasks/pushNotification/get":{"post":{"operationId":"getTaskPushNotification","summary":"Get push notification configuration for a task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaskPushNotificationRequest"}}}},"responses":{"200":{"description":"Push notification configuration retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaskPushNotificationResponse"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotFoundError"}}}}}}},"/tasks/resubscribe":{"post":{"operationId":"resubscribeTask","summary":"Resubscribe to a task's updates","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResubscriptionRequest"}}}},"responses":{"200":{"description":"Resubscribed to task successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTaskStreamingResponse"}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskNotFoundError"}}}}}}}},"components":{"schemas":{"SendTaskRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/send"]},"params":{"$ref":"#/components/schemas/TaskSendParams"}}},"SendTaskResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"SendTaskStreamingRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/sendSubscribe"]},"params":{"$ref":"#/components/schemas/TaskSendParams"}}},"SendTaskStreamingResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/TaskStatusUpdateEvent"},{"$ref":"#/components/schemas/TaskArtifactUpdateEvent"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"GetTaskRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/get"]},"params":{"$ref":"#/components/schemas/TaskQueryParams"}}},"GetTaskResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"CancelTaskRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/cancel"]},"params":{"$ref":"#/components/schemas/TaskIdParams"}}},"CancelTaskResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"SetTaskPushNotificationRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/pushNotification/set"]},"params":{"$ref":"#/components/schemas/TaskPushNotificationConfig"}}},"SetTaskPushNotificationResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/TaskPushNotificationConfig"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"GetTaskPushNotificationRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/pushNotification/get"]},"params":{"$ref":"#/components/schemas/TaskIdParams"}}},"GetTaskPushNotificationResponse":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"result":{"oneOf":[{"$ref":"#/components/schemas/TaskPushNotificationConfig"},{"type":"null"}]},"error":{"oneOf":[{"$ref":"#/components/schemas/JSONRPCError"},{"type":"null"}]}}},"TaskResubscriptionRequest":{"type":"object","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"integer"},{"type":"string"},{"type":"null"}]},"method":{"type":"string","enum":["tasks/resubscribe"]},"params":{"$ref":"#/components/schemas/TaskQueryParams"}}},"AgentCard":{"type":"object","required":["name","url","version","capabilities","skills"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"url":{"type":"string"},"provider":{"oneOf":[{"$ref":"#/components/schemas/AgentProvider"},{"type":"null"}]},"version":{"type":"string"},"documentationUrl":{"type":"string","nullable":true},"capabilities":{"$ref":"#/components/schemas/AgentCapabilities"},"authentication":{"oneOf":[{"$ref":"#/components/schemas/AgentAuthentication"},{"type":"null"}]},"defaultInputModes":{"type":"array","default":["text"],"items":{"type":"string"}},"defaultOutputModes":{"type":"array","default":["text"],"items":{"type":"string"}},"skills":{"type":"array","items":{"$ref":"#/components/schemas/AgentSkill"}}}},"AgentProvider":{"type":"object","required":["organization"],"properties":{"organization":{"type":"string"},"url":{"type":"string","nullable":true}}},"AgentCapabilities":{"type":"object","properties":{"streaming":{"type":"boolean","default":false},"pushNotifications":{"type":"boolean","default":false},"stateTransitionHistory":{"type":"boolean","default":false}}},"AgentAuthentication":{"type":"object","required":["schemes"],"properties":{"schemes":{"type":"array","items":{"type":"string"}},"credentials":{"type":"string","nullable":true}}},"AgentSkill":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"},"nullable":true},"examples":{"type":"array","items":{"type":"string"},"nullable":true},"inputModes":{"type":"array","items":{"type":"string"},"nullable":true},"outputModes":{"type":"array","items":{"type":"string"},"nullable":true}}},"Task":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"sessionId":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/TaskStatus"},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"},"nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"TaskStatus":{"type":"object","required":["state"],"properties":{"state":{"$ref":"#/components/schemas/TaskState"},"message":{"oneOf":[{"$ref":"#/components/schemas/Message"},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time"}}},"TaskState":{"type":"string","enum":["submitted","working","input-required","completed","canceled","failed","unknown"]},"Artifact":{"type":"object","required":["parts"],"properties":{"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}},"index":{"type":"integer","default":0},"append":{"type":"boolean","nullable":true},"lastChunk":{"type":"boolean","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"Part":{"oneOf":[{"$ref":"#/components/schemas/TextPart"},{"$ref":"#/components/schemas/FilePart"},{"$ref":"#/components/schemas/DataPart"}]},"TextPart":{"type":"object","required":["text"],"properties":{"type":{"type":"string","enum":["text"],"default":"text"},"text":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"FilePart":{"type":"object","required":["file"],"properties":{"type":{"type":"string","enum":["file"],"default":"file"},"file":{"$ref":"#/components/schemas/FileContent"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"DataPart":{"type":"object","required":["data"],"properties":{"type":{"type":"string","enum":["data"],"default":"data"},"data":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"FileContent":{"type":"object","description":"Represents the content of a file, either as base64 encoded bytes or a URI. Ensures that either 'bytes' or 'uri' is provided, but not both.","properties":{"name":{"type":"string","nullable":true},"mimeType":{"type":"string","nullable":true},"bytes":{"type":"string","nullable":true},"uri":{"type":"string","nullable":true}}},"Message":{"type":"object","required":["role","parts"],"properties":{"role":{"type":"string","enum":["user","agent"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Part"}},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"TaskSendParams":{"type":"object","required":["id","message"],"properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"message":{"$ref":"#/components/schemas/Message"},"pushNotification":{"oneOf":[{"$ref":"#/components/schemas/PushNotificationConfig"},{"type":"null"}]},"historyLength":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"TaskIdParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"TaskQueryParams":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"historyLength":{"type":"integer","nullable":true},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"PushNotificationConfig":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"token":{"type":"string","nullable":true},"authentication":{"oneOf":[{"$ref":"#/components/schemas/AuthenticationInfo"},{"type":"null"}]}}},"AuthenticationInfo":{"type":"object","required":["schemes"],"properties":{"schemes":{"type":"array","items":{"type":"string"}},"credentials":{"type":"string","nullable":true}},"additionalProperties":true},"TaskPushNotificationConfig":{"type":"object","required":["id","pushNotificationConfig"],"properties":{"id":{"type":"string"},"pushNotificationConfig":{"$ref":"#/components/schemas/PushNotificationConfig"}}},"TaskStatusUpdateEvent":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/TaskStatus"},"final":{"type":"boolean","default":false},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"TaskArtifactUpdateEvent":{"type":"object","required":["id","artifact"],"properties":{"id":{"type":"string"},"artifact":{"$ref":"#/components/schemas/Artifact"},"metadata":{"type":"object","additionalProperties":true,"nullable":true}}},"JSONRPCError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"nullable":true}}},"TaskNotFoundError":{"type":"object","required":["code","message","data"],"properties":{"code":{"type":"integer","enum":[-32001],"default":-32001},"message":{"type":"string","enum":["Task not found"],"default":"Task not found"},"data":{"type":"null"}}},"TaskNotCancelableError":{"type":"object","required":["code","message","data"],"properties":{"code":{"type":"integer","enum":[-32002],"default":-32002},"message":{"type":"string","enum":["Task cannot be canceled"],"default":"Task cannot be canceled"},"data":{"type":"null"}}},"PushNotificationNotSupportedError":{"type":"object","required":["code","message","data"],"properties":{"code":{"type":"integer","enum":[-32003],"default":-32003}}}}}}