WA will resume on day four needing only a further six runs for victory, while Tasmania need just two wickets.
Play had been extended by the umpires with a result appearing imminent late on day three, however stumps were eventually called with both sides agonisingly short.
Chasing an unlikely 357 for victory, WA had earlier slumped to 3-37, but were revived by a strong 81-run stand between Mike Hussey and John Rogers, before Whiteman and Agar turned the game around.
Earlier, Burt Cockley (3-65) took the final wicket of the Tasmanian innings with the second ball of the day, to ensure a 357-run target.
Early wickets set the Warriors back, but Hussey (44) and Rogers (39) combined for an encouraging stand before both were dismissed caught behind shortly after lunch by James Faulkner.
Mitch Marsh and Whiteman carried on their momentum, taking WA past the 200 mark, with the former making just the second half-century of the match.
However, Marsh fell for 51 trapped LBW by Ben Hilfenhaus, leaving WA precariously placed at 6-203.
Agar came to the crease and was dropped by Ricky Ponting in the slips on zero, before putting together a match-changing partnership with Whiteman.
Whiteman brought up his half-century, while Agar was dropped again by Mark Cosgrove, who had to leave the field following the attempt with a hand injury.
WA closed to within 33 runs of victory, before Bunbury product Whiteman eventually lost his wicket caught by Alex Doolan at point off Adam Maher for a knock of 83, which included 12 boundaries and one six.
Agar and Ryan Duffield tried to guide WA home before the close of play, which was extended with a result in sight.
The young spinner also brought up his half-century, before Duffield lost his wicket, caught and bowled Faulkner for 12 to ensure a tense finale.
Agar (71*) and Cockley (4*) attempted to finish the job, but stumps were called with game agonisingly close to a result.
WA will resume on Sunday at 10.30am, with live commentary on Sport FM 91.3.