# ManagedStrategyProps

Configuration parameters for a memory strategy that can override existing built-in default prompts/models.

Extends: [MemoryStrategyCommonProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.MemoryStrategyCommonProps.html)
Used as props by: [ManagedMemoryStrategy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ManagedMemoryStrategy.html)
Used as argument in: [MemoryStrategy.usingEpisodic](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.MemoryStrategy.html#usingepisodic), [MemoryStrategy.usingSemantic](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.MemoryStrategy.html#usingsemantic), MemoryStrategy.usingSummarization, MemoryStrategy.usingUserPreference

- Source: [`aws-bedrockagentcore/lib/memory/strategies/managed-strategy.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/memory/strategies/managed-strategy.ts#L71)
- Type last changed: v2.255.0 · 19 May 2026

## Example

TypeScript:

```ts
// Create memory with custom strategies
const memory = new agentcore.Memory(this, "MyMemory", {
  memoryName: "my_memory",
  description: "Memory with custom strategies",
  expirationDuration: cdk.Duration.days(90),
  memoryStrategies: [
    agentcore.MemoryStrategy.usingUserPreference({
        strategyName: "CustomerPreferences",
        namespaces: ["support/customer/{actorId}/preferences"]
    }),
    agentcore.MemoryStrategy.usingSemantic({
        strategyName: "CustomerSupportSemantic",
        namespaces: ["support/customer/{actorId}/semantic"]
    }),
     agentcore.MemoryStrategy.usingEpisodic({
        strategyName: "customerJourneyEpisodic",
        namespaces: ["/journey/customer/{actorId}/episodes"],
        reflectionConfiguration: {
            namespaces: ["/journey/customer/{actorId}/reflections"]
        }
    }),
  ],
});
```

Python:

```python
# Create memory with custom strategies
memory = agentcore.Memory(self, "MyMemory",
    memory_name="my_memory",
    description="Memory with custom strategies",
    expiration_duration=cdk.Duration.days(90),
    memory_strategies=[
        agentcore.MemoryStrategy.using_user_preference(
            strategy_name="CustomerPreferences",
            namespaces=["support/customer/{actorId}/preferences"]
        ),
        agentcore.MemoryStrategy.using_semantic(
            strategy_name="CustomerSupportSemantic",
            namespaces=["support/customer/{actorId}/semantic"]
        ),
        agentcore.MemoryStrategy.using_episodic(
            strategy_name="customerJourneyEpisodic",
            namespaces=["/journey/customer/{actorId}/episodes"],
            reflection_configuration=agentcore.EpisodicReflectionConfiguration(
                namespaces=["/journey/customer/{actorId}/reflections"]
            )
        )
    ]
)
```

Java:

```java
// 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();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// Create memory with custom strategies
var memory = new Memory(this, "MyMemory", new MemoryProps {
    MemoryName = "my_memory",
    Description = "Memory with custom strategies",
    ExpirationDuration = Duration.Days(90),
    MemoryStrategies = new [] { MemoryStrategy.UsingUserPreference(new ManagedStrategyProps {
        StrategyName = "CustomerPreferences",
        Namespaces = new [] { "support/customer/{actorId}/preferences" }
    }), MemoryStrategy.UsingSemantic(new ManagedStrategyProps {
        StrategyName = "CustomerSupportSemantic",
        Namespaces = new [] { "support/customer/{actorId}/semantic" }
    }), MemoryStrategy.UsingEpisodic(new ManagedStrategyProps {
        StrategyName = "customerJourneyEpisodic",
        Namespaces = new [] { "/journey/customer/{actorId}/episodes" },
        ReflectionConfiguration = new EpisodicReflectionConfiguration {
            Namespaces = new [] { "/journey/customer/{actorId}/reflections" }
        }
    }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// Create memory with custom strategies
memory := agentcore.NewMemory(this, jsii.String("MyMemory"), &MemoryProps{
	MemoryName: jsii.String("my_memory"),
	Description: jsii.String("Memory with custom strategies"),
	ExpirationDuration: cdk.Duration_Days(jsii.Number(90)),
	MemoryStrategies: []IMemoryStrategy{
		agentcore.MemoryStrategy_UsingUserPreference(&ManagedStrategyProps{
			StrategyName: jsii.String("CustomerPreferences"),
			Namespaces: []*string{
				jsii.String("support/customer/{actorId}/preferences"),
			},
		}),
		agentcore.MemoryStrategy_UsingSemantic(&ManagedStrategyProps{
			StrategyName: jsii.String("CustomerSupportSemantic"),
			Namespaces: []*string{
				jsii.String("support/customer/{actorId}/semantic"),
			},
		}),
		agentcore.MemoryStrategy_UsingEpisodic(&ManagedStrategyProps{
			StrategyName: jsii.String("customerJourneyEpisodic"),
			Namespaces: []*string{
				jsii.String("/journey/customer/{actorId}/episodes"),
			},
			ReflectionConfiguration: &EpisodicReflectionConfiguration{
				Namespaces: []*string{
					jsii.String("/journey/customer/{actorId}/reflections"),
				},
			},
		}),
	},
})
```

## Properties

- `customConsolidation`: [OverrideConfig](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.OverrideConfig.html) — The configuration for the custom consolidation.

  **Default:** No custom extraction

  This configuration provides customization to how the model identifies
  and extracts relevant information for memory storage.

- `customExtraction`: [OverrideConfig](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.OverrideConfig.html) — The configuration for the custom extraction.

  **Default:** No custom extraction

  This configuration provides customization to how the model identifies
  and extracts relevant information for memory storage.

- `description`: string — The description of the strategy.

  **Default:** No description

- `namespaces`: string[] (required) — 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

- `reflectionConfiguration`: [EpisodicReflectionConfiguration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.EpisodicReflectionConfiguration.html) — Configuration for episodic memory reflection (only applicable for EPISODIC strategy type) Defines additional namespaces for reflection-based episodic recall.

  **Default:** No reflection configuration

- `strategyName`: string (required) — The name for the strategy.
