BedrockAgentCore / Client / get_memory_record

get_memory_record

BedrockAgentCore.Client.get_memory_record(**kwargs)

Retrieves a specific memory record from an AgentCore Memory resource.

To use this operation, you must have the bedrock-agentcore:GetMemoryRecord permission.

See also: AWS API Documentation

Request Syntax

response = client.get_memory_record(
    memoryId='string',
    memoryRecordId='string'
)
Parameters:
  • memoryId (string) –

    [REQUIRED]

    The identifier of the AgentCore Memory resource containing the memory record.

  • memoryRecordId (string) –

    [REQUIRED]

    The identifier of the memory record to retrieve.

Return type:

dict

Returns:

Response Syntax

{
    'memoryRecord': {
        'memoryRecordId': 'string',
        'content': {
            'text': 'string'
        },
        'memoryStrategyId': 'string',
        'namespaces': [
            'string',
        ],
        'createdAt': datetime(2015, 1, 1),
        'metadata': {
            'string': {
                'stringValue': 'string'
            }
        }
    }
}

Response Structure

  • (dict) –

    • memoryRecord (dict) –

      The requested memory record.

      • memoryRecordId (string) –

        The unique identifier of the memory record.

      • content (dict) –

        The content of the memory record.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: text. 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'}
        
        • text (string) –

          The text content of the memory record.

      • memoryStrategyId (string) –

        The identifier of the memory strategy associated with this record.

      • namespaces (list) –

        The namespaces associated with this memory record. Namespaces help organize and categorize memory records.

        • (string) –

      • createdAt (datetime) –

        The timestamp when the memory record was created.

      • metadata (dict) –

        A map of metadata key-value pairs associated with a memory record.

        • (string) –

          • (dict) –

            Value associated with the eventMetadata key.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: stringValue. 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'}
            
            • stringValue (string) –

              Value associated with the eventMetadata key.

Exceptions

  • BedrockAgentCore.Client.exceptions.ServiceQuotaExceededException

  • BedrockAgentCore.Client.exceptions.ThrottledException

  • BedrockAgentCore.Client.exceptions.ServiceException

  • BedrockAgentCore.Client.exceptions.AccessDeniedException

  • BedrockAgentCore.Client.exceptions.ValidationException

  • BedrockAgentCore.Client.exceptions.InvalidInputException

  • BedrockAgentCore.Client.exceptions.ResourceNotFoundException