The Trump administration and Congress are just days away from finalizing an agreement on what information U.S. intelligence agencies can share with the House and Senate intelligence committees investigating Russia's influence on the election, according to a congressional staffer with knowledge of the process.

Those committees are also investigating who was behind the leaks of information related to contacts between members of President Trump's transition team and foreign officials.

The negotiations have been taking place for weeks, and are needed because of the separation of powers under the Constitution. Members of the legislative branch don't always have a right to information produced by the executive branch, which in this case would be the agencies like the FBI and the National Security Agency.

The final deal will likely determine how much the intelligence committees will have at their disposal as the investigations move forward.

But another issue is how quickly the administration will be able to deliver that information to Congress. Part of the challenge in sharing the documents involves the basic nature of the documents themselves — in this case, hundreds if not thousands of surveillance documents with the masked names of Americans.

Because documents created under the Foreign Surveillance Intelligence Act (FISA) have so many safeguards built into them, and also because they're generally only requested from the intelligence agencies in small batches, there is no way to process them quickly in large batches in a way that ensures they are properly redacted. The staffer said it was almost a manual process of producing the FISA documents one at a time because of the automatic "defenses" that are in place for privacy and security reasons.

For weeks, the committees have been receiving information under an "interim" agreement, the staffer said. Negotiations that have to be completed on the remaining information would answer specific questions such as who gets to see which documents, and whether the documents would be limited to key lawmakers, such as committee chairmen and ranking members.

Other details could include how information is accessed. For example, agreements like these often stipulate that some of the documents never leave the possession of the intelligence agency. In those cases, lawmakers would have to go to a "reading room" to view the documents, and would be unable to remove them.

These issues first emerged in a dual press conference in early March with House Intelligence Committee Chairman Devin Nunes, a Republican, and the ranking Democrat on the Committee Adam Schiff, both of California.

"We are a little uncomfortable with the [Office of the Director of National Intelligence], and whether or not they're going to let us have the proper computer technology that we need to go through the evidence that exists out at the CIA out at Langley," Nunes said on March 15. "And we are trying to work through that. But I can tell you that it is, has become a bit of a stumbling block for our investigators to be actually able to compile and cull through the information."

The staffer told the Washington Examiner most of the remaining hurdles are no longer technical except for the FISA documents, and added that the investigation has never stopped because of a lack of documents. The "interim" agreement has provided enough flow to keep the investigations moving forward. But completing the final agreement is a major step in the total progress of the investigations by both chambers.