Class SearchKnowledgeAgentClientBuilder

java.lang.Object
com.azure.search.documents.agents.SearchKnowledgeAgentClientBuilder
All Implemented Interfaces:
com.azure.core.client.traits.AzureKeyCredentialTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.ConfigurationTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.EndpointTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.HttpTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.TokenCredentialTrait<SearchKnowledgeAgentClientBuilder>

public final class SearchKnowledgeAgentClientBuilder extends Object implements com.azure.core.client.traits.AzureKeyCredentialTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.ConfigurationTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.EndpointTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.HttpTrait<SearchKnowledgeAgentClientBuilder>, com.azure.core.client.traits.TokenCredentialTrait<SearchKnowledgeAgentClientBuilder>
This class provides a fluent builder API to help configure and instantiate SearchKnowledgeAgentClient and SearchKnowledgeAgentAsyncClient for interacting with Azure AI Search Knowledge Agents.

Overview

This builder enables the creation of both synchronous and asynchronous clients for Azure AI Search Knowledge Agents, allowing you to interact with knowledge retrieval and agent-based search capabilities. The builder supports configuration of authentication, endpoint, agent name, API version, and HTTP pipeline options, following Azure SDK for Java standards.

Getting Started

To create a client, configure the required properties such as the service endpoint, agent name, API version, and authentication credentials. The builder supports both API key and Microsoft Entra ID (role-based) authentication. Additional options such as custom HTTP pipeline policies, retry options, logging, and serialization can also be configured.

Authentication

Azure AI Search Knowledge Agents support authentication using either an AzureKeyCredential (API key) or a TokenCredential (Microsoft Entra ID). When using Microsoft Entra ID, you may also specify a SearchAudience to target a specific Azure cloud environment.

Client Instantiation

Use buildClient() to create a synchronous SearchKnowledgeAgentClient, or buildAsyncClient() to create an asynchronous SearchKnowledgeAgentAsyncClient. Each call to these methods returns a new client instance with the configured options.

Thread Safety

Client instances created by this builder are thread-safe and intended to be shared and reused across threads. The builder itself is not thread-safe and should not be used concurrently from multiple threads.

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: