MemoryStrategyProperty Struct
The memory strategy.
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
customMemoryStrategyoptionalIResolvable | CfnMemory.CustomMemoryStrategyPropertycustom_memory_strategyoptionaltyping.Union[IResolvable, CustomMemoryStrategyProperty]customMemoryStrategyoptionalIResolvableCustomMemoryStrategyoptionalIResolvableCustomMemoryStrategyoptionalinterface{}#The memory strategy.
episodicMemoryStrategyoptionalIResolvable | CfnMemory.EpisodicMemoryStrategyPropertyepisodic_memory_strategyoptionaltyping.Union[IResolvable, EpisodicMemoryStrategyProperty]episodicMemoryStrategyoptionalIResolvableEpisodicMemoryStrategyoptionalIResolvableEpisodicMemoryStrategyoptionalinterface{}#semanticMemoryStrategyoptionalIResolvable | CfnMemory.SemanticMemoryStrategyPropertysemantic_memory_strategyoptionaltyping.Union[IResolvable, SemanticMemoryStrategyProperty]semanticMemoryStrategyoptionalIResolvableSemanticMemoryStrategyoptionalIResolvableSemanticMemoryStrategyoptionalinterface{}#The memory strategy.
summaryMemoryStrategyoptionalIResolvable | CfnMemory.SummaryMemoryStrategyPropertysummary_memory_strategyoptionaltyping.Union[IResolvable, SummaryMemoryStrategyProperty]summaryMemoryStrategyoptionalIResolvableSummaryMemoryStrategyoptionalIResolvableSummaryMemoryStrategyoptionalinterface{}#The memory strategy summary.
userPreferenceMemoryStrategyoptionalIResolvable | CfnMemory.UserPreferenceMemoryStrategyPropertyuser_preference_memory_strategyoptionaltyping.Union[IResolvable, UserPreferenceMemoryStrategyProperty]userPreferenceMemoryStrategyoptionalIResolvableUserPreferenceMemoryStrategyoptionalIResolvableUserPreferenceMemoryStrategyoptionalinterface{}#The memory strategy.