class SelfManagedMemoryStrategy
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.SelfManagedMemoryStrategy |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#SelfManagedMemoryStrategy |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.SelfManagedMemoryStrategy |
Python | aws_cdk.aws_bedrock_agentcore_alpha.SelfManagedMemoryStrategy |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป SelfManagedMemoryStrategy |
Implements
IMemory
Use AgentCore memory for event storage with custom triggers.
Define memory processing logic in your own environment.
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 cdk from 'aws-cdk-lib';
import { aws_sns as sns } from 'aws-cdk-lib';
declare const topic: sns.Topic;
const selfManagedMemoryStrategy = new bedrock_agentcore_alpha.SelfManagedMemoryStrategy(bedrock_agentcore_alpha.MemoryStrategyType.SUMMARIZATION, {
invocationConfiguration: {
s3Location: {
bucketName: 'bucketName',
objectKey: 'objectKey',
// the properties below are optional
objectVersion: 'objectVersion',
},
topic: topic,
},
name: 'name',
// the properties below are optional
description: 'description',
historicalContextWindowSize: 123,
triggerConditions: {
messageBasedTrigger: 123,
timeBasedTrigger: cdk.Duration.minutes(30),
tokenBasedTrigger: 123,
},
});
Initializer
new SelfManagedMemoryStrategy(strategyType: MemoryStrategyType, props: SelfManagedStrategyProps)
Parameters
- strategyType
Memoryโ The type of memory strategy.Strategy Type - props
SelfManaged Strategy Props
Properties
| Name | Type | Description |
|---|---|---|
| historical | number | Historical context window size for self managed memory strategy. |
| invocation | Invocation | Invocation configuration for self managed memory strategy. |
| name | string | The name of the memory strategy. |
| strategy | Memory | The type of memory strategy. |
| trigger | Trigger | Trigger conditions for self managed memory strategy. |
| description? | string | The description of the memory strategy. |
historicalContextWindowSize
Type:
number
Historical context window size for self managed memory strategy.
invocationConfiguration
Type:
Invocation
Invocation configuration for self managed memory strategy.
name
Type:
string
The name of the memory strategy.
strategyType
Type:
Memory
The type of memory strategy.
triggerConditions
Type:
Trigger
Trigger conditions for self managed memory strategy.
description?
Type:
string
(optional)
The description of the memory strategy.
Methods
| Name | Description |
|---|---|
| grant(grantee) | Grants the necessary permissions to the role. |
| render() | Renders internal attributes to CloudFormation. |
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 internal attributes to CloudFormation.

.NET
Go
Java
Python
TypeScript (