Interface InvokeHarnessRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,BedrockAgentCoreRequest.Builder,Buildable,CopyableBuilder<InvokeHarnessRequest.Builder,,InvokeHarnessRequest> SdkBuilder<InvokeHarnessRequest.Builder,,InvokeHarnessRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
InvokeHarnessRequest
-
Method Summary
Modifier and TypeMethodDescriptionThe actor ID for memory operations.allowedTools(String... allowedTools) The tools that the agent is allowed to use for this invocation.allowedTools(Collection<String> allowedTools) The tools that the agent is allowed to use for this invocation.harnessArn(String harnessArn) The ARN of the harness to invoke.maxIterations(Integer maxIterations) The maximum number of iterations the agent loop can execute.The maximum number of tokens the agent can generate per iteration.messages(Collection<HarnessMessage> messages) The messages to send to the agent.messages(Consumer<HarnessMessage.Builder>... messages) The messages to send to the agent.messages(HarnessMessage... messages) The messages to send to the agent.default InvokeHarnessRequest.BuilderThe model configuration to use for this invocation.model(HarnessModelConfiguration model) The model configuration to use for this invocation.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.runtimeSessionId(String runtimeSessionId) The session ID for the invocation.skills(Collection<HarnessSkill> skills) The skills available to the agent for this invocation.skills(Consumer<HarnessSkill.Builder>... skills) The skills available to the agent for this invocation.skills(HarnessSkill... skills) The skills available to the agent for this invocation.systemPrompt(Collection<HarnessSystemContentBlock> systemPrompt) The system prompt to use for this invocation.systemPrompt(Consumer<HarnessSystemContentBlock.Builder>... systemPrompt) The system prompt to use for this invocation.systemPrompt(HarnessSystemContentBlock... systemPrompt) The system prompt to use for this invocation.timeoutSeconds(Integer timeoutSeconds) The maximum duration in seconds for the agent loop execution.tools(Collection<HarnessTool> tools) The tools available to the agent for this invocation.tools(Consumer<HarnessTool.Builder>... tools) The tools available to the agent for this invocation.tools(HarnessTool... tools) The tools available to the agent for this invocation.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.bedrockagentcore.model.BedrockAgentCoreRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
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.
-
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.
-
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 theHarnessMessage.Builderavoiding the need to create one manually viaHarnessMessage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomessages(List<HarnessMessage>).- Parameters:
messages- a consumer that will call methods onHarnessMessage.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 theHarnessModelConfiguration.Builderavoiding the need to create one manually viaHarnessModelConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomodel(HarnessModelConfiguration).- Parameters:
model- a consumer that will call methods onHarnessModelConfiguration.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
InvokeHarnessRequest.Builder systemPrompt(Consumer<HarnessSystemContentBlock.Builder>... 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 theHarnessSystemContentBlock.Builderavoiding the need to create one manually viaHarnessSystemContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosystemPrompt(List<HarnessSystemContentBlock>).- Parameters:
systemPrompt- a consumer that will call methods onHarnessSystemContentBlock.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 theHarnessTool.Builderavoiding the need to create one manually viaHarnessTool.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totools(List<HarnessTool>).- Parameters:
tools- a consumer that will call methods onHarnessTool.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 theHarnessSkill.Builderavoiding the need to create one manually viaHarnessSkill.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toskills(List<HarnessSkill>).- Parameters:
skills- a consumer that will call methods onHarnessSkill.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
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
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
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
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.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
InvokeHarnessRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-