Skip to content
v2.274.0

CfnMemoryProps Struct ​

Properties for defining a CfnMemory.

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 cfnMemoryProps: bedrockagentcore.CfnMemoryProps = {
  eventExpiryDuration: 123,
  name: 'name',

  // the properties below are optional
  description: 'description',
  encryptionKeyArn: 'encryptionKeyArn',
  indexedKeys: [{
    key: 'key',
    type: 'type',
  }],
  memoryExecutionRoleArn: 'memoryExecutionRoleArn',
  memoryStrategies: [{
    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',
    },
  }],
  namespaceKeys: [{
    key: 'key',

    // the properties below are optional
    validation: {
      allowedValues: ['allowedValues'],
      regexPattern: 'regexPattern',
    },
  }],
  streamDeliveryResources: {
    resources: [{
      kinesis: {
        contentConfigurations: [{
          type: 'type',

          // the properties below are optional
          level: 'level',
        }],
        dataStreamArn: 'dataStreamArn',
      },
    }],
  },
  tags: {
    tagsKey: 'tags',
  },
};

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
Description of the Memory resource.
encryptionKeyArnoptionalstringencryption_key_arnoptionalstrencryptionKeyArnoptionalStringEncryptionKeyArnoptionalstringEncryptionKeyArnoptional*string#
The memory encryption key Amazon Resource Name (ARN).
eventExpiryDurationnumberevent_expiry_durationint | floateventExpiryDurationNumberEventExpiryDurationdoubleEventExpiryDuration*float64required#
The event expiry configuration.
indexedKeysoptionalIResolvable | IResolvable | CfnMemory.IndexedKeyProperty[]indexed_keysoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, IndexedKeyProperty]]]indexedKeysoptionalIResolvableIndexedKeysoptionalIResolvableIndexedKeysoptionalinterface{}#
List of indexed keys for the memory.
memoryExecutionRoleArnoptionalstringmemory_execution_role_arnoptionalstrmemoryExecutionRoleArnoptionalStringMemoryExecutionRoleArnoptionalstringMemoryExecutionRoleArnoptional*string#
The memory role ARN.
memoryStrategiesoptionalIResolvable | IResolvable | CfnMemory.MemoryStrategyProperty[]memory_strategiesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MemoryStrategyProperty]]]memoryStrategiesoptionalIResolvableMemoryStrategiesoptionalIResolvableMemoryStrategiesoptionalinterface{}#
The memory strategies.
namestringnamestrnameStringNamestringName*stringrequired#
The memory name.
namespaceKeysoptionalIResolvable | IResolvable | CfnMemory.NamespaceKeyEntryProperty[]namespace_keysoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, NamespaceKeyEntryProperty]]]namespaceKeysoptionalIResolvableNamespaceKeysoptionalIResolvableNamespaceKeysoptionalinterface{}#
List of namespace variable key definitions for a memory resource.
streamDeliveryResourcesoptionalIResolvable | CfnMemory.StreamDeliveryResourcesPropertystream_delivery_resourcesoptionaltyping.Union[IResolvable, StreamDeliveryResourcesProperty]streamDeliveryResourcesoptionalIResolvableStreamDeliveryResourcesoptionalIResolvableStreamDeliveryResourcesoptionalinterface{}#
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
The tags for the resources.