Class SearchKnowledgeAgentAsyncClient
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 Summary
Modifier and TypeMethodDescriptionGets the agent name.Gets the endpoint for the Azure AI Search service.com.azure.core.http.HttpPipelineGets theHttpPipelinepowering this client.Gets the API version.retrieve(KnowledgeAgentRetrievalRequest retrievalRequest, String xMsQuerySourceAuthorization) Asynchronously retrieves relevant data from backing stores.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.
-
Method Details
-
getEndpoint
Gets the endpoint for the Azure AI Search service.- Returns:
- the endpoint value.
-
getAgentName
Gets the agent name.- Returns:
- the agentName value.
-
getServiceVersion
Gets the API version.- Returns:
- the apiVersion value.
-
getHttpPipeline
public com.azure.core.http.HttpPipeline getHttpPipeline()Gets theHttpPipelinepowering 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
Monoemitting 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
Monoemitting the output contract for the retrieval response along withResponse.
-