Package org.a2aproject.sdk.compat03.grpc
Interface A2AServiceGrpc.AsyncService
- All Known Implementing Classes:
A2AServiceGrpc.A2AServiceImplBase,GrpcHandler_v0_3,QuarkusGrpcHandler_v0_3
- Enclosing class:
- A2AServiceGrpc
public static interface A2AServiceGrpc.AsyncService
A2AService defines the gRPC version of the A2A protocol. This has a slightly different shape than the JSONRPC version to better conform to AIP-127, where appropriate. The nouns are AgentCard, Message, Task and TaskPushNotificationConfig. - Messages are not a standard resource so there is no get/delete/update/list interface, only a send and stream custom methods. - Tasks have a get interface and custom cancel and subscribe methods. - TaskPushNotificationConfig are a resource whose parent is a task. They have get, list and create methods. - AgentCard is a static resource with only a get method. fields are not present as they don't comply with AIP rules, and the optional history_length on the get task method is not present as it also violates AIP-127 and AIP-131.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcancelTask(CancelTaskRequest request, io.grpc.stub.StreamObserver<Task> responseObserver) Cancel a task from the agent.default voidcreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver) Set a push notification config for a task.default voiddeleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Delete a push notification config for a task.default voidgetAgentCard(GetAgentCardRequest request, io.grpc.stub.StreamObserver<AgentCard> responseObserver) GetAgentCard returns the agent card for the agent.default voidgetTask(GetTaskRequest request, io.grpc.stub.StreamObserver<Task> responseObserver) Get the current state of a task from the agent.default voidgetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver) Get a push notification config for a task.default voidlistTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<ListTaskPushNotificationConfigResponse> responseObserver) Get a list of push notifications configured for a task.default voidsendMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<SendMessageResponse> responseObserver) Send a message to the agent.default voidsendStreamingMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver) SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.default voidtaskSubscription(TaskSubscriptionRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver) TaskSubscription is a streaming call that will return a stream of task update events.
-
Method Details
-
sendMessage
default void sendMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<SendMessageResponse> responseObserver) Send a message to the agent. This is a blocking call that will return the task once it is completed, or a LRO if requested.
-
sendStreamingMessage
default void sendStreamingMessage(SendMessageRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver) SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.
-
getTask
Get the current state of a task from the agent.
-
cancelTask
default void cancelTask(CancelTaskRequest request, io.grpc.stub.StreamObserver<Task> responseObserver) Cancel a task from the agent. If supported one should expect no more task updates for the task.
-
taskSubscription
default void taskSubscription(TaskSubscriptionRequest request, io.grpc.stub.StreamObserver<StreamResponse> responseObserver) TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.
-
createTaskPushNotificationConfig
default void createTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver) Set a push notification config for a task.
-
getTaskPushNotificationConfig
default void getTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<TaskPushNotificationConfig> responseObserver) Get a push notification config for a task.
-
listTaskPushNotificationConfig
default void listTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<ListTaskPushNotificationConfigResponse> responseObserver) Get a list of push notifications configured for a task.
-
getAgentCard
default void getAgentCard(GetAgentCardRequest request, io.grpc.stub.StreamObserver<AgentCard> responseObserver) GetAgentCard returns the agent card for the agent.
-
deleteTaskPushNotificationConfig
default void deleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Delete a push notification config for a task.
-