# EpisodicReflectionConfiguration

Configuration for episodic memory reflection.

- 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#L59)
- 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

- `namespaces`: string[] (required) — Namespaces for episodic reflection Minimum 1 namespace required.
