Integrate agent communication in client

communicate client and server via agent