Class SearchKnowledgeAgentAsyncClient

java.lang.Object
com.azure.search.documents.agents.SearchKnowledgeAgentAsyncClient

public final class SearchKnowledgeAgentAsyncClient extends Object
This class provides an asynchronous client for interacting with Azure AI Search Knowledge Agents, enabling retrieval of knowledge and data from various configured backing stores.

Overview

The SearchKnowledgeAgentAsyncClient exposes asynchronous APIs for sending retrieval requests to a knowledge agent in Azure AI Search. The agent can aggregate and return relevant data from multiple sources, such as Azure AI Search indexes, vector stores, and other knowledge bases configured in your Azure AI Search instance.

Getting Started

Instances of this client are created via the SearchKnowledgeAgentClientBuilder, which supports fluent configuration of credentials, endpoints, agent names, API versions, and other client options. Authentication can be performed using either an API key or Azure Active Directory credentials. The builder allows you to specify all required parameters for your scenario.

Thread Safety

This client is thread-safe and intended to be shared and reused across threads. Client instances are immutable and do not maintain any mutable state.

Additional Information

  • For more information about Azure AI Search Knowledge Agents, see the Azure documentation.
  • For authentication details, see the Azure AI Search security documentation.
  • For Azure SDK for Java guidelines, see the Azure SDK for Java Introduction.
See Also:
  • Method Details

    • getEndpoint

      public String getEndpoint()
      Gets the endpoint for the Azure AI Search service.
      Returns:
      the endpoint value.
    • getAgentName

      public String getAgentName()
      Gets the agent name.
      Returns:
      the agentName value.
    • getServiceVersion

      public SearchServiceVersion getServiceVersion()
      Gets the API version.
      Returns:
      the apiVersion value.
    • getHttpPipeline

      public com.azure.core.http.HttpPipeline getHttpPipeline()
      Gets the HttpPipeline powering this client.
      Returns:
      the pipeline.
    • retrieve

      public Mono<KnowledgeAgentRetrievalResponse> retrieve(KnowledgeAgentRetrievalRequest retrievalRequest, String xMsQuerySourceAuthorization)
      Asynchronously retrieves relevant data from backing stores.
      Parameters:
      retrievalRequest - The retrieval request to process.
      xMsQuerySourceAuthorization - Token identifying the user for which the query is being executed.
      Returns:
      a Mono emitting the output contract for the retrieval response.
    • retrieveWithResponse

      public Mono<com.azure.core.http.rest.Response<KnowledgeAgentRetrievalResponse>> retrieveWithResponse(KnowledgeAgentRetrievalRequest retrievalRequest, String xMsQuerySourceAuthorization)
      Asynchronously retrieves relevant data from backing stores, with a full HTTP response.
      Parameters:
      retrievalRequest - The retrieval request to process.
      xMsQuerySourceAuthorization - Token identifying the user for which the query is being executed.
      Returns:
      a Mono emitting the output contract for the retrieval response along with Response.