The plan would add billions for the Pentagon and border security but would not provide any money for President Donald Trump's promised border wall with Mexico,
Votes in both chambers are expected by the end of the week.
The deal was reached after weeks of tense but steady negotiations between Republicans and Democrats on Capitol Hill and the White House, who battled over spending priorities but who were equally determined to avoid a politically fraught government shutdown. Republicans, who control Congress and the White House, were particularly wary of a shutdown on their watch.
Senate Minority Leader Chuck Schumer released a statement Sunday evening saying the agreement is consistent with his party's principles.
"This agreement is a good agreement for the American people, and takes the threat of a government shutdown off the table," the New York Democrat said in a statement.
House Democratic Leader Nancy Pelosi also praised the proposal, saying in a statement "we have made significant progress improving the omnibus bill."
"Now, the Members of our Caucus will assess the whole package and weigh its equities," the California Democrat said in the statement.
Aides in each party disputed some characterizations from the other side as to what made into the final proposal but one of the key aspects they agreed on: The bill has $1.5 billion for border security, including for technology and fixing existing infrastructure but it doesn't allow the money to spent on building Trump's wall. There is no money provided for a deportation force and there are no cuts of federal monies to so-called sanctuary cities.
Trump's demand for the border wall down payment was rejected by Democrats. They decried the controversial project -- and key Trump campaign promise -- as immoral and premature since Trump has not detailed plans for building the multibillion dollar wall he had vowed Mexico would pay for anyway.
Aides also agreed that the bill includes billions in new defense spending, including for the global war on terrorism, a major demand from Republicans.
In the proposal, there are no cuts to funding for Planned Parenthood, a demand from Democrats.
Funding for the National Institute of Health is increased by $2 billion and there is additional money for clean energy and science funding.
Negotiators also agreed to make a permanent fix for miners health insurance and to provide $295 million for Puerto Rico Medicaid. There is also disaster aid package that includes funding for California, West Virginia, Louisiana, North Carolina. There is increased funding for transit infrastructure grants and to fight the opioid epidemic, and year-round Pell Grants were restored.
Talks had also stalled over a threat by Trump to cut off Obamacare subsidies
paid to insurance companies to reduce the out-of-pocket expenses of some lower-income users of the Affordable Care Act, but Trump backed off that demand in the face of harsh criticism from Democrats.
The subsidies will stay in place as Republicans continue their long-stalled effort to repeal Obamacare, something Trump and his aides hope to revive as early as this week.
The deal means a government shutdown next Friday, when agencies are set to run out of money, is unlikely. Last Friday, Congress passed a one-week stopgap spending bill
when it became clear negotiators needed a bit more time to finalize an agreement.
This story has been updated and will be updated to include new developments.