# MemoryStrategyProperty

The memory strategy.

- Source: Generated code
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const memoryStrategyProperty: bedrockagentcore.CfnMemory.MemoryStrategyProperty = {
  customMemoryStrategy: {
    name: 'name',

    // the properties below are optional
    configuration: {
      episodicOverride: {
        consolidation: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
        extraction: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
        reflection: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',

          // the properties below are optional
          memoryRecordSchema: {
            metadataSchema: [{
              key: 'key',

              // the properties below are optional
              extractionConfig: {
                llmExtractionConfig: {
                  definition: 'definition',

                  // the properties below are optional
                  llmExtractionInstruction: 'llmExtractionInstruction',
                  validation: {
                    numberValidation: {
                      maxValue: 123,
                      minValue: 123,
                    },
                    stringListValidation: {
                      allowedValues: ['allowedValues'],
                      maxItems: 123,
                    },
                    stringValidation: {
                      allowedValues: ['allowedValues'],
                    },
                  },
                },
              },
              extractionType: 'extractionType',
              type: 'type',
            }],
          },
          namespaces: ['namespaces'],
          namespaceTemplates: ['namespaceTemplates'],
        },
      },
      selfManagedConfiguration: {
        historicalContextWindowSize: 123,
        invocationConfiguration: {
          payloadDeliveryBucketName: 'payloadDeliveryBucketName',
          topicArn: 'topicArn',
        },
        triggerConditions: [{
          messageBasedTrigger: {
            messageCount: 123,
          },
          timeBasedTrigger: {
            idleSessionTimeout: 123,
          },
          tokenBasedTrigger: {
            tokenCount: 123,
          },
        }],
      },
      semanticOverride: {
        consolidation: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
        extraction: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
      },
      summaryOverride: {
        consolidation: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
      },
      userPreferenceOverride: {
        consolidation: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
        extraction: {
          appendToPrompt: 'appendToPrompt',
          modelId: 'modelId',
        },
      },
    },
    createdAt: 'createdAt',
    description: 'description',
    memoryRecordSchema: {
      metadataSchema: [{
        key: 'key',

        // the properties below are optional
        extractionConfig: {
          llmExtractionConfig: {
            definition: 'definition',

            // the properties below are optional
            llmExtractionInstruction: 'llmExtractionInstruction',
            validation: {
              numberValidation: {
                maxValue: 123,
                minValue: 123,
              },
              stringListValidation: {
                allowedValues: ['allowedValues'],
                maxItems: 123,
              },
              stringValidation: {
                allowedValues: ['allowedValues'],
              },
            },
          },
        },
        extractionType: 'extractionType',
        type: 'type',
      }],
    },
    namespaces: ['namespaces'],
    namespaceTemplates: ['namespaceTemplates'],
    status: 'status',
    strategyId: 'strategyId',
    type: 'type',
    updatedAt: 'updatedAt',
  },
  episodicMemoryStrategy: {
    name: 'name',

    // the properties below are optional
    createdAt: 'createdAt',
    description: 'description',
    memoryRecordSchema: {
      metadataSchema: [{
        key: 'key',

        // the properties below are optional
        extractionConfig: {
          llmExtractionConfig: {
            definition: 'definition',

            // the properties below are optional
            llmExtractionInstruction: 'llmExtractionInstruction',
            validation: {
              numberValidation: {
                maxValue: 123,
                minValue: 123,
              },
              stringListValidation: {
                allowedValues: ['allowedValues'],
                maxItems: 123,
              },
              stringValidation: {
                allowedValues: ['allowedValues'],
              },
            },
          },
        },
        extractionType: 'extractionType',
        type: 'type',
      }],
    },
    namespaces: ['namespaces'],
    namespaceTemplates: ['namespaceTemplates'],
    reflectionConfiguration: {
      memoryRecordSchema: {
        metadataSchema: [{
          key: 'key',

          // the properties below are optional
          extractionConfig: {
            llmExtractionConfig: {
              definition: 'definition',

              // the properties below are optional
              llmExtractionInstruction: 'llmExtractionInstruction',
              validation: {
                numberValidation: {
                  maxValue: 123,
                  minValue: 123,
                },
                stringListValidation: {
                  allowedValues: ['allowedValues'],
                  maxItems: 123,
                },
                stringValidation: {
                  allowedValues: ['allowedValues'],
                },
              },
            },
          },
          extractionType: 'extractionType',
          type: 'type',
        }],
      },
      namespaces: ['namespaces'],
      namespaceTemplates: ['namespaceTemplates'],
    },
    status: 'status',
    strategyId: 'strategyId',
    type: 'type',
    updatedAt: 'updatedAt',
  },
  semanticMemoryStrategy: {
    name: 'name',

    // the properties below are optional
    createdAt: 'createdAt',
    description: 'description',
    memoryRecordSchema: {
      metadataSchema: [{
        key: 'key',

        // the properties below are optional
        extractionConfig: {
          llmExtractionConfig: {
            definition: 'definition',

            // the properties below are optional
            llmExtractionInstruction: 'llmExtractionInstruction',
            validation: {
              numberValidation: {
                maxValue: 123,
                minValue: 123,
              },
              stringListValidation: {
                allowedValues: ['allowedValues'],
                maxItems: 123,
              },
              stringValidation: {
                allowedValues: ['allowedValues'],
              },
            },
          },
        },
        extractionType: 'extractionType',
        type: 'type',
      }],
    },
    namespaces: ['namespaces'],
    namespaceTemplates: ['namespaceTemplates'],
    status: 'status',
    strategyId: 'strategyId',
    type: 'type',
    updatedAt: 'updatedAt',
  },
  summaryMemoryStrategy: {
    name: 'name',

    // the properties below are optional
    createdAt: 'createdAt',
    description: 'description',
    memoryRecordSchema: {
      metadataSchema: [{
        key: 'key',

        // the properties below are optional
        extractionConfig: {
          llmExtractionConfig: {
            definition: 'definition',

            // the properties below are optional
            llmExtractionInstruction: 'llmExtractionInstruction',
            validation: {
              numberValidation: {
                maxValue: 123,
                minValue: 123,
              },
              stringListValidation: {
                allowedValues: ['allowedValues'],
                maxItems: 123,
              },
              stringValidation: {
                allowedValues: ['allowedValues'],
              },
            },
          },
        },
        extractionType: 'extractionType',
        type: 'type',
      }],
    },
    namespaces: ['namespaces'],
    namespaceTemplates: ['namespaceTemplates'],
    status: 'status',
    strategyId: 'strategyId',
    type: 'type',
    updatedAt: 'updatedAt',
  },
  userPreferenceMemoryStrategy: {
    name: 'name',

    // the properties below are optional
    createdAt: 'createdAt',
    description: 'description',
    memoryRecordSchema: {
      metadataSchema: [{
        key: 'key',

        // the properties below are optional
        extractionConfig: {
          llmExtractionConfig: {
            definition: 'definition',

            // the properties below are optional
            llmExtractionInstruction: 'llmExtractionInstruction',
            validation: {
              numberValidation: {
                maxValue: 123,
                minValue: 123,
              },
              stringListValidation: {
                allowedValues: ['allowedValues'],
                maxItems: 123,
              },
              stringValidation: {
                allowedValues: ['allowedValues'],
              },
            },
          },
        },
        extractionType: 'extractionType',
        type: 'type',
      }],
    },
    namespaces: ['namespaces'],
    namespaceTemplates: ['namespaceTemplates'],
    status: 'status',
    strategyId: 'strategyId',
    type: 'type',
    updatedAt: 'updatedAt',
  },
};
```

## Properties

- `customMemoryStrategy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.CustomMemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.CustomMemoryStrategyProperty.html) — The memory strategy.

- `episodicMemoryStrategy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.EpisodicMemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.EpisodicMemoryStrategyProperty.html)

- `semanticMemoryStrategy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.SemanticMemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.SemanticMemoryStrategyProperty.html) — The memory strategy.

- `summaryMemoryStrategy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.SummaryMemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.SummaryMemoryStrategyProperty.html) — The memory strategy summary.

- `userPreferenceMemoryStrategy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnMemory.UserPreferenceMemoryStrategyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnMemory.UserPreferenceMemoryStrategyProperty.html) — The memory strategy.
