interface ManagedStrategyProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.ManagedStrategyProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#ManagedStrategyProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.ManagedStrategyProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.ManagedStrategyProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป ManagedStrategyProps |
Configuration parameters for a memory strategy that can override existing built-in default prompts/models.
Example
// Create memory with built-in strategies
const memory = new agentcore.Memory(this, "MyMemory", {
memoryName: "my_memory",
description: "Memory with built-in strategies",
expirationDuration: cdk.Duration.days(90),
memoryStrategies: [
agentcore.MemoryStrategy.usingUserPreference({
name: "CustomerPreferences",
namespaces: ["support/customer/{actorId}/preferences"]
}),
agentcore.MemoryStrategy.usingSemantic({
name: "CustomerSupportSemantic",
namespaces: ["support/customer/{actorId}/semantic"]
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| name | string | The name for the strategy. |
| namespaces | string[] | The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/). |
| custom | Override | The configuration for the custom consolidation. |
| custom | Override | The configuration for the custom extraction. |
| description? | string | The description of the strategy. |
name
Type:
string
The name for the strategy.
namespaces
Type:
string[]
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
customConsolidation?
Type:
Override
(optional, default: No custom extraction)
The configuration for the custom consolidation.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
customExtraction?
Type:
Override
(optional, default: No custom extraction)
The configuration for the custom extraction.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
description?
Type:
string
(optional, default: No description)
The description of the strategy.

.NET
Go
Java
Python
TypeScript (