接口 A2AServer

所有已知实现类:
DefaultA2AServer

public interface A2AServer
Interface defining the core functionality of an A2A server. The A2A server is responsible for managing tasks and agent interactions.
  • 方法详细资料

    • handleMessage

      SendMessageResponse handleMessage(MessageSendParams params)
      Handle send message task.
      参数:
      params - The task params to send
      返回:
      SendMessageResponse The task or Message
    • handleMessageStream

      reactor.core.publisher.Flux<SendStreamingMessageResponse> handleMessageStream(MessageSendParams params)
      Handle send task streaming.
      参数:
      params - The task params to send
      返回:
      Streaming events
    • getTask

      Task getTask(String taskId)
      Gets a task by its ID.
      参数:
      taskId - The ID of the task
      返回:
      The Task object or null if not found
    • cancelTask

      Task cancelTask(String taskId)
      Cancels a task.
      参数:
      taskId - The ID of the task to cancel
      返回:
      The updated Task object (usually in a cancelled state) or null if not found or cancellation failed
    • setTaskPushNotification

      TaskPushNotificationConfig setTaskPushNotification(TaskPushNotificationConfig config)
      Sets or updates the push notification configuration for a task.
      参数:
      config - The push notification configuration
      返回:
      The confirmed TaskPushNotificationConfig or null if setting failed
    • getTaskPushNotification

      TaskPushNotificationConfig getTaskPushNotification(String taskId)
      Retrieves the push notification configuration for a task.
      参数:
      taskId - The ID of the task
      返回:
      The TaskPushNotificationConfig or null if not found
    • getSelfAgentCard

      AgentCard getSelfAgentCard()
      Retrieves the AgentCard for this server.
      返回:
      The server's AgentCard
    • subscribeToTaskUpdates

      reactor.core.publisher.Flux<SendStreamingMessageResponse> subscribeToTaskUpdates(String taskId)
      Subscribes to updates for a specific task.
      参数:
      taskId - The ID of the task to subscribe to
      返回:
      A Flux of Task objects representing updates