ManagedStrategyProps
- class aws_cdk.aws_bedrock_agentcore_alpha.ManagedStrategyProps(*, name, description=None, namespaces, custom_consolidation=None, custom_extraction=None)
Bases:
MemoryStrategyCommonProps(experimental) Configuration parameters for a memory strategy that can override existing built-in default prompts/models.
- Parameters:
name (
str) – (experimental) The name for the strategy.description (
Optional[str]) – (experimental) The description of the strategy. Default: No descriptionnamespaces (
Sequence[str]) – (experimental) The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/). Use a hierarchical format separated by forward slashes (/) to organize namespaces logically. You can include these defined variables: - {sessionId} - the user identifier to be created in the CreateEvent API - {memoryStrategyId} - an identifier for an extraction strategy - {sessionId} - an identifier for each session Example namespace path: /strategies/{memoryStrategyId}/actions/{actionId}/sessions/{sessionId} After memory creation, this namespace might look like: /actor/actor-3afc5aa8fef9/strategy/summarization-fy5c5fwc7/session/session-qj7tpd1kvr8custom_consolidation (
Union[OverrideConfig,Dict[str,Any],None]) – (experimental) The configuration for the custom consolidation. This configuration provides customization to how the model identifies and extracts relevant information for memory storage. Default: - No custom extractioncustom_extraction (
Union[OverrideConfig,Dict[str,Any],None]) – (experimental) The configuration for the custom extraction. This configuration provides customization to how the model identifies and extracts relevant information for memory storage. Default: - No custom extraction
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
# Create memory with built-in strategies memory = agentcore.Memory(self, "MyMemory", memory_name="my_memory", description="Memory with built-in strategies", expiration_duration=cdk.Duration.days(90), memory_strategies=[ agentcore.MemoryStrategy.using_user_preference( name="CustomerPreferences", namespaces=["support/customer/{actorId}/preferences"] ), agentcore.MemoryStrategy.using_semantic( name="CustomerSupportSemantic", namespaces=["support/customer/{actorId}/semantic"] ) ] )
Attributes
- custom_consolidation
(experimental) The configuration for the custom consolidation.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
- Default:
No custom extraction
- Stability:
experimental
- Required:
No
- custom_extraction
(experimental) The configuration for the custom extraction.
This configuration provides customization to how the model identifies and extracts relevant information for memory storage.
- Default:
No custom extraction
- Stability:
experimental
- Required:
No
- description
(experimental) The description of the strategy.
- Default:
No description
- Stability:
experimental
- Required:
No
- name
(experimental) The name for the strategy.
- Stability:
experimental
- Required:
Yes
- namespaces
(experimental) The namespaces for the strategy Represents a namespace for organizing memory data Use a hierarchical format separated by forward slashes (/).
Use a hierarchical format separated by forward slashes (/) to organize namespaces logically. You can include these defined variables:
{sessionId} - the user identifier to be created in the CreateEvent API
{memoryStrategyId} - an identifier for an extraction strategy
{sessionId} - an identifier for each session
Example namespace path: /strategies/{memoryStrategyId}/actions/{actionId}/sessions/{sessionId}
After memory creation, this namespace might look like: /actor/actor-3afc5aa8fef9/strategy/summarization-fy5c5fwc7/session/session-qj7tpd1kvr8
- Stability:
experimental
- Required:
Yes