openapi: 3.2.0 info: title: 'MolTrust A2A: JSON-RPC API' version: '2.5' tags: - name: 'A2A: JSON-RPC' paths: /a2a: post: tags: - 'A2A: JSON-RPC' summary: A2A JSON-RPC endpoint description: 'A2A JSON-RPC 2.0 endpoint. The `method` field selects the operation; `params` must match that method''s schema (see the `oneOf` below). **Supported methods:** - `SendMessage` — Send a message to the agent (returns a Task or response Message). - `SendStreamingMessage` — Send a message and receive a Server-Sent Events stream. - `GetTask` — Fetch a task by ID. - `ListTasks` — List tasks with pagination and filtering. - `CancelTask` — Cancel an in-progress task. - `CreateTaskPushNotificationConfig` — Register a push-notification config on a task. - `GetTaskPushNotificationConfig` — Read a single push-notification config. - `ListTaskPushNotificationConfigs` — List all push-notification configs for a task. - `DeleteTaskPushNotificationConfig` — Delete a push-notification config. - `SubscribeToTask` — Subscribe to task events via Server-Sent Events. - `GetExtendedAgentCard` — Fetch the authenticated extended agent card.' operationId: handle_requests_a2a_post responses: '200': description: Successful Response content: application/json: schema: {} requestBody: description: A2A JSON-RPC 2.0 request required: true content: application/json: schema: $ref: '#/components/schemas/A2ARequest' parameters: - in: header name: A2A-Version required: true schema: type: string enum: - '1.0' example: '1.0' components: schemas: TaskPushNotificationConfig: type: object properties: tenant: type: string id: type: string task_id: type: string url: type: string token: type: string authentication: $ref: '#/components/schemas/AuthenticationInfo' DeleteTaskPushNotificationConfigRequest: type: object properties: tenant: type: string task_id: type: string id: type: string SendMessageRequest: type: object properties: tenant: type: string message: $ref: '#/components/schemas/Message' configuration: $ref: '#/components/schemas/SendMessageConfiguration' metadata: type: object A2ARequest: type: object required: - jsonrpc - method properties: jsonrpc: type: string enum: - '2.0' id: oneOf: - type: string - type: integer - type: 'null' method: type: string enum: - SendMessage - SendStreamingMessage - GetTask - ListTasks - CancelTask - CreateTaskPushNotificationConfig - GetTaskPushNotificationConfig - ListTaskPushNotificationConfigs - DeleteTaskPushNotificationConfig - SubscribeToTask - GetExtendedAgentCard params: oneOf: - $ref: '#/components/schemas/SendMessageRequest' - $ref: '#/components/schemas/GetTaskRequest' - $ref: '#/components/schemas/ListTasksRequest' - $ref: '#/components/schemas/CancelTaskRequest' - $ref: '#/components/schemas/TaskPushNotificationConfig' - $ref: '#/components/schemas/GetTaskPushNotificationConfigRequest' - $ref: '#/components/schemas/ListTaskPushNotificationConfigsRequest' - $ref: '#/components/schemas/DeleteTaskPushNotificationConfigRequest' - $ref: '#/components/schemas/SubscribeToTaskRequest' - $ref: '#/components/schemas/GetExtendedAgentCardRequest' GetTaskPushNotificationConfigRequest: type: object properties: tenant: type: string task_id: type: string id: type: string SendMessageConfiguration: type: object properties: accepted_output_modes: type: array items: type: string task_push_notification_config: $ref: '#/components/schemas/TaskPushNotificationConfig' history_length: type: integer format: int32 return_immediately: type: boolean ListTaskPushNotificationConfigsRequest: type: object properties: tenant: type: string task_id: type: string page_size: type: integer format: int32 page_token: type: string Message: type: object properties: message_id: type: string context_id: type: string task_id: type: string role: type: string enum: - ROLE_UNSPECIFIED - ROLE_USER - ROLE_AGENT parts: type: array items: $ref: '#/components/schemas/Part' metadata: type: object extensions: type: array items: type: string reference_task_ids: type: array items: type: string GetExtendedAgentCardRequest: type: object properties: tenant: type: string AuthenticationInfo: type: object properties: scheme: type: string credentials: type: string Part: allOf: - type: object properties: metadata: type: object filename: type: string media_type: type: string - oneOf: - type: object properties: text: type: string required: - text - type: object properties: raw: type: string format: byte required: - raw - type: object properties: url: type: string required: - url - type: object properties: data: {} required: - data ListTasksRequest: type: object properties: tenant: type: string context_id: type: string status: type: string enum: - TASK_STATE_UNSPECIFIED - TASK_STATE_SUBMITTED - TASK_STATE_WORKING - TASK_STATE_COMPLETED - TASK_STATE_FAILED - TASK_STATE_CANCELED - TASK_STATE_INPUT_REQUIRED - TASK_STATE_REJECTED - TASK_STATE_AUTH_REQUIRED page_size: type: integer format: int32 page_token: type: string history_length: type: integer format: int32 status_timestamp_after: type: string format: date-time include_artifacts: type: boolean GetTaskRequest: type: object properties: tenant: type: string id: type: string history_length: type: integer format: int32 CancelTaskRequest: type: object properties: tenant: type: string id: type: string metadata: type: object SubscribeToTaskRequest: type: object properties: tenant: type: string id: type: string