Interface Agent.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Agent.Builder,
,Agent> SdkBuilder<Agent.Builder,
,Agent> SdkPojo
- Enclosing class:
Agent
-
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the agent.The unique identifier of the agent.The name of the agent.agentResourceRoleArn
(String agentResourceRoleArn) The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.agentStatus
(String agentStatus) The status of the agent and whether it is ready for use.agentStatus
(AgentStatus agentStatus) The status of the agent and whether it is ready for use.agentVersion
(String agentVersion) The version of the agent.clientToken
(String clientToken) A unique, case-sensitive identifier to ensure that the API request completes no more than one time.The time at which the agent was created.customerEncryptionKeyArn
(String customerEncryptionKeyArn) The Amazon Resource Name (ARN) of the KMS key that encrypts the agent.description
(String description) The description of the agent.failureReasons
(String... failureReasons) Contains reasons that the agent-related API that you invoked failed.failureReasons
(Collection<String> failureReasons) Contains reasons that the agent-related API that you invoked failed.foundationModel
(String foundationModel) The foundation model used for orchestration by the agent.default Agent.Builder
guardrailConfiguration
(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) The guardrails configuration assigned to the agent.guardrailConfiguration
(GuardrailConfiguration guardrailConfiguration) The guardrails configuration assigned to the agent.idleSessionTTLInSeconds
(Integer idleSessionTTLInSeconds) The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.instruction
(String instruction) Instructions that tell the agent what it should do and how it should interact with users.preparedAt
(Instant preparedAt) The time at which the agent was last prepared.default Agent.Builder
promptOverrideConfiguration
(Consumer<PromptOverrideConfiguration.Builder> promptOverrideConfiguration) Contains configurations to override prompt templates in different parts of an agent sequence.promptOverrideConfiguration
(PromptOverrideConfiguration promptOverrideConfiguration) Contains configurations to override prompt templates in different parts of an agent sequence.recommendedActions
(String... recommendedActions) Contains recommended actions to take for the agent-related API that you invoked to succeed.recommendedActions
(Collection<String> recommendedActions) Contains recommended actions to take for the agent-related API that you invoked to succeed.The time at which the agent was last updated.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
agentArn
The Amazon Resource Name (ARN) of the agent.
- Parameters:
agentArn
- The Amazon Resource Name (ARN) of the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentId
The unique identifier of the agent.
- Parameters:
agentId
- The unique identifier of the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentName
The name of the agent.
- Parameters:
agentName
- The name of the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentResourceRoleArn
The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
- Parameters:
agentResourceRoleArn
- The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentStatus
The status of the agent and whether it is ready for use. The following statuses are possible:
-
CREATING – The agent is being created.
-
PREPARING – The agent is being prepared.
-
PREPARED – The agent is prepared and ready to be invoked.
-
NOT_PREPARED – The agent has been created but not yet prepared.
-
FAILED – The agent API operation failed.
-
UPDATING – The agent is being updated.
-
DELETING – The agent is being deleted.
- Parameters:
agentStatus
- The status of the agent and whether it is ready for use. The following statuses are possible:-
CREATING – The agent is being created.
-
PREPARING – The agent is being prepared.
-
PREPARED – The agent is prepared and ready to be invoked.
-
NOT_PREPARED – The agent has been created but not yet prepared.
-
FAILED – The agent API operation failed.
-
UPDATING – The agent is being updated.
-
DELETING – The agent is being deleted.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
agentStatus
The status of the agent and whether it is ready for use. The following statuses are possible:
-
CREATING – The agent is being created.
-
PREPARING – The agent is being prepared.
-
PREPARED – The agent is prepared and ready to be invoked.
-
NOT_PREPARED – The agent has been created but not yet prepared.
-
FAILED – The agent API operation failed.
-
UPDATING – The agent is being updated.
-
DELETING – The agent is being deleted.
- Parameters:
agentStatus
- The status of the agent and whether it is ready for use. The following statuses are possible:-
CREATING – The agent is being created.
-
PREPARING – The agent is being prepared.
-
PREPARED – The agent is prepared and ready to be invoked.
-
NOT_PREPARED – The agent has been created but not yet prepared.
-
FAILED – The agent API operation failed.
-
UPDATING – The agent is being updated.
-
DELETING – The agent is being deleted.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
agentVersion
The version of the agent.
- Parameters:
agentVersion
- The version of the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientToken
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.
- Parameters:
clientToken
- A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
createdAt
The time at which the agent was created.
- Parameters:
createdAt
- The time at which the agent was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key that encrypts the agent.
- Parameters:
customerEncryptionKeyArn
- The Amazon Resource Name (ARN) of the KMS key that encrypts the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
The description of the agent.
- Parameters:
description
- The description of the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
failureReasons
Contains reasons that the agent-related API that you invoked failed.
- Parameters:
failureReasons
- Contains reasons that the agent-related API that you invoked failed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
failureReasons
Contains reasons that the agent-related API that you invoked failed.
- Parameters:
failureReasons
- Contains reasons that the agent-related API that you invoked failed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
foundationModel
The foundation model used for orchestration by the agent.
- Parameters:
foundationModel
- The foundation model used for orchestration by the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
The guardrails configuration assigned to the agent.
- Parameters:
guardrailConfiguration
- The guardrails configuration assigned to the agent.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardrailConfiguration
default Agent.Builder guardrailConfiguration(Consumer<GuardrailConfiguration.Builder> guardrailConfiguration) The guardrails configuration assigned to the agent.
This is a convenience method that creates an instance of theGuardrailConfiguration.Builder
avoiding the need to create one manually viaGuardrailConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toguardrailConfiguration(GuardrailConfiguration)
.- Parameters:
guardrailConfiguration
- a consumer that will call methods onGuardrailConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
idleSessionTTLInSeconds
The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
- Parameters:
idleSessionTTLInSeconds
- The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instruction
Instructions that tell the agent what it should do and how it should interact with users.
- Parameters:
instruction
- Instructions that tell the agent what it should do and how it should interact with users.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
preparedAt
The time at which the agent was last prepared.
- Parameters:
preparedAt
- The time at which the agent was last prepared.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptOverrideConfiguration
Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts.
- Parameters:
promptOverrideConfiguration
- Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
promptOverrideConfiguration
default Agent.Builder promptOverrideConfiguration(Consumer<PromptOverrideConfiguration.Builder> promptOverrideConfiguration) Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see Advanced prompts.
This is a convenience method that creates an instance of thePromptOverrideConfiguration.Builder
avoiding the need to create one manually viaPromptOverrideConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed topromptOverrideConfiguration(PromptOverrideConfiguration)
.- Parameters:
promptOverrideConfiguration
- a consumer that will call methods onPromptOverrideConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
recommendedActions
Contains recommended actions to take for the agent-related API that you invoked to succeed.
- Parameters:
recommendedActions
- Contains recommended actions to take for the agent-related API that you invoked to succeed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
recommendedActions
Contains recommended actions to take for the agent-related API that you invoked to succeed.
- Parameters:
recommendedActions
- Contains recommended actions to take for the agent-related API that you invoked to succeed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
updatedAt
The time at which the agent was last updated.
- Parameters:
updatedAt
- The time at which the agent was last updated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-