Angela Merkel's party won a narrow victory in last month's poll
Mrs Merkel confirmed the deal at a news conference and said a CDU-SPD "grand coalition" would have to create jobs and push through economic reforms.
Under the deal, the SPD will take eight ministerial posts, against a reported six for the CDU and their CSU allies.
It is unclear whether opponent Gerhard Schroeder will be in the coalition.
Both the former Chancellor Mr Schroeder and Mrs Merkel had laid claim to the chancellery after a tight election on 18 September.
The "grand coalition" deal must still be approved by both parties and parliament.
Hard bargaining
Further CDU-SPD coalition talks are being held. The two parties have already held three rounds of what they called exploratory talks.
NEW BUNDESTAG 1. Christian Democrats/Christian Social Union (CDU/CSU): 226
2. Social Democrats (SPD): 222
3. Free Democrats (FDP): 61
4. Left Party: 54
5. Greens: 51
Victory - but at a price
"We have set our aim to create a coalition that stands for new policies," Mrs Merkel said. "We want to work together for the people of this country."
Even if agreement has been reached, it will only be the start of a lengthy and more detailed negotiation on the small print of future government policy, the BBC's Ray Furlong reports.
It all suggests just how difficult it might be for a "grand coalition" to govern Germany if it is indeed formed as anticipated.
Such a formation has been tried only once before in Germany's post-war history - in the 1960s.
Mrs Merkel said on Monday there was "no good alternative to a reform course in Germany".
Key SPD posts
A senior Social Democrat source quoted by Reuters news agency said the SPD was poised to fill the ministries of foreign affairs, finance, justice and labour.
HAVE YOUR SAY The grand coalition may be a good thing for Germany as Ms Merkel can take the best policies from each party
Gareth Lukey, Chester
Send us your comments
Christian Social Union (CSU) chief and Bavarian leader Edmund Stoiber on Monday confirmed he would become the new economy minister.
While opinion polls in the run-up to September's poll had given Mrs Merkel a clear lead, her conservatives emerged just four seats ahead of Mr Schroeder's SPD when the votes were counted.
Denied a clear majority, she was thus unable to form her preferred coalition with the smaller, liberal FDP - pushing the conservatives into coalition talks with the Social Democrats.
Mr Schroeder had initially engineered an early election by deliberately losing a confidence vote in parliament, arguing that he needed a new mandate to push through controversial economic reforms.
His SPD-Green coalition faced strong opposition to reforms of Germany's welfare system and labour market, which were aimed at reviving the sluggish economy and tackling unemployment running at more than 11%.
Mrs Merkel's CDU wants to ease the rules for dismissing workers, limit sector-wide wage deals and increase sales tax.
Gerhard Schröder
   
Social Democrat Gerhard Schröder has given up his ambition to be chancellor in a future government and cleared the way for the current opposition leader, Christian Democrat Angela Merkel, to become the first female chancellor in the history of Germany, officials for both parties confirmed.

Both Schröder and Merkel previously insisted that they become head of government, making chancellorship the all deciding issue whether to form a coalition. Now Schröder is reportedly resigning from politics, but while he may not be in the next government, his withdrawal comes at a high price for the Christian Democrats (CDU/CSU). 

The Social Democrats (SPD) will take eight minister posts, against six for the CDU/CSU. But who will occupy these posts has yet to be determined. Beside various rumors in Berlin, it has only been confirmed so far that the current Bavarian governor Edmund Stoiber will take over as minister for economy and technology. The agreement, negotiated between Schröder, Merkel, Stoiber, and SPD chair Franz Müntefering, has already been approved by both parties' leadership committees.

Official negotiations for all the details of the future coalition are scheduled to begin next Monday and are expected to last until at least November 12.

The early federal election on September 18 produced an effective stalemate as both CDU/CSU and the SPD got approximately the same votes, with CDU/CSU having a narrow lead of 4 seats in the Bundestag. Neither party was able to form a coalition with their preferred partner, FDP and the Greens, respectively, forcing them to enter talks to form a grand coalition.