Override agent before call to connect