Update agent and tests for connecting