Interface ManagedStrategyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,MemoryStrategyCommonProps
- All Known Implementing Classes:
ManagedStrategyProps.Jsii$Proxy
Example:
// Create memory with custom strategies
Memory memory = Memory.Builder.create(this, "MyMemory")
.memoryName("my_memory")
.description("Memory with custom strategies")
.expirationDuration(Duration.days(90))
.memoryStrategies(List.of(MemoryStrategy.usingUserPreference(ManagedStrategyProps.builder()
.strategyName("CustomerPreferences")
.namespaces(List.of("support/customer/{actorId}/preferences"))
.build()), MemoryStrategy.usingSemantic(ManagedStrategyProps.builder()
.strategyName("CustomerSupportSemantic")
.namespaces(List.of("support/customer/{actorId}/semantic"))
.build()), MemoryStrategy.usingEpisodic(ManagedStrategyProps.builder()
.strategyName("customerJourneyEpisodic")
.namespaces(List.of("/journey/customer/{actorId}/episodes"))
.reflectionConfiguration(EpisodicReflectionConfiguration.builder()
.namespaces(List.of("/journey/customer/{actorId}/reflections"))
.build())
.build())))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forManagedStrategyPropsstatic final classAn implementation forManagedStrategyProps -
Method Summary
Modifier and TypeMethodDescriptionstatic ManagedStrategyProps.Builderbuilder()default OverrideConfigThe configuration for the custom consolidation.default OverrideConfigThe configuration for the custom extraction.The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/).default EpisodicReflectionConfigurationConfiguration for episodic memory reflection (only applicable for EPISODIC strategy type) Defines additional namespaces for reflection-based episodic recall.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.bedrockagentcore.MemoryStrategyCommonProps
getDescription, getStrategyName
-
Method Details
-
getNamespaces
The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/).Use a hierarchical format separated by forward slashes (/) to organize namespaces logically. You can include these defined variables:
- {sessionId} - the user identifier to be created in the CreateEvent API
- {memoryStrategyId} - an identifier for an extraction strategy
- {sessionId} - an identifier for each session
Example namespace path: /strategies/{memoryStrategyId}/actions/{actionId}/sessions/{sessionId}
After memory creation, this namespace might look like: /actor/actor-3afc5aa8fef9/strategy/summarization-fy5c5fwc7/session/session-qj7tpd1kvr8
-
getCustomConsolidation
The configuration for the custom consolidation.This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
Default: - No custom extraction
-
getCustomExtraction
The configuration for the custom extraction.This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
Default: - No custom extraction
-
getReflectionConfiguration
Configuration for episodic memory reflection (only applicable for EPISODIC strategy type) Defines additional namespaces for reflection-based episodic recall.Default: - No reflection configuration
-
builder
- Returns:
- a
ManagedStrategyProps.BuilderofManagedStrategyProps
-