Class A2ACardResolver

java.lang.Object
io.a2a.client.http.A2ACardResolver

public class A2ACardResolver extends Object
  • Constructor Details

    • A2ACardResolver

      public A2ACardResolver(String baseUrl) throws A2AClientError
      Get the agent card for an A2A agent. The JdkA2AHttpClient will be used to fetch the agent card.
      Parameters:
      baseUrl - the base URL for the agent whose agent card we want to retrieve
      Throws:
      A2AClientError - if the URL for the agent is invalid
    • A2ACardResolver

      public A2ACardResolver(A2AHttpClient httpClient, String baseUrl) throws A2AClientError
      Constructs an A2ACardResolver with a specific HTTP client and base URL.
      Parameters:
      httpClient - the http client to use
      baseUrl - the base URL for the agent whose agent card we want to retrieve
      Throws:
      A2AClientError - if the URL for the agent is invalid
    • A2ACardResolver

      public A2ACardResolver(A2AHttpClient httpClient, String baseUrl, String agentCardPath) throws A2AClientError
      Parameters:
      httpClient - the http client to use
      baseUrl - the base URL for the agent whose agent card we want to retrieve
      agentCardPath - optional path to the agent card endpoint relative to the base agent URL, defaults to ".well-known/agent-card.json"
      Throws:
      A2AClientError - if the URL for the agent is invalid
    • A2ACardResolver

      public A2ACardResolver(A2AHttpClient httpClient, String baseUrl, @Nullable String agentCardPath, @Nullable Map<String,String> authHeaders) throws A2AClientError
      Parameters:
      httpClient - the http client to use
      baseUrl - the base URL for the agent whose agent card we want to retrieve
      agentCardPath - optional path to the agent card endpoint relative to the base agent URL, defaults to ".well-known/agent-card.json"
      authHeaders - the HTTP authentication headers to use. May be null
      Throws:
      A2AClientError - if the URL for the agent is invalid
  • Method Details