New York's banking regulator has reached an agreement with four of the banks developing an online message service to store records for potential access by regulators and other officials.

As part of agreement, the banks — Bank of New York Mellon, Credit Suisse, Deutsche Bank and Goldman Sachs — agreed to retain records for seven years of all electronic communications sent through the online services. Those banks are among a total of 14 banks and other financial institutions that are backing Symphony Communication Services, which is developing the messaging technology.

Also in the agreement, the four banks will store duplicate copies of encryption keys for their messages. The keys will be held by custodians not affiliated with the banks.

"This is a critical issue since chats and other electronic records have provided key evidence in investigations of wrongdoing on Wall Street," Anthony Albanese, acting director of the New York State Department of Financial Services, said in a news release. "It is vital that regulators act to ensure that these records do not fall into a digital black hole."

Policymakers including Sen. Elizabeth Warren, D-Mass., had expressed concerns the message service would help banks avoid regulations; additionally, some of the same banks involved with Symphony are targets in rate-rigging probes.

Corrected September 14, 2015 at 1:10PM: An earlier version of this story misidentified Bank of America as one of the banks involved with the agreement. It was Bank of New York Mellon.