switch branch for agent