agent communication with server