class ManagedMemoryStrategy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.ManagedMemoryStrategy |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#ManagedMemoryStrategy |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.ManagedMemoryStrategy |
Python | aws_cdk.aws_bedrock_agentcore_alpha.ManagedMemoryStrategy |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป ManagedMemoryStrategy |
Implements
IMemory
Managed memory strategy that handles both built-in and override configurations.
This strategy can be used for quick setup with built-in defaults or customized with specific models and prompt templates.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';
declare const bedrockInvokable: bedrock_alpha.IBedrockInvokable;
const managedMemoryStrategy = new bedrock_agentcore_alpha.ManagedMemoryStrategy(bedrock_agentcore_alpha.MemoryStrategyType.SUMMARIZATION, {
name: 'name',
namespaces: ['namespaces'],
// the properties below are optional
customConsolidation: {
appendToPrompt: 'appendToPrompt',
model: bedrockInvokable,
},
customExtraction: {
appendToPrompt: 'appendToPrompt',
model: bedrockInvokable,
},
description: 'description',
reflectionConfiguration: {
namespaces: ['namespaces'],
},
});
Initializer
new ManagedMemoryStrategy(strategyType: MemoryStrategyType, props: ManagedStrategyProps)
Parameters
- strategyType
Memoryโ the strategy type.Strategy Type - props
Managedโ the properties for the strategy.Strategy Props
Constructor to create a new managed memory strategy.
Properties
| Name | Type | Description |
|---|---|---|
| name | string | The name of the memory strategy. |
| namespaces | string[] | The namespaces for the strategy. |
| strategy | Memory | The type of memory strategy. |
| consolidation | Override | The configuration for the custom consolidation. |
| description? | string | The description of the memory strategy. |
| extraction | Override | The configuration for the custom extraction. |
| reflection | Episodic | The configuration for episodic reflection. |
name
Type:
string
The name of the memory strategy.
namespaces
Type:
string[]
The namespaces for the strategy.
strategyType
Type:
Memory
The type of memory strategy.
consolidationOverride?
Type:
Override
(optional)
The configuration for the custom consolidation.
description?
Type:
string
(optional)
The description of the memory strategy.
extractionOverride?
Type:
Override
(optional)
The configuration for the custom extraction.
reflectionConfiguration?
Type:
Episodic
(optional)
The configuration for episodic reflection.
Methods
| Name | Description |
|---|---|
| grant(grantee) | Grants the necessary permissions to the role. |
| render() | Renders the network configuration as a CloudFormation property. |
grant(grantee)
public grant(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ - The grantee to grant permissions to.
Returns
Grants the necessary permissions to the role.
[disable-awslint:no-grants]
render()
public render(): MemoryStrategyProperty
Returns
Renders the network configuration as a CloudFormation property.

.NET
Go
Java
Python
TypeScript (