Class A2AClient

java.lang.Object
com.google.adk.a2a.A2AClient

public final class A2AClient extends Object
A thin HTTP client for interacting with an A2A-compliant agent endpoint.

**EXPERIMENTAL:** Subject to change, rename, or removal in any future patch release. Do not use in production code.

  • Constructor Details

    • A2AClient

      public A2AClient(io.a2a.spec.AgentCard agentCard)
    • A2AClient

      public A2AClient(io.a2a.spec.AgentCard agentCard, io.a2a.client.http.A2AHttpClient httpClient, Map<String,String> defaultHeaders)
  • Method Details

    • getAgentCard

      public io.a2a.spec.AgentCard getAgentCard()
    • getUrl

      public String getUrl()
    • sendMessage

      public io.reactivex.rxjava3.core.Flowable<io.a2a.spec.SendMessageResponse> sendMessage(io.a2a.spec.SendMessageRequest request)
      Sends a JSON-RPC message to the remote A2A agent and converts the response into the canonical SendMessageResponse model.
    • extractHostAndPort

      public static @Nullable String extractHostAndPort(String urlString)