Interface AgenticRetrieveMemoryConfiguration.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<AgenticRetrieveMemoryConfiguration.Builder,,AgenticRetrieveMemoryConfiguration> SdkBuilder<AgenticRetrieveMemoryConfiguration.Builder,,AgenticRetrieveMemoryConfiguration> SdkPojo
- Enclosing class:
AgenticRetrieveMemoryConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionThe identifier of the AgentCore Memory resource to use.persistenceMode(String persistenceMode) Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set.persistenceMode(AgenticRetrieveMemoryPersistenceMode persistenceMode) Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set.retrievalConfigs(Collection<AgenticRetrieveMemoryRetrievalConfig> retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from.retrievalConfigs(Consumer<AgenticRetrieveMemoryRetrievalConfig.Builder>... retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from.retrievalConfigs(AgenticRetrieveMemoryRetrievalConfig... retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from.sessionBinding(Consumer<AgenticRetrieveMemorySessionBinding.Builder> sessionBinding) The short-term memory session whose history is restored for this retrieval.sessionBinding(AgenticRetrieveMemorySessionBinding sessionBinding) The short-term memory session whose history is restored for this retrieval.Methods 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
-
memoryId
The identifier of the AgentCore Memory resource to use. The resource must exist in your account and be in the ACTIVE state.
- Parameters:
memoryId- The identifier of the AgentCore Memory resource to use. The resource must exist in your account and be in the ACTIVE state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
persistenceMode
Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set. Valid values:
-
DEFAULT(default) – Specifies that the question and the agent-generated answer are persisted to the session as a single event. This value requires generateResponse to be true. -
NONE– Specifies that the session is left unchanged.
- Parameters:
persistenceMode- Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set. Valid values:-
DEFAULT(default) – Specifies that the question and the agent-generated answer are persisted to the session as a single event. This value requires generateResponse to be true. -
NONE– Specifies that the session is left unchanged.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
persistenceMode
AgenticRetrieveMemoryConfiguration.Builder persistenceMode(AgenticRetrieveMemoryPersistenceMode persistenceMode) Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set. Valid values:
-
DEFAULT(default) – Specifies that the question and the agent-generated answer are persisted to the session as a single event. This value requires generateResponse to be true. -
NONE– Specifies that the session is left unchanged.
- Parameters:
persistenceMode- Specifies whether the agent-generated answer is written back to the given short-term memory session, and applies only when sessionBinding is set. Valid values:-
DEFAULT(default) – Specifies that the question and the agent-generated answer are persisted to the session as a single event. This value requires generateResponse to be true. -
NONE– Specifies that the session is left unchanged.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
retrievalConfigs
AgenticRetrieveMemoryConfiguration.Builder retrievalConfigs(Collection<AgenticRetrieveMemoryRetrievalConfig> retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.
- Parameters:
retrievalConfigs- Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalConfigs
AgenticRetrieveMemoryConfiguration.Builder retrievalConfigs(AgenticRetrieveMemoryRetrievalConfig... retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.
- Parameters:
retrievalConfigs- Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
retrievalConfigs
AgenticRetrieveMemoryConfiguration.Builder retrievalConfigs(Consumer<AgenticRetrieveMemoryRetrievalConfig.Builder>... retrievalConfigs) Specifies the long-term memory configuration the agent can retrieve from. The agent decides whether to retrieve and composes its own query. This field currently accepts at most one entry.
This is a convenience method that creates an instance of theAgenticRetrieveMemoryRetrievalConfig.Builderavoiding the need to create one manually viaAgenticRetrieveMemoryRetrievalConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toretrievalConfigs(List<AgenticRetrieveMemoryRetrievalConfig>).- Parameters:
retrievalConfigs- a consumer that will call methods onAgenticRetrieveMemoryRetrievalConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
sessionBinding
AgenticRetrieveMemoryConfiguration.Builder sessionBinding(AgenticRetrieveMemorySessionBinding sessionBinding) The short-term memory session whose history is restored for this retrieval. To persist the agent-generated answer to the session, omit persistenceMode or set it to DEFAULT. To leave the session unchanged, set persistenceMode to NONE. Supply session history through the existing messages parameter or through short-term memory, but not both.
- Parameters:
sessionBinding- The short-term memory session whose history is restored for this retrieval. To persist the agent-generated answer to the session, omit persistenceMode or set it to DEFAULT. To leave the session unchanged, set persistenceMode to NONE. Supply session history through the existing messages parameter or through short-term memory, but not both.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sessionBinding
default AgenticRetrieveMemoryConfiguration.Builder sessionBinding(Consumer<AgenticRetrieveMemorySessionBinding.Builder> sessionBinding) The short-term memory session whose history is restored for this retrieval. To persist the agent-generated answer to the session, omit persistenceMode or set it to DEFAULT. To leave the session unchanged, set persistenceMode to NONE. Supply session history through the existing messages parameter or through short-term memory, but not both.
This is a convenience method that creates an instance of theAgenticRetrieveMemorySessionBinding.Builderavoiding the need to create one manually viaAgenticRetrieveMemorySessionBinding.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosessionBinding(AgenticRetrieveMemorySessionBinding).- Parameters:
sessionBinding- a consumer that will call methods onAgenticRetrieveMemorySessionBinding.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-