Allow agent to be set through options
Merge pull request #220 from gramakri/master

Allow agent to be set through options