Patrick Lang explains how this came about: https://russia-insider.com/en/politics/stroke-brilliance-trump-has-made-bolton-his-point-man-putin-summit/ri23950
Many see benefits from the Putin/Trump meeting. For example: https://www.strategic-culture.org/news/2018/06/25/these-are-benefits-of-us-russia-summit.html
Putin himself sees benefits in the meeting as does Trump. Putin sees hope of improving relations between the two governments. Of course, the "strained relations" are entirely due to Washington, which has demonized both Russia and Putin with false accusations and hostile acts such as illegal sanctions. It was miscalculation for Washington to expect Russia to give up its Black Sea naval base to Washington's coup in Ukraine.
What can an agreement be based on? Bolton's position has been opposed to making any agreement with Russia or cooperating with Russia in any way.