Democratic congressional leaders said Tuesday they’d reached an agreement with President Donald Trump to move forward with a "big and bold” $2 trillion infrastructure deal, and will meet with him again next month to discuss how to pay for it.

Speaking outside the White House, House Speaker Nancy Pelosi, D-Calif., and Senate Minority Leader Chuck Schumer, D-N.Y., expressed optimism about their ability to work with the president, with whom they've had a shaky relationship in recent months.

The Democratic leaders said they and Trump had agreed that the package’s price would be $2 trillion and would focus on roads, bridges, highways, water, the power grid and broadband internet expansion. They added that they had agreed with Trump to meet again in three weeks to discuss how to pay for the package.

“We told the president we needed his ideas on funding,” Schumer said.

White House press secretary Sarah Sanders called the meeting "excellent and productive."

"The United States has not come even close to properly investing in infrastructure for many years, foolishly prioritizing the interests of other countries over our own," Sanders said in a statement. "We have to invest in this country’s future and bring our infrastructure to a level better than it has ever been before."

Sanders also said the president and Democratic leaders would meet in the near future to discuss prescription drug prices.

Schumer and Pelosi were upbeat after the meeting, praising the president’s approach.

Pelosi called it “very productive” and said she was “very pleased” with Trump’s “positive attitude.”

“This was a very good start, and we hope it will go to a constructive conclusion,” Schumer said.

He added that “there was goodwill in this meeting — which is different than some of the other meetings we have had, which is a good thing.”

Download the NBC News app for breaking news and politics

Those remarks appear to refer to the pair’s meetings with Trump last winter related to funding for his proposed border wall and the government shutdown.

The Democratic leaders added later in a joint news release that the purpose of the meeting was to find out how much Trump was willing to agree to spend on infrastructure, and they "were pleased he suggested $2 trillion."

Senate Majority Leader Mitch McConnell said at a Capitol Hill news conference Tuesday, however, that any effort by Democrats to change parts of the 2017 tax overhaul to help finance the infrastructure plan would be "a nonstarter."

"This tax bill is what's generated this robust economy," McConnell said. "The last thing we want to do is step on all of this growth by stepping back and repealing, in effect, what has generated all this prosperity and low unemployment."

Discussion 'all over the place'

A senior Democratic aide who attended Tuesday's meeting told reporters afterward that neither side made a single mention of congressional investigations related to special counsel Robert Mueller's probe, Trump's tax returns, subpoenas or impeachment. There was also no discussion of how to pay for the infrastructure plan.

The meeting was a “very cordial, very positive conversation,” but the discussion "was all over the place,” the aide said.

At one point, Trump encouraged the ranking Democrat on the Senate Health, Education, Labor and Pensions Committee, Patty Murray of Washington, to restart work on a health care deal with the Republican chairman, Lamar Alexander of Tennessee, according to the aide.

Another Democratic source that was in the White House meeting told NBC News that Trump brought up trade and immigration at the start of the meeting, calling on Democrats to work with him on his proposals to address the situation at the border. Pelosi, the source said, brought up Democratic concerns related to prescription drug-related provisions of the trade pact among the U.S., Mexico and Canada.

Earlier Tuesday, acting White House chief of staff Mick Mulvaney downplayed the ability of Trump and the Democratic leaders to reach a deal on infrastructure, saying it was more likely that Congress would pass the USMCA.

In an interview with Fox Business Network’s Maria Bartiromo at the Milken Institute's Global Conference in Los Angeles, Mulvaney said: "Do I think there’s an interest in doing it? Yes. Do I think there’s probably more interest, especially on the Democrats' part, to make a show for trying to get a deal? Yeah. I hope the conversations go well today, but if they don’t, it would not surprise me. I think it’s a much better chance of getting USMCA passed than there is in getting an infrastructure deal passed."

Previous sessions between Trump and the Democratic leadership have not been so genial. In December, Pelosi, Schumer and Trump bickered in an explosive public meeting over the president's promised wall and threat to shutter government agencies if Congress didn't fund it.

During that tense free-for-all, the lawmakers snapped at each other and Pelosi even remarked that “this is spiraling downward.”

Then, in January, Trump reportedly walked out of a closed-door meeting with congressional leaders after Pelosi told him she wouldn't fund his wall even if he ended the shutdown.

Weeks earlier, at a news conference after the midterm elections, Trump had said he “would like to see bipartisanship” and work with Democrats on infrastructure and other issues, but he wouldn’t be willing to do so if they began investigating him.

“If that happens, then we’re going to do the same thing, and government comes to a halt. And I would blame them,” he said, adding that he’d take on a “warlike posture” if he was investigated.

On Tuesday, both Pelosi and Schumer indicated that doing both would be possible.

Asked whether their top priority would be working with Trump to get things done or investigating the president, Pelosi responded that “our priority is to honor our responsibilities under the Constitution of the United States.”

Schumer was more direct.

“I believe we can do both at once,” he said, telling reporters that Trump did not bring the topic up this time. "We can come up with some good ideas on infrastructure and ... the House and the Senate can proceed in its oversight responsibilities. The two are not mutually exclusive, and we were glad he didn’t make it that way.”