Interface Agent.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Agent.Builder,Agent>, SdkBuilder<Agent.Builder,Agent>, SdkPojo
Enclosing class:
Agent

public static interface Agent.Builder extends SdkPojo, CopyableBuilder<Agent.Builder,Agent>
  • Method Details

    • agentArn

      Agent.Builder agentArn(String 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

      Agent.Builder agentId(String 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

      Agent.Builder agentName(String 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

      Agent.Builder agentResourceRoleArn(String 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

      Agent.Builder agentStatus(String 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

      Agent.Builder agentStatus(AgentStatus 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

      Agent.Builder agentVersion(String 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

      Agent.Builder clientToken(String 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

      Agent.Builder createdAt(Instant 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

      Agent.Builder customerEncryptionKeyArn(String 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

      Agent.Builder description(String 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

      Agent.Builder failureReasons(Collection<String> 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

      Agent.Builder failureReasons(String... 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

      Agent.Builder foundationModel(String 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

      Agent.Builder guardrailConfiguration(GuardrailConfiguration 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 the GuardrailConfiguration.Builder avoiding the need to create one manually via GuardrailConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to guardrailConfiguration(GuardrailConfiguration).

      Parameters:
      guardrailConfiguration - a consumer that will call methods on GuardrailConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • idleSessionTTLInSeconds

      Agent.Builder idleSessionTTLInSeconds(Integer 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

      Agent.Builder instruction(String 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

      Agent.Builder preparedAt(Instant 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

      Agent.Builder promptOverrideConfiguration(PromptOverrideConfiguration 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 the PromptOverrideConfiguration.Builder avoiding the need to create one manually via PromptOverrideConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to promptOverrideConfiguration(PromptOverrideConfiguration).

      Parameters:
      promptOverrideConfiguration - a consumer that will call methods on PromptOverrideConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • recommendedActions

      Agent.Builder recommendedActions(Collection<String> 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

      Agent.Builder recommendedActions(String... 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

      Agent.Builder updatedAt(Instant 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.