add useAgent support

add useAgent support