:doc:`BedrockAgentCoreControl <../../bedrock-agentcore-control>` / Client / get_memory

**********
get_memory
**********



.. py:method:: BedrockAgentCoreControl.Client.get_memory(**kwargs)

  

  Retrieve an existing Amazon Bedrock AgentCore Memory resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-control-2023-06-05/GetMemory>`_  


  **Request Syntax**
  ::

    response = client.get_memory(
        memoryId='string',
        view='full'|'without_decryption'
    )
    
  :type memoryId: string
  :param memoryId: **[REQUIRED]** 

    The unique identifier of the memory to retrieve.

    

  
  :type view: string
  :param view: 

    The level of detail to return for the memory.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'memory': {
              'arn': 'string',
              'id': 'string',
              'name': 'string',
              'description': 'string',
              'encryptionKeyArn': 'string',
              'memoryExecutionRoleArn': 'string',
              'eventExpiryDuration': 123,
              'status': 'CREATING'|'ACTIVE'|'FAILED'|'DELETING',
              'failureReason': 'string',
              'createdAt': datetime(2015, 1, 1),
              'updatedAt': datetime(2015, 1, 1),
              'strategies': [
                  {
                      'strategyId': 'string',
                      'name': 'string',
                      'description': 'string',
                      'configuration': {
                          'type': 'SEMANTIC_OVERRIDE'|'SUMMARY_OVERRIDE'|'USER_PREFERENCE_OVERRIDE'|'SELF_MANAGED'|'EPISODIC_OVERRIDE',
                          'extraction': {
                              'customExtractionConfiguration': {
                                  'semanticExtractionOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  },
                                  'userPreferenceExtractionOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  },
                                  'episodicExtractionOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  }
                              }
                          },
                          'consolidation': {
                              'customConsolidationConfiguration': {
                                  'semanticConsolidationOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  },
                                  'summaryConsolidationOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  },
                                  'userPreferenceConsolidationOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  },
                                  'episodicConsolidationOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string'
                                  }
                              }
                          },
                          'reflection': {
                              'customReflectionConfiguration': {
                                  'episodicReflectionOverride': {
                                      'appendToPrompt': 'string',
                                      'modelId': 'string',
                                      'namespaces': [
                                          'string',
                                      ]
                                  }
                              },
                              'episodicReflectionConfiguration': {
                                  'namespaces': [
                                      'string',
                                  ]
                              }
                          },
                          'selfManagedConfiguration': {
                              'triggerConditions': [
                                  {
                                      'messageBasedTrigger': {
                                          'messageCount': 123
                                      },
                                      'tokenBasedTrigger': {
                                          'tokenCount': 123
                                      },
                                      'timeBasedTrigger': {
                                          'idleSessionTimeout': 123
                                      }
                                  },
                              ],
                              'invocationConfiguration': {
                                  'topicArn': 'string',
                                  'payloadDeliveryBucketName': 'string'
                              },
                              'historicalContextWindowSize': 123
                          }
                      },
                      'type': 'SEMANTIC'|'SUMMARIZATION'|'USER_PREFERENCE'|'CUSTOM'|'EPISODIC',
                      'namespaces': [
                          'string',
                      ],
                      'createdAt': datetime(2015, 1, 1),
                      'updatedAt': datetime(2015, 1, 1),
                      'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **memory** *(dict) --* 

        The retrieved AgentCore Memory resource details.

        
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the memory.

          
        

        - **id** *(string) --* 

          The unique identifier of the memory.

          
        

        - **name** *(string) --* 

          The name of the memory.

          
        

        - **description** *(string) --* 

          The description of the memory.

          
        

        - **encryptionKeyArn** *(string) --* 

          The ARN of the KMS key used to encrypt the memory.

          
        

        - **memoryExecutionRoleArn** *(string) --* 

          The ARN of the IAM role that provides permissions for the memory.

          
        

        - **eventExpiryDuration** *(integer) --* 

          The number of days after which memory events will expire.

          
        

        - **status** *(string) --* 

          The current status of the memory.

          
        

        - **failureReason** *(string) --* 

          The reason for failure if the memory is in a failed state.

          
        

        - **createdAt** *(datetime) --* 

          The timestamp when the memory was created.

          
        

        - **updatedAt** *(datetime) --* 

          The timestamp when the memory was last updated.

          
        

        - **strategies** *(list) --* 

          The list of memory strategies associated with this memory.

          
          

          - *(dict) --* 

            Contains information about a memory strategy.

            
            

            - **strategyId** *(string) --* 

              The unique identifier of the memory strategy.

              
            

            - **name** *(string) --* 

              The name of the memory strategy.

              
            

            - **description** *(string) --* 

              The description of the memory strategy.

              
            

            - **configuration** *(dict) --* 

              The configuration of the memory strategy.

              
              

              - **type** *(string) --* 

                The type of override for the strategy configuration.

                
              

              - **extraction** *(dict) --* 

                The extraction configuration for the memory strategy.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``customExtractionConfiguration``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


              
                

                - **customExtractionConfiguration** *(dict) --* 

                  The custom extraction configuration.

                  .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``semanticExtractionOverride``, ``userPreferenceExtractionOverride``, ``episodicExtractionOverride``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                
                  

                  - **semanticExtractionOverride** *(dict) --* 

                    The semantic extraction override configuration.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text to append to the prompt for semantic extraction.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID to use for semantic extraction.

                      
                
                  

                  - **userPreferenceExtractionOverride** *(dict) --* 

                    The user preference extraction override configuration.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text to append to the prompt for user preference extraction.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID to use for user preference extraction.

                      
                
                  

                  - **episodicExtractionOverride** *(dict) --* 

                    The configurations to override the default extraction step for the episodic memory strategy.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text appended to the prompt for the extraction step of the episodic memory strategy.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID used for the extraction step of the episodic memory strategy.

                      
                
              
            
              

              - **consolidation** *(dict) --* 

                The consolidation configuration for the memory strategy.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``customConsolidationConfiguration``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


              
                

                - **customConsolidationConfiguration** *(dict) --* 

                  The custom consolidation configuration.

                  .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``semanticConsolidationOverride``, ``summaryConsolidationOverride``, ``userPreferenceConsolidationOverride``, ``episodicConsolidationOverride``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                
                  

                  - **semanticConsolidationOverride** *(dict) --* 

                    The semantic consolidation override configuration.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text to append to the prompt for semantic consolidation.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID to use for semantic consolidation.

                      
                
                  

                  - **summaryConsolidationOverride** *(dict) --* 

                    The summary consolidation override configuration.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text to append to the prompt for summary consolidation.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID to use for summary consolidation.

                      
                
                  

                  - **userPreferenceConsolidationOverride** *(dict) --* 

                    The user preference consolidation override configuration.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text to append to the prompt for user preference consolidation.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID to use for user preference consolidation.

                      
                
                  

                  - **episodicConsolidationOverride** *(dict) --* 

                    The configurations to override the default consolidation step for the episodic memory strategy.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text appended to the prompt for the consolidation step of the episodic memory strategy.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID used for the consolidation step of the episodic memory strategy.

                      
                
              
            
              

              - **reflection** *(dict) --* 

                The reflection configuration for the memory strategy.

                .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``customReflectionConfiguration``, ``episodicReflectionConfiguration``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


              
                

                - **customReflectionConfiguration** *(dict) --* 

                  The configuration for a custom reflection strategy.

                  .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``episodicReflectionOverride``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                
                  

                  - **episodicReflectionOverride** *(dict) --* 

                    The configuration for a reflection strategy to override the default one.

                    
                    

                    - **appendToPrompt** *(string) --* 

                      The text appended to the prompt for the reflection step of the episodic memory strategy.

                      
                    

                    - **modelId** *(string) --* 

                      The model ID used for the reflection step of the episodic memory strategy.

                      
                    

                    - **namespaces** *(list) --* 

                      The namespaces over which reflections were created. Can be less nested than the episodic namespaces.

                      
                      

                      - *(string) --* 
                  
                
              
                

                - **episodicReflectionConfiguration** *(dict) --* 

                  The configuration for the episodic reflection strategy.

                  
                  

                  - **namespaces** *(list) --* 

                    The namespaces for which to create reflections. Can be less nested than the episodic namespaces.

                    
                    

                    - *(string) --* 
                
              
            
              

              - **selfManagedConfiguration** *(dict) --* 

                Self-managed configuration settings.

                
                

                - **triggerConditions** *(list) --* 

                  A list of conditions that trigger memory processing.

                  
                  

                  - *(dict) --* 

                    Condition that triggers memory processing.

                    .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``messageBasedTrigger``, ``tokenBasedTrigger``, ``timeBasedTrigger``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


                  
                    

                    - **messageBasedTrigger** *(dict) --* 

                      Message based trigger configuration.

                      
                      

                      - **messageCount** *(integer) --* 

                        The number of messages that trigger memory processing.

                        
                  
                    

                    - **tokenBasedTrigger** *(dict) --* 

                      Token based trigger configuration.

                      
                      

                      - **tokenCount** *(integer) --* 

                        Number of tokens that trigger memory processing.

                        
                  
                    

                    - **timeBasedTrigger** *(dict) --* 

                      Time based trigger configuration.

                      
                      

                      - **idleSessionTimeout** *(integer) --* 

                        Idle session timeout (seconds) that triggers memory processing.

                        
                  
                
              
                

                - **invocationConfiguration** *(dict) --* 

                  The configuration to use when invoking memory processing.

                  
                  

                  - **topicArn** *(string) --* 

                    The ARN of the SNS topic for job notifications.

                    
                  

                  - **payloadDeliveryBucketName** *(string) --* 

                    The S3 bucket name for event payload delivery.

                    
              
                

                - **historicalContextWindowSize** *(integer) --* 

                  The number of historical messages to include in processing context.

                  
            
          
            

            - **type** *(string) --* 

              The type of the memory strategy.

              
            

            - **namespaces** *(list) --* 

              The namespaces associated with the memory strategy.

              
              

              - *(string) --* 
          
            

            - **createdAt** *(datetime) --* 

              The timestamp when the memory strategy was created.

              
            

            - **updatedAt** *(datetime) --* 

              The timestamp when the memory strategy was last updated.

              
            

            - **status** *(string) --* 

              The current status of the memory strategy.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ServiceException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ThrottledException`

  