Interface InvokeAgentRequest.Builder

  • Method Details

    • agentAliasId

      InvokeAgentRequest.Builder agentAliasId(String agentAliasId)

      The alias of the agent to use.

      Parameters:
      agentAliasId - The alias of the agent to use.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • agentId

      The unique identifier of the agent to use.

      Parameters:
      agentId - The unique identifier of the agent to use.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • enableTrace

      InvokeAgentRequest.Builder enableTrace(Boolean enableTrace)

      Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.

      Parameters:
      enableTrace - Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • endSession

      InvokeAgentRequest.Builder endSession(Boolean endSession)

      Specifies whether to end the session with the agent or not.

      Parameters:
      endSession - Specifies whether to end the session with the agent or not.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputText

      InvokeAgentRequest.Builder inputText(String inputText)

      The prompt text to send the agent.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Parameters:
      inputText - The prompt text to send the agent.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryId

      InvokeAgentRequest.Builder memoryId(String memoryId)

      The unique identifier of the agent memory.

      Parameters:
      memoryId - The unique identifier of the agent memory.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionId

      InvokeAgentRequest.Builder sessionId(String sessionId)

      The unique identifier of the session. Use the same value across requests to continue the same conversation.

      Parameters:
      sessionId - The unique identifier of the session. Use the same value across requests to continue the same conversation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionState

      InvokeAgentRequest.Builder sessionState(SessionState sessionState)

      Contains parameters that specify various attributes of the session. For more information, see Control session context.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Parameters:
      sessionState - Contains parameters that specify various attributes of the session. For more information, see Control session context.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionState

      default InvokeAgentRequest.Builder sessionState(Consumer<SessionState.Builder> sessionState)

      Contains parameters that specify various attributes of the session. For more information, see Control session context.

      If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

      This is a convenience method that creates an instance of the SessionState.Builder avoiding the need to create one manually via SessionState.builder().

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

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

      InvokeAgentRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.