Show / Hide Table of Contents

Class MemoryProps

(experimental) Properties for creating a Memory resource.

Inheritance
object
MemoryProps
Implements
IMemoryProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class MemoryProps : IMemoryProps
Syntax (vb)
Public Class MemoryProps Implements IMemoryProps
Remarks

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
// Create a custom execution role
             var executionRole = new Role(this, "MemoryExecutionRole", new RoleProps {
                 AssumedBy = new ServicePrincipal("bedrock-agentcore.amazonaws.com"),
                 ManagedPolicies = new [] { ManagedPolicy.FromAwsManagedPolicyName("AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy") }
             });

             // Create memory with custom execution role
             var memory = new Memory(this, "MyMemory", new MemoryProps {
                 MemoryName = "my_memory",
                 Description = "Memory with custom execution role",
                 ExpirationDuration = Duration.Days(90),
                 ExecutionRole = executionRole
             });

Synopsis

Constructors

MemoryProps()

(experimental) Properties for creating a Memory resource.

Properties

Description

(experimental) Optional description for the memory Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

ExecutionRole

(experimental) The IAM role that provides permissions for the memory to access AWS services when using custom strategies.

ExpirationDuration

(experimental) Short-term memory expiration in days (between 7 and 365).

KmsKey

(experimental) Custom KMS key to use for encryption.

MemoryName

(experimental) The name of the memory Valid characters are a-z, A-Z, 0-9, _ (underscore) The name must start with a letter and can be up to 48 characters long Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}.

MemoryStrategies

(experimental) If you need long-term memory for context recall across sessions, you can setup memory extraction strategies to extract the relevant memory from the raw events.

Tags

(experimental) Tags (optional) A list of key:value pairs of tags to apply to this memory resource.

Constructors

MemoryProps()

(experimental) Properties for creating a Memory resource.

public MemoryProps()
Remarks

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
// Create a custom execution role
             var executionRole = new Role(this, "MemoryExecutionRole", new RoleProps {
                 AssumedBy = new ServicePrincipal("bedrock-agentcore.amazonaws.com"),
                 ManagedPolicies = new [] { ManagedPolicy.FromAwsManagedPolicyName("AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy") }
             });

             // Create memory with custom execution role
             var memory = new Memory(this, "MyMemory", new MemoryProps {
                 MemoryName = "my_memory",
                 Description = "Memory with custom execution role",
                 ExpirationDuration = Duration.Days(90),
                 ExecutionRole = executionRole
             });

Properties

Description

(experimental) Optional description for the memory Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

public string? Description { get; set; }
Property Value

string

Remarks

Default: - No description

Stability: Experimental

ExecutionRole

(experimental) The IAM role that provides permissions for the memory to access AWS services when using custom strategies.

public IRole? ExecutionRole { get; set; }
Property Value

IRole

Remarks

Default: - A new role will be created.

Stability: Experimental

ExpirationDuration

(experimental) Short-term memory expiration in days (between 7 and 365).

public Duration? ExpirationDuration { get; set; }
Property Value

Duration

Remarks

Sets the short-term (raw event) memory retention. Events older than the specified duration will expire and no longer be stored.

Default: - 90 days

Stability: Experimental

KmsKey

(experimental) Custom KMS key to use for encryption.

public IKey? KmsKey { get; set; }
Property Value

IKey

Remarks

Default: - Your data is encrypted with a key that AWS owns and manages for you

Stability: Experimental

MemoryName

(experimental) The name of the memory Valid characters are a-z, A-Z, 0-9, _ (underscore) The name must start with a letter and can be up to 48 characters long Pattern: [a-zA-Z][a-zA-Z0-9_]{0,47}.

public string MemoryName { get; set; }
Property Value

string

Remarks

Stability: Experimental

MemoryStrategies

(experimental) If you need long-term memory for context recall across sessions, you can setup memory extraction strategies to extract the relevant memory from the raw events.

public IMemoryStrategy[]? MemoryStrategies { get; set; }
Property Value

IMemoryStrategy[]

Remarks

Default: - No extraction strategies (short term memory only)

Stability: Experimental

Tags

(experimental) Tags (optional) A list of key:value pairs of tags to apply to this memory resource.

public IDictionary<string, string>? Tags { get; set; }
Property Value

IDictionary<string, string>

Remarks

Default: - no tags

Stability: Experimental

Implements

IMemoryProps
Back to top Generated by DocFX