update agent to connect with client and add tree tool lib