Mr. Smith plays a very clam collected role until he meets Neo - his challenge in the Matrix. As the story progresses we understand that Mr. Smith becomes Neo's opposite and thus they need to be the solution to the equation of one canceling out the other.
The more I watch the Matrix movies the more I am led to believe that Smith was in fact programmed to be just the way he is - cunning and ruthless. Unlike other agents who just do the job, he seems to do it for pleasure if you will. It could be that Smith's job was to hunt down the One, whomever it was, and probably Smith had a good success rate, so there was a purpose to him. However, since Neo comes around, he realizes that he was losing his purpose to be in the Matrix - hence he says he was 'compelled' to stay, to disobey (Not returning to the source). I believe this feeling Smith had to 'stay' was actually to finish the assignment of disabling a too powerful program in Neo. After all, if Neo was to remain in the Matrix then there would be a system crash!
The concept I found most interesting about Mr. Smith was how he became unplugged from the Matrix and basically a stand-alone program. In "The Matrix" He is an agent, plugged in like the other agents and able to morph into anyone currently plugged in. Neo destroys him by taking him over; a feat that was never done to anyone else in the Matrix by Neo. This "Takeover" Does not delete Smith, so in reality, his program is still in the Matrix. However now it is not plugged in anymore, and Smith having seen inside Neo and copied parts of Neo, becomes Neo in some respect. He learns how to take over or replicate all others in the Matrix, something that Neo could do all along but chose not to. Smith then becomes a threat not only to the Matrix but to the Machine World, because he is acting like a virus; the same thing he accused humans of being in the original Matrix. This 'virus' even had the ability to move between the Matrix and Zion, so eventually it had the ability to go to the Machine City and do who knows what. That is why he became a threat to the machines, and had to be cancelled out by Neo. We have to believe this was the first time that Smith became so powerful because the last 5 times, Neo chose to return to the Source and/or Zion was destroyed. Or, Neo went back to the Matrix but never realized his purpose of canceling Smith, so he never went to the Machine City and the Matrix was reset and Smith reprogrammed. Any thoughts?
Of all the characters in the trilogy Mr. Smith is the most interesting. He has this way about him like he's got everything figured out and yet the one thing he can't figure out is his own role in the whole affair.