interface OverrideConfig
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.OverrideConfig |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#OverrideConfig |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.OverrideConfig |
Python | aws_cdk.aws_bedrock_agentcore_alpha.OverrideConfig |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha » OverrideConfig |
Configuration for overriding model and prompt template.
Example
// Create a custom semantic memory strategy
const customSemanticStrategy = agentcore.MemoryStrategy.usingSemantic({
name: "customSemanticStrategy",
description: "Custom semantic memory strategy",
namespaces: ["/custom/strategies/{memoryStrategyId}/actors/{actorId}"],
customConsolidation: {
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
appendToPrompt: "Custom consolidation prompt for semantic memory",
},
customExtraction: {
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
appendToPrompt: "Custom extraction prompt for semantic memory",
},
});
// Create memory with custom strategy
const memory = new agentcore.Memory(this, "MyMemory", {
memoryName: "my-custom-memory",
description: "Memory with custom strategy",
expirationDuration: cdk.Duration.days(90),
memoryStrategies: [customSemanticStrategy],
});
Properties
| Name | Type | Description |
|---|---|---|
| append | string | The prompt that will be appended to the system prompt to define the model's memory consolidation/extraction strategy. |
| model | IBedrock | The model to use for consolidation/extraction. |
appendToPrompt
Type:
string
The prompt that will be appended to the system prompt to define the model's memory consolidation/extraction strategy.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage. You can use the default user prompt or create a customized one.
model
Type:
IBedrock
The model to use for consolidation/extraction.

.NET
Go
Java
Python
TypeScript (