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 BedrockAgentRuntime

Contains APIs related to model invocation and querying of knowledge bases.

Inheritance Hierarchy

Amazon.BedrockAgentRuntime.IAmazonBedrockAgentRuntime

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

Syntax

C#
public interface IAmazonBedrockAgentRuntime
         IAmazonService, IDisposable

The IAmazonBedrockAgentRuntime type exposes the following members

Properties

NameTypeDescription
Public Property Paginators Amazon.BedrockAgentRuntime.Model.IBedrockAgentRuntimePaginatorFactory

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 DetermineServiceOperationEndpoint(AmazonWebServiceRequest)

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

Public Method InvokeAgent(InvokeAgentRequest)

The CLI doesn't support InvokeAgent.

Sends a prompt for the agent to process and respond to. Note the following fields for the request:

  • To continue the same conversation with an agent, use the same sessionId value in the request.

  • To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement.

  • End a conversation by setting endSession to true.

  • In the sessionState object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.

The response is returned in the bytes field of the chunk object.

  • The attribution object contains citations for parts of the response.

  • If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response.

  • If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the returnControl field.

  • Errors are also surfaced in the response.

Public Method InvokeAgentAsync(InvokeAgentRequest, CancellationToken)

The CLI doesn't support InvokeAgent.

Sends a prompt for the agent to process and respond to. Note the following fields for the request:

  • To continue the same conversation with an agent, use the same sessionId value in the request.

  • To activate trace enablement, turn enableTrace to true. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement.

  • End a conversation by setting endSession to true.

  • In the sessionState object, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.

The response is returned in the bytes field of the chunk object.

  • The attribution object contains citations for parts of the response.

  • If you set enableTrace to true in the request, you can trace the agent's steps and reasoning process that led it to the response.

  • If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the returnControl field.

  • Errors are also surfaced in the response.

Public Method Retrieve(RetrieveRequest)

Queries a knowledge base and retrieves information from it.

Public Method RetrieveAndGenerate(RetrieveAndGenerateRequest)

Queries a knowledge base and generates responses based on the retrieved results. The response only cites sources that are relevant to the query.

Public Method RetrieveAndGenerateAsync(RetrieveAndGenerateRequest, CancellationToken)

Queries a knowledge base and generates responses based on the retrieved results. The response only cites sources that are relevant to the query.

Public Method RetrieveAsync(RetrieveRequest, CancellationToken)

Queries a knowledge base and retrieves information from it.

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