Agarwal, who notched up his maiden double ton in the first Test, continued the good show with a classy 108 from 195 balls with the help of 16 fours and two sixes.
Agarwal smashed two sixes off Keshav Maharaj and then hit a four to get to his second test century in 183 balls.
Agarwal was removed by South African pace spearhead Kagiso Rabada, who scalped all three wickets of the day and returned figures of 3/48. Agarwal was caught at first slip by Proteas skipper Faf du Plessis.
Besides him, Pujara brought up his second successive fifty before Rabada had him caught by du Plessis for 58 off 112 balls.
The pair of Agarwal and Pujara shared a 138-run stand for the first wicket to steady the ship after India lost Rohit Sharma (14) early as the star of the first Test fell victim to Rabada's peach of a delivery.
At stumps, Kohli was looking at his imperious best on 63 not out from 105 balls, his innings laced with 10 fours. Vice-captain Ajinkya Rahane was batting with him on 18.
Kohli brought up his 23rd Test fifty in 91 balls and played some delectable shots to end the day. Rahane was a perfect foil as he took 70 balls to reach 18, hitting three fours. The pair added 75 runs in an unbroken stand for the fourth wicket.
Pujara, who got to his fifty in 107 balls, was just starting to look good as he smashed left arm spinner Senuran Muthusamy for a six and later hit Maharaj for two fours in one over before Rabada had him, after he had punched the bowler off his back foot for a silken four in front of point.
Pujara, who had scored 81 in the second innings of the first Test, hit nine fours and a six before getting out.
Agarwal, who notched up his maiden double hundred in the last Test, looked good for a hundred before tea and launched into Maharaj in the 56th over for two sixes. He moved to 99 and then steered the ball past the lone slip and into the boundary for another hundred off Vernon Philander in the next over.
After losing the previous match star Rohit Sharma early in the day, Pujara joined hands with Agarwal to make sure India didn't lose any further wickets till the end of the first session.
Seeing off some good overs from the visitors, both Indian batsmen started feeling a lot more comfortable and played their shots to create some worries for du Plessis.
Earlier, Kohli didn't shy away from putting his batters in to face a tricky session on a damp surface at the Maharashtra Cricket Association (MCA) stadium here.
India left out Hanuma Vihari, much to the surprise of many after the No. 6 batsman scored heavily in the West Indies recently during the previous series.
Pacer Umesh Yadav was drafted in to add more teeth to the attack, which has Ishant Sharma and Mohammed Shami, besides the spin duo of Ravichandran Ashwin and Ravindra Jadeja.
Brief scores: India 273/3 in 85.1 overs (Mayank Agarwal 108, Virat Kohli 63 batting, Kagiso Rabada 3/48) at stumps on Day 1.
( With inputs from IANS )