1) username is sender (lowercase), not Sender@gmail.com. sender@gmail.com is the full Jid
2) agsXMPP is completly asynchronous. Which means your xmpp.Open() call does not block. Your runs runs through and closes the connection immediately before it was established.
3) look at the agsXMPP examples