Interface InvokeHarnessRequest.Builder

  • Method Details

    • harnessArn

      InvokeHarnessRequest.Builder harnessArn(String harnessArn)

      The ARN of the harness to invoke.

      Parameters:
      harnessArn - The ARN of the harness to invoke.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • qualifier

      InvokeHarnessRequest.Builder qualifier(String qualifier)

      The endpoint name to invoke. If omitted, the DEFAULT endpoint is used.

      Parameters:
      qualifier - The endpoint name to invoke. If omitted, the DEFAULT endpoint is used.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runtimeSessionId

      InvokeHarnessRequest.Builder runtimeSessionId(String runtimeSessionId)

      The session ID for the invocation. Use the same session ID across requests to continue a conversation.

      Parameters:
      runtimeSessionId - The session ID for the invocation. Use the same session ID across requests to continue a conversation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • runtimeUserId

      InvokeHarnessRequest.Builder runtimeUserId(String runtimeUserId)

      An identifier for the end user making the request. This value is passed through to the runtime container.

      Parameters:
      runtimeUserId - An identifier for the end user making the request. This value is passed through to the runtime container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • messages

      The messages to send to the agent.

      Parameters:
      messages - The messages to send to the agent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • messages

      The messages to send to the agent.

      Parameters:
      messages - The messages to send to the agent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • messages

      The messages to send to the agent.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to messages(List<HarnessMessage>).

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

      The model configuration to use for this invocation. If specified, overrides the harness default.

      Parameters:
      model - The model configuration to use for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • model

      The model configuration to use for this invocation. If specified, overrides the harness default.

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

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

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

      The system prompt to use for this invocation. If specified, overrides the harness default.

      Parameters:
      systemPrompt - The system prompt to use for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • systemPrompt

      The system prompt to use for this invocation. If specified, overrides the harness default.

      Parameters:
      systemPrompt - The system prompt to use for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • systemPrompt

      The system prompt to use for this invocation. If specified, overrides the harness default.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to systemPrompt(List<HarnessSystemContentBlock>).

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

      The tools available to the agent for this invocation. If specified, overrides the harness default.

      Parameters:
      tools - The tools available to the agent for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tools

      The tools available to the agent for this invocation. If specified, overrides the harness default.

      Parameters:
      tools - The tools available to the agent for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tools

      The tools available to the agent for this invocation. If specified, overrides the harness default.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tools(List<HarnessTool>).

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

      The skills available to the agent for this invocation. If specified, overrides the harness default.

      Parameters:
      skills - The skills available to the agent for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • skills

      The skills available to the agent for this invocation. If specified, overrides the harness default.

      Parameters:
      skills - The skills available to the agent for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • skills

      The skills available to the agent for this invocation. If specified, overrides the harness default.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to skills(List<HarnessSkill>).

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

      InvokeHarnessRequest.Builder allowedTools(Collection<String> allowedTools)

      The tools that the agent is allowed to use for this invocation. If specified, overrides the harness default.

      Parameters:
      allowedTools - The tools that the agent is allowed to use for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • allowedTools

      InvokeHarnessRequest.Builder allowedTools(String... allowedTools)

      The tools that the agent is allowed to use for this invocation. If specified, overrides the harness default.

      Parameters:
      allowedTools - The tools that the agent is allowed to use for this invocation. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxIterations

      InvokeHarnessRequest.Builder maxIterations(Integer maxIterations)

      The maximum number of iterations the agent loop can execute. If specified, overrides the harness default.

      Parameters:
      maxIterations - The maximum number of iterations the agent loop can execute. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • maxTokens

      InvokeHarnessRequest.Builder maxTokens(Integer maxTokens)

      The maximum number of tokens the agent can generate per iteration. If specified, overrides the harness default.

      Parameters:
      maxTokens - The maximum number of tokens the agent can generate per iteration. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • timeoutSeconds

      InvokeHarnessRequest.Builder timeoutSeconds(Integer timeoutSeconds)

      The maximum duration in seconds for the agent loop execution. If specified, overrides the harness default.

      Parameters:
      timeoutSeconds - The maximum duration in seconds for the agent loop execution. If specified, overrides the harness default.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • actorId

      The actor ID for memory operations. Overrides the actor ID configured on the harness.

      Parameters:
      actorId - The actor ID for memory operations. Overrides the actor ID configured on the harness.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      InvokeHarnessRequest.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.