use SocketAgent interface

test on local machine.
This part LGTM