Neo did not need to fight the Agents after he was convinced he was the One. Before meeting the Architect he thought the purpose of the One was basically to use his abilities to help the Zion rebels "free" more humans from the Matrix and eventually destroy it. (Helping his fellow Zion rebels is why he fought the upgraded Agents at the beginning of The Matrix Reloaded -- he was helping them escape the Matrix after the Crisis Meeting by delaying the Agents.) After his meeting with the Architect he realized that
the One was never meant to end anything...it was all another system of control.
transcript for The Matrix Reloaded
With help from the Oracle, Neo came to realize that he needed to somehow defeat Smith in order to end the war and save humanity:
Oracle: Everything that has a beginning has an end. I see the end coming. I see the darkness spreading. I see death. And you are all that stands in his way.
Neo: Smith.
Oracle: nods Very soon he’s going to have the power to destroy this world, but I believe he won’t stop there; he can’t. He won’t stop until there’s nothing left at all.
Neo: What is he?
Oracle: He is you. Your opposite, your negative, the result of the equation trying to balance itself out.
Neo: What if I can’t stop him?
Oracle: One way or another, Neo, this war is going to end. Tonight, the future of both worlds will be in your hands… or in his.
transcript for The Matrix Revolutions
It's clear that Neo had to fight and defeat Smith in order to end the war and save humanity both in the Matrix and in the real world (Neo had to physically fight Bane-Smith in the real world to save his physical body). With this realization, Neo made a deal with Deus Ex Machina in which the machines would honor a truce with Zion if Neo succeeded in defeating Smith (who threatened not only the humans but the machines as well):
Neo: The program Smith has grown beyond your control. Soon he will spread through this city, as he spread through the Matrix. You cannot stop him. But I can.
Deus Ex Machina: We don't need you! We need nothing!
Neo: If that's true, then I've made a mistake, and you should kill me now.
Deus Ex Machina: What do you want?
Neo: Peace.
transcript for The Matrix Revolutions
Neo succeeded in destroying Smith by sacrificing himself, which in a way means he did not have to physically fight Smith in the end -- he only had to make the choice to fight Smith with his will.