Interface SelfManagedStrategyProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,MemoryStrategyCommonProps
- All Known Implementing Classes:
SelfManagedStrategyProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.129.0 (build eaca441)",
date="2026-05-19T08:18:44.506Z")
@Stability(Stable)
public interface SelfManagedStrategyProps
extends software.amazon.jsii.JsiiSerializable, MemoryStrategyCommonProps
Configuration parameters for a self managed memory strategy existing built-in default prompts/models.
Example:
Bucket bucket = Bucket.Builder.create(this, "memoryBucket")
.bucketName("test-memory")
.removalPolicy(RemovalPolicy.DESTROY)
.autoDeleteObjects(true)
.build();
Topic topic = new Topic(this, "topic");
// Create a custom semantic memory strategy
SelfManagedMemoryStrategy selfManagedStrategy = MemoryStrategy.usingSelfManaged(SelfManagedStrategyProps.builder()
.strategyName("selfManagedStrategy")
.description("self managed memory strategy")
.historicalContextWindowSize(5)
.invocationConfiguration(InvocationConfiguration.builder()
.topic(topic)
.s3Location(Location.builder()
.bucketName(bucket.getBucketName())
.objectKey("memory/")
.build())
.build())
.triggerConditions(TriggerConditions.builder()
.messageBasedTrigger(1)
.timeBasedTrigger(Duration.seconds(10))
.tokenBasedTrigger(100)
.build())
.build());
// Create memory with custom strategy
Memory memory = Memory.Builder.create(this, "MyMemory")
.memoryName("my-custom-memory")
.description("Memory with custom strategy")
.expirationDuration(Duration.days(90))
.memoryStrategies(List.of(selfManagedStrategy))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSelfManagedStrategyPropsstatic final classAn implementation forSelfManagedStrategyProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default NumberDefine the number of previous events to be included when processing memory.Invocation configuration for self managed memory strategy.default TriggerConditionsTrigger conditions for self managed memory strategy.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.bedrockagentcore.MemoryStrategyCommonProps
getDescription, getStrategyName
-
Method Details
-
getInvocationConfiguration
Invocation configuration for self managed memory strategy. -
getHistoricalContextWindowSize
Define the number of previous events to be included when processing memory.A larger history window provides more context from past conversations.
Default: 4
-
getTriggerConditions
Trigger conditions for self managed memory strategy.Default: - undefined
-
builder
- Returns:
- a
SelfManagedStrategyProps.BuilderofSelfManagedStrategyProps
-