India lost Rohit Sharma cheaply during a difficult opening spell from South Africa’s fast bowlers but Agarwal and Pujara weathered the storm through a second-wicket stand of 138 to help the hosts reach 273 for three wickets at close on the first day.
Opener Agarwal’s stroke-filled knock came to an end on 108 while Pujara fell for 58.
India captain Virat Kohli then got together with his deputy Ajinkya Rahane to add 75 for the unbroken fourth wicket to continue the good work for the hosts, who lead the three-Test series 1-0.
Kohli, in his 50th Test as captain, was unbeaten on 63 with Rahane 18 not out when bad light forced early stumps.
Both teams added an extra fast bowler to their sides from the opening test at Visakhapatnam, which India won by 203 runs, with the Pune surface looking harder and sporting a tinge of grass cover.
The visiting pacemen posed a lot of problems for India’s batsmen during an inspired opening spell after Kohli won the toss and chose to bat.
Rohit, after enjoying the highs of twin hundreds in his maiden test as an opener at Visakhapatnam, faced a much more potent opposition on a surface offering movement and fell for 14, edging Kagiso Rabada to wicketkeeper Quinton de Kock.
Rabada, 24, bowled with intensity and was the pick of the South African bowlers through the day as all of his wickets came in similar fashion, with the batsmen edging behind.
With the ball seaming around during the first hour of the match, Agarwal and Pujara played themselves in patiently and improved their scoring rate as the partnership developed.
Agarwal, who hit a maiden hundred in the opening Test, appeared shaky at the start and survived a close leg before appeal off seamer Vernon Philander.
He also had problems against short-pitched deliveries and was hit on the back of his helmet by debutant fast bowler Anrich Nortje but that blow seemed to wake him from his slumber.
The 28-year-old, playing his sixth Test, hit the same bowler for three exquisite boundaries in an over that seemed to kickstart his innings.
He stepped out to hit spinner Keshav Maharaj for two successive sixes to reach 99 and then guided Philander to third man for four to complete his century. Agarwal hit 16 fours and two sixes in his 195-ball innings.
Pujara had an usually slow start and hit Rabada straight to Temba Bavuma at short leg before he had opened his scoring but the fielder failed to hold on to the sharp chance.
He was nimble in his footwork against the spinners and appeared in complete control before edging Rabada to slip just when it seemed like South Africa would go wicketless in the second session.