Class Memory
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.bedrockagentcore.MemoryBase
software.amazon.awscdk.services.bedrockagentcore.Memory
- All Implemented Interfaces:
IMemoryRef,IEnvironmentAware,IResource,IMemory,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-19T19:44:37.154Z")
@Stability(Stable)
public class Memory
extends MemoryBase
Long-term memory store for extracted insights like user preferences, semantic facts and summaries.
Enables knowledge retention across sessions by storing user preferences (e.g. coding style), semantic facts (e.g. learned info) and interaction summaries for context optimization.
Example:
// Create a custom execution role
Role executionRole = Role.Builder.create(this, "MemoryExecutionRole")
.assumedBy(new ServicePrincipal("bedrock-agentcore.amazonaws.com"))
.managedPolicies(List.of(ManagedPolicy.fromAwsManagedPolicyName("AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy")))
.build();
// Create memory with custom execution role
Memory memory = Memory.Builder.create(this, "MyMemory")
.memoryName("my_memory")
.description("Memory with custom execution role")
.expirationDuration(Duration.days(90))
.executionRole(executionRole)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.bedrockagentcore.IMemory
IMemory.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMemory(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedMemory(software.amazon.jsii.JsiiObjectRef objRef) Memory(software.constructs.Construct scope, String id, MemoryProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMemoryStrategy(IMemoryStrategy memoryStrategy) Add memory strategy to the memory.static IMemoryfromMemoryAttributes(software.constructs.Construct scope, String id, MemoryAttributes attrs) Creates an Memory reference from an existing memory's attributes.The created timestamp of the memory.The description of the memory.The execution role of the memory.The expiration days of the memory.The failure reason of the browser.The principal to grant permissions to.The KMS key used to encrypt the memory.The ARN of the memory resource.The id of the memory.The name of the memory.The memory strategies used by the memory.The status of the memory.getTags()Tags applied to this browser resource A map of key-value pairs for resource tagging.The updated at timestamp of the memory.Methods inherited from class software.amazon.awscdk.services.bedrockagentcore.MemoryBase
getMemoryRef, grant, grantAdmin, grantDelete, grantDeleteLongTermMemory, grantDeleteShortTermMemory, grantFullAccess, grantRead, grantReadLongTermMemory, grantReadShortTermMemory, grantWrite, metric, metric, metricErrorsForApiOperation, metricErrorsForApiOperation, metricEventCreationCount, metricEventCreationCount, metricForApiOperation, metricForApiOperation, metricInvocationsForApiOperation, metricInvocationsForApiOperation, metricLatencyForApiOperation, metricLatencyForApiOperation, metricMemoryRecordCreationCount, metricMemoryRecordCreationCountMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Memory
protected Memory(software.amazon.jsii.JsiiObjectRef objRef) -
Memory
protected Memory(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Memory
@Stability(Stable) public Memory(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable MemoryProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Memory
- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromMemoryAttributes
@Stability(Stable) @NotNull public static IMemory fromMemoryAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull MemoryAttributes attrs) Creates an Memory reference from an existing memory's attributes.- Parameters:
scope-- The construct scope.
id-- Identifier of the construct.
attrs-- Attributes of the existing browser custom.
- Returns:
- An IBrowserCustom reference to the existing browser
-
addMemoryStrategy
Add memory strategy to the memory.Default: - No memory strategies.
- Parameters:
memoryStrategy- This parameter is required.
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable- Specified by:
getGrantPrincipalin classMemoryBase
-
getMemoryArn
The ARN of the memory resource.- Specified by:
getMemoryArnin interfaceIMemory- Specified by:
getMemoryArnin classMemoryBase
-
getMemoryId
The id of the memory.- Specified by:
getMemoryIdin interfaceIMemory- Specified by:
getMemoryIdin classMemoryBase
-
getMemoryName
The name of the memory. -
getMemoryStrategies
The memory strategies used by the memory. -
getCreatedAt
The created timestamp of the memory.- Specified by:
getCreatedAtin interfaceIMemory- Specified by:
getCreatedAtin classMemoryBase
-
getDescription
The description of the memory. -
getExecutionRole
The execution role of the memory.- Specified by:
getExecutionRolein interfaceIMemory- Specified by:
getExecutionRolein classMemoryBase
-
getExpirationDuration
The expiration days of the memory. -
getFailureReason
The failure reason of the browser. -
getKmsKey
The KMS key used to encrypt the memory.- Specified by:
getKmsKeyin interfaceIMemory- Specified by:
getKmsKeyin classMemoryBase
-
getStatus
The status of the memory.- Specified by:
getStatusin interfaceIMemory- Specified by:
getStatusin classMemoryBase
-
getTags
Tags applied to this browser resource A map of key-value pairs for resource tagging.Default: - No tags applied
-
getUpdatedAt
The updated at timestamp of the memory.- Specified by:
getUpdatedAtin interfaceIMemory- Specified by:
getUpdatedAtin classMemoryBase
-