# CustomMemoryStrategyProperty

The memory strategy.

- Source: Generated code
- Type last changed: v2.253.0 · 6 May 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 customMemoryStrategyProperty: bedrockagentcore.CfnMemory.CustomMemoryStrategyProperty = {
  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',
};
```

## Properties

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

- `createdAt`: string — Creation timestamp of the memory strategy.

- `description`: string — The memory strategy description.

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

- `name`: string (required) — The memory strategy name.

- `namespaces`: string[] — The memory strategy namespaces.

- `namespaceTemplates`: string[] — List of namespaces for memory strategy.

- `status`: string — The memory strategy status.

- `strategyId`: string — The memory strategy ID.

- `type`: string — The memory strategy type.

- `updatedAt`: string — The memory strategy update date and time.
