Interface AgenticRetrieveMemoryConfiguration.Builder

  • 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

      AgenticRetrieveMemoryConfiguration.Builder 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. 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

      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

      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

      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

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

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

      Parameters:
      retrievalConfigs - a consumer that will call methods on AgenticRetrieveMemoryRetrievalConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • 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

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

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

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