AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Interface for accessing BedrockAgent

Describes the API operations for creating and managing Amazon Bedrock agents.

Inheritance Hierarchy

Amazon.BedrockAgent.IAmazonBedrockAgent

Namespace: Amazon.BedrockAgent
Assembly: AWSSDK.BedrockAgent.dll
Version: 3.x.y.z

Syntax

C#
public interface IAmazonBedrockAgent
         IAmazonService, IDisposable

The IAmazonBedrockAgent type exposes the following members

Properties

NameTypeDescription
Public Property Paginators Amazon.BedrockAgent.Model.IBedrockAgentPaginatorFactory

Paginators for the service

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method AssociateAgentKnowledgeBase(AssociateAgentKnowledgeBaseRequest)

Associates a knowledge base with an agent. If a knowledge base is associated and its indexState is set to Enabled, the agent queries the knowledge base for information to augment its response to the user.

Public Method AssociateAgentKnowledgeBaseAsync(AssociateAgentKnowledgeBaseRequest, CancellationToken)

Associates a knowledge base with an agent. If a knowledge base is associated and its indexState is set to Enabled, the agent queries the knowledge base for information to augment its response to the user.

Public Method CreateAgent(CreateAgentRequest)

Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.

  • Specify the following fields for security purposes.

    • agentResourceRoleArn – The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent.

    • (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.

    • (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent InvokeAgent request begins a new session.

  • To override the default prompt behavior for agent orchestration and to use advanced prompts, include a promptOverrideConfiguration object. For more information, see Advanced prompts.

  • If you agent fails to be created, the response returns a list of failureReasons alongside a list of recommendedActions for you to troubleshoot.

Public Method CreateAgentActionGroup(CreateAgentActionGroupRequest)

Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.

To allow your agent to request the user for additional information when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.UserInput. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.

Public Method CreateAgentActionGroupAsync(CreateAgentActionGroupRequest, CancellationToken)

Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.

To allow your agent to request the user for additional information when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.UserInput. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.

Public Method CreateAgentAlias(CreateAgentAliasRequest)

Creates an alias of an agent that can be used to deploy the agent.

Public Method CreateAgentAliasAsync(CreateAgentAliasRequest, CancellationToken)

Creates an alias of an agent that can be used to deploy the agent.

Public Method CreateAgentAsync(CreateAgentRequest, CancellationToken)

Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.

  • Specify the following fields for security purposes.

    • agentResourceRoleArn – The Amazon Resource Name (ARN) of the role with permissions to invoke API operations on an agent.

    • (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.

    • (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent InvokeAgent request begins a new session.

  • To override the default prompt behavior for agent orchestration and to use advanced prompts, include a promptOverrideConfiguration object. For more information, see Advanced prompts.

  • If you agent fails to be created, the response returns a list of failureReasons alongside a list of recommendedActions for you to troubleshoot.

Public Method CreateDataSource(CreateDataSourceRequest)

Sets up a data source to be added to a knowledge base.

You can't change the chunkingConfiguration after you create the data source.

Public Method CreateDataSourceAsync(CreateDataSourceRequest, CancellationToken)

Sets up a data source to be added to a knowledge base.

You can't change the chunkingConfiguration after you create the data source.

Public Method CreateKnowledgeBase(CreateKnowledgeBaseRequest)

Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up your data for ingestion.

If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base.

  • Provide the name and an optional description.

  • Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the roleArn field.

  • Provide the embedding model to use in the embeddingModelArn field in the knowledgeBaseConfiguration object.

  • Provide the configuration for your vector store in the storageConfiguration object.

Public Method CreateKnowledgeBaseAsync(CreateKnowledgeBaseRequest, CancellationToken)

Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up your data for ingestion.

If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base.

  • Provide the name and an optional description.

  • Provide the Amazon Resource Name (ARN) with permissions to create a knowledge base in the roleArn field.

  • Provide the embedding model to use in the embeddingModelArn field in the knowledgeBaseConfiguration object.

  • Provide the configuration for your vector store in the storageConfiguration object.

Public Method DeleteAgent(DeleteAgentRequest)

Deletes an agent.

Public Method DeleteAgentActionGroup(DeleteAgentActionGroupRequest)

Deletes an action group in an agent.

Public Method DeleteAgentActionGroupAsync(DeleteAgentActionGroupRequest, CancellationToken)

Deletes an action group in an agent.

Public Method DeleteAgentAlias(DeleteAgentAliasRequest)

Deletes an alias of an agent.

Public Method DeleteAgentAliasAsync(DeleteAgentAliasRequest, CancellationToken)

Deletes an alias of an agent.

Public Method DeleteAgentAsync(DeleteAgentRequest, CancellationToken)

Deletes an agent.

Public Method DeleteAgentVersion(DeleteAgentVersionRequest)

Deletes a version of an agent.

Public Method DeleteAgentVersionAsync(DeleteAgentVersionRequest, CancellationToken)

Deletes a version of an agent.

Public Method DeleteDataSource(DeleteDataSourceRequest)

Deletes a data source from a knowledge base.

Public Method DeleteDataSourceAsync(DeleteDataSourceRequest, CancellationToken)

Deletes a data source from a knowledge base.

Public Method DeleteKnowledgeBase(DeleteKnowledgeBaseRequest)

Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request.

Public Method DeleteKnowledgeBaseAsync(DeleteKnowledgeBaseRequest, CancellationToken)

Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request.

Public Method DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

Returns the endpoint that will be used for a particular request.

Public Method DisassociateAgentKnowledgeBase(DisassociateAgentKnowledgeBaseRequest)

Disassociates a knowledge base from an agent.

Public Method DisassociateAgentKnowledgeBaseAsync(DisassociateAgentKnowledgeBaseRequest, CancellationToken)

Disassociates a knowledge base from an agent.

Public Method GetAgent(GetAgentRequest)

Gets information about an agent.

Public Method GetAgentActionGroup(GetAgentActionGroupRequest)

Gets information about an action group for an agent.

Public Method GetAgentActionGroupAsync(GetAgentActionGroupRequest, CancellationToken)

Gets information about an action group for an agent.

Public Method GetAgentAlias(GetAgentAliasRequest)

Gets information about an alias of an agent.

Public Method GetAgentAliasAsync(GetAgentAliasRequest, CancellationToken)

Gets information about an alias of an agent.

Public Method GetAgentAsync(GetAgentRequest, CancellationToken)

Gets information about an agent.

Public Method GetAgentKnowledgeBase(GetAgentKnowledgeBaseRequest)

Gets information about a knowledge base associated with an agent.

Public Method GetAgentKnowledgeBaseAsync(GetAgentKnowledgeBaseRequest, CancellationToken)

Gets information about a knowledge base associated with an agent.

Public Method GetAgentVersion(GetAgentVersionRequest)

Gets details about a version of an agent.

Public Method GetAgentVersionAsync(GetAgentVersionRequest, CancellationToken)

Gets details about a version of an agent.

Public Method GetDataSource(GetDataSourceRequest)

Gets information about a data source.

Public Method GetDataSourceAsync(GetDataSourceRequest, CancellationToken)

Gets information about a data source.

Public Method GetIngestionJob(GetIngestionJobRequest)

Gets information about a ingestion job, in which a data source is added to a knowledge base.

Public Method GetIngestionJobAsync(GetIngestionJobRequest, CancellationToken)

Gets information about a ingestion job, in which a data source is added to a knowledge base.

Public Method GetKnowledgeBase(GetKnowledgeBaseRequest)

Gets information about a knoweldge base.

Public Method GetKnowledgeBaseAsync(GetKnowledgeBaseRequest, CancellationToken)

Gets information about a knoweldge base.

Public Method ListAgentActionGroups(ListAgentActionGroupsRequest)

Lists the action groups for an agent and information about each one.

Public Method ListAgentActionGroupsAsync(ListAgentActionGroupsRequest, CancellationToken)

Lists the action groups for an agent and information about each one.

Public Method ListAgentAliases(ListAgentAliasesRequest)

Lists the aliases of an agent and information about each one.

Public Method ListAgentAliasesAsync(ListAgentAliasesRequest, CancellationToken)

Lists the aliases of an agent and information about each one.

Public Method ListAgentKnowledgeBases(ListAgentKnowledgeBasesRequest)

Lists knowledge bases associated with an agent and information about each one.

Public Method ListAgentKnowledgeBasesAsync(ListAgentKnowledgeBasesRequest, CancellationToken)

Lists knowledge bases associated with an agent and information about each one.

Public Method ListAgents(ListAgentsRequest)

Lists the agents belonging to an account and information about each agent.

Public Method ListAgentsAsync(ListAgentsRequest, CancellationToken)

Lists the agents belonging to an account and information about each agent.

Public Method ListAgentVersions(ListAgentVersionsRequest)

Lists the versions of an agent and information about each version.

Public Method ListAgentVersionsAsync(ListAgentVersionsRequest, CancellationToken)

Lists the versions of an agent and information about each version.

Public Method ListDataSources(ListDataSourcesRequest)

Lists the data sources in a knowledge base and information about each one.

Public Method ListDataSourcesAsync(ListDataSourcesRequest, CancellationToken)

Lists the data sources in a knowledge base and information about each one.

Public Method ListIngestionJobs(ListIngestionJobsRequest)

Lists the ingestion jobs for a data source and information about each of them.

Public Method ListIngestionJobsAsync(ListIngestionJobsRequest, CancellationToken)

Lists the ingestion jobs for a data source and information about each of them.

Public Method ListKnowledgeBases(ListKnowledgeBasesRequest)

Lists the knowledge bases in an account and information about each of them.

Public Method ListKnowledgeBasesAsync(ListKnowledgeBasesRequest, CancellationToken)

Lists the knowledge bases in an account and information about each of them.

Public Method ListTagsForResource(ListTagsForResourceRequest)

List all the tags for the resource you specify.

Public Method ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken)

List all the tags for the resource you specify.

Public Method PrepareAgent(PrepareAgentRequest)

Creates a DRAFT version of the agent that can be used for internal testing.

Public Method PrepareAgentAsync(PrepareAgentRequest, CancellationToken)

Creates a DRAFT version of the agent that can be used for internal testing.

Public Method StartIngestionJob(StartIngestionJobRequest)

Begins an ingestion job, in which a data source is added to a knowledge base.

Public Method StartIngestionJobAsync(StartIngestionJobRequest, CancellationToken)

Begins an ingestion job, in which a data source is added to a knowledge base.

Public Method TagResource(TagResourceRequest)

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

Public Method TagResourceAsync(TagResourceRequest, CancellationToken)

Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.

Public Method UntagResource(UntagResourceRequest)

Remove tags from a resource.

Public Method UntagResourceAsync(UntagResourceRequest, CancellationToken)

Remove tags from a resource.

Public Method UpdateAgent(UpdateAgentRequest)

Updates the configuration of an agent.

Public Method UpdateAgentActionGroup(UpdateAgentActionGroupRequest)

Updates the configuration for an action group for an agent.

Public Method UpdateAgentActionGroupAsync(UpdateAgentActionGroupRequest, CancellationToken)

Updates the configuration for an action group for an agent.

Public Method UpdateAgentAlias(UpdateAgentAliasRequest)

Updates configurations for an alias of an agent.

Public Method UpdateAgentAliasAsync(UpdateAgentAliasRequest, CancellationToken)

Updates configurations for an alias of an agent.

Public Method UpdateAgentAsync(UpdateAgentRequest, CancellationToken)

Updates the configuration of an agent.

Public Method UpdateAgentKnowledgeBase(UpdateAgentKnowledgeBaseRequest)

Updates the configuration for a knowledge base that has been associated with an agent.

Public Method UpdateAgentKnowledgeBaseAsync(UpdateAgentKnowledgeBaseRequest, CancellationToken)

Updates the configuration for a knowledge base that has been associated with an agent.

Public Method UpdateDataSource(UpdateDataSourceRequest)

Updates configurations for a data source.

You can't change the chunkingConfiguration after you create the data source. Specify the existing chunkingConfiguration.

Public Method UpdateDataSourceAsync(UpdateDataSourceRequest, CancellationToken)

Updates configurations for a data source.

You can't change the chunkingConfiguration after you create the data source. Specify the existing chunkingConfiguration.

Public Method UpdateKnowledgeBase(UpdateKnowledgeBaseRequest)

Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same.

You can change the following fields:

  • name

  • description

  • roleArn

You can't change the knowledgeBaseConfiguration or storageConfiguration fields, so you must specify the same configurations as when you created the knowledge base. You can send a GetKnowledgeBase request and copy the same configurations.

Public Method UpdateKnowledgeBaseAsync(UpdateKnowledgeBaseRequest, CancellationToken)

Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same.

You can change the following fields:

  • name

  • description

  • roleArn

You can't change the knowledgeBaseConfiguration or storageConfiguration fields, so you must specify the same configurations as when you created the knowledge base. You can send a GetKnowledgeBase request and copy the same configurations.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5