Both deals were announced Friday.
D'Agostini gets $1.5 million next season and $1.8 million in 2012-13. Elliott will make $600,000 in the NHL, $105,000 in the AHL.
D'Agostini became an unrestricted free agent Friday when the Blues did not offer him a qualifying offer on Monday. He was free to sign with any team, but the Blues continued talking with D'Agostini and his agent Steve Bartlett.
"We had some good talks leading up to today," D'Agostini said. "The feeling was to get it done before (11 a.m. central time), but my agent and the Blues were always in good talks and it was kind of 'right there' the whole time. I never really tested the open market. St. Louis was always the No. 1 spot for me."
D'Agostini, acquired from Montreal for Aaron Palushaj in 2010, set career highs in goals (21), assists (25) and points (46) in 82 games with the Blues during the 2010-11 season. He has appeared in 183 games over four seasons with the Blues and the Canadiens with 35 goals and 71 career points.
Elliott split last season with Ottawa and Colorado, compiling a 15-27-9 record with three shutouts, a 3.34 goals-against average and .893 save percentage.
The 26-year-old, who was traded to Colorado for Craig Anderson last season, was 29-18-9 with a 2.57 GAA and .909 save percentage in 2009-10 with the Senators. Elliott will battle with Ben Bishop for the backup job behind starter Jaroslav Halak.