Rhinos’ third straight win – and first at Wigan since 2013 – lifted them two places to fifth in Betfred Super League.
They led 6-0 at the break, despite having Zane Tetevano and Luke Briscoe sin-binned and a superb defensive effort kept Wigan out in the second half.
A “really happy” Agar said: “I had a good feeling coming into the game and I thought we defended great.
“We had to overcome a fair bit of adversity in the first half with the sin-binnings, that was difficult to manage, but I thought we did that really well.”
Agar admitted: “We are having to change our halves on a regular basis and there’s not the flow to our attack that we’d like, but you’ve got to find some other ways sometimes.
“We just did enough in that regard, but obviously to keep any team to nil – let alone Wigan on their home ground – is a magnificent effort.”
With Callum McLelland sick, hooker Kruise Leeming partnered Rob Lui in Leeds’s halves.
“It’s hard to pick who were our best players, but Kruise and Rob were two that spring to mind,” Agar said.
“Rob has been a very, very good player. I know he’s drawing the curtain at the end of this year, but he really knows how to play the game and he’s a tough player.
“Our halves were very good and across the board it was a really committed performance.”
The first half was not the most entertaining in terms of try-scoring opportunities, but it was an end-to-end contest that just lacked a bit of skill and composure from both teams.
Wigan were heavily criticised for the way they attacked against St Helens, and there was definitely an improvement with Jai Field and Harry Smith going close, but they still lacked that killer touch in a 14-0 defeat.
The Rhinos spent over 20 minutes of the first half with 12 men as Zane Tetevano and Luke Briscoe were both shown yellow cards, but it was when the winger was off the field that the visitors hit the front with Brad Dwyer collecting a kick from Kruise Leeming to score three minutes before half-time.
A fine try for Richie Myler following a great break from Rhyse Martin saw the Rhinos extend their lead to 14-0, while credit has to be given to their defence as they handled everything Wigan could throw at them.
Wigan have now gone over 200 minutes of action without scoring a try.
It was a frantic opening 10 minutes with both teams having chances to score. Martin looked like he collected a ball from Rob Lui to crash over, but a last-ditch attempt from Smith saw him knock the ball down before Martin could collect.
The Warriors then blew a chance of their own. Hooker Joe Shorrocks made a break up the middle and it looked like all he had to do was offload to the supporting Smith and he would be over, but unfortunately for Wigan the pass was a poor one and Leeds recovered.
The Rhinos were reduced to 12 men in the 22nd minute when Tetevano was shown a yellow card for a high tackle on Liam Farrell - he was actually fortunate not to receive the same punishment in the opening minutes for a shoulder charge on John Bateman.
A quick penalty tap from Jackson Hastings got the home fans on their feet, and seconds before Tetevano came out of the bin, Briscoe joined him for a professional foul as Hastings looked for a quick play the ball. The Warriors opted to run it again, but they still could not find a way through.
Wigan’s inability to turn pressure into points came back to hurt them three minutes before the break as Leeming’s kick to the in-goal came back off the post and Dwyer was on hand to touch down. Martin converted as Leeds led 6-0 at the break.
It just was not happening for the Warriors with Hastings dropping the ball in a good position, and that error led to them falling even further behind.
Lui put Martin through a massive gap and he kept his cool before sending a ball back inside for Myler to go in under the posts. Martin converted and the Rhinos led 12-0.
Leeds were in full control and Martin slotted over a penalty to put them 14-0 up. Wigan were throwing caution to the wind now, Brad Singleton went close with a barnstorming run, before they tried to throw the ball wide but Liam Marshall was unable to collect the ball on his bootlaces with the try at his mercy.
Leeds had Ash Handley to thank for keeping Wigan at bay as he got a foot to Hastings’ kick to the corner to concede another dropout. Had he missed that, Jake Bibby would have scored. Again, Wigan attacked down the left but their inability to keep hold of the ball was killing them.
Wigan won their fifth drop-out, but being fair that is all they had in attack during the second half. A kick over the defence and praying for an error - the mistake never came. The home side thought they had scored through Bibby in the corner, but the video referee ruled he was held up by Myler and Handley.
Wigan: Field, Bibby, Hardaker, Gildart, Marshall, Smith, Hastings, Smithies, Bateman, Farrell, Partington, Shorrocks, Singleton. Substitutes: Bourouh, Byrne, Havard, Pearce-Paul.
Leeds Rhinos: Myler, Handley, T. Briscoe, Newman, L. Briscoe, Lui, Leeming, Tetevano, Martin, Gannon, Prior, Dwyer, Thompson. Substitutes: Vuniyayawa, Donaldson, Holroyd, Smith.
Referee: Robert Hicks (RFL)