And then ironically Smith became a virus threatening both humans and machines. However, Agent Smith was the Oracle's tool to force a treaty between the machines and humans. As the Architect said at the end of Revolutions, she played a dangerous game.
But it was the only way forward to a new equilibrium.