But despite Agar's record-breaking 98 from 101 balls batting at No.11, which lifted Australia from first innings disaster, England may still hold the upper hand heading into day three.
On a magic second day in Nottingham, England were 2-80 in their second innings at stumps, with Kevin Pietersen 35 not out and Alastair Cook on 37.
They lead by just 15 runs overall but, given Australia's batting frailties and the fact Graeme Swann will get to bowl on a turning wicket, they look to have their noses in front.
Things would have been a lot worse for Australia if not for Agar and Phil Hughes (81no).
When the pair came together with the scoreboard reading 9-117, Australia were shot.
Five wickets had fallen in the morning session for just nine runs, all in the space of 27 minutes and 32 balls.
Somehow, amid the carnage, the 19-year-old spinner, unknown to most until he received a shock baggy green on Wednesday, stood up to record a standout moment in Ashes history.
Agar posted the highest individual score by a No.11 in Tests, while his 163-run stand with Hughes was the biggest ever for the 10th wicket.
The West Australian deserved to have one of the best ever debut hundreds but, tragically, he hit Stuart Broad to deep mid-wicket and Australia's innings ended at 280.
Perhaps Agar's disappointment was tempered by the fact he'd feel lucky to have even got past six, after surviving a contentious review of a stumping shout early in his innings.
Hughes was overshadowed by Agar, who smashed 12 boundaries and two sixes down the ground off Swann.
But a tenacious Hughes was outstanding in his own right, the rock for Australia.
James Anderson (5-70) and Swann (2-55) had the tourists subdued before the England bowlers inexplicably lost their way.
They bowled wide and short and Agar and Hughes took full advantage.
Australia had resumed at 4-75, with Smith (53) and Hughes putting on 50 before the rot started.
Smith edged Anderson behind attempting a drive through cover.
Then Brad Haddin, Peter Siddle, Mitchell Starc and James Pattinson all went swiftly for single-figure scores.
That was after Australia had lost their first three wickets in 18 balls on day one.
But after Agar and Hughes' heroic turnaround, Australia got stuck into England's batsman with their tails up.
Mitchell Starc (2-15) had Joe Root caught behind down leg and Jonathan Trott trapped lbw from consecutive deliveries, missing his chance at a hat-trick for the second time in the match.
Trott was filthy he was given out on video review after replays supported the umpire's original decision that he might have nicked the ball.
Shane Watson appeared to have recovered from a lower leg strain, bowling two maiden overs.
Ed Cowan didn't field all day as he battled a stomach bug.