Use following to configure select2
$('#selectelementid').select2({
placeholder: "Please select an agent",
allowClear: true // This is for clear get the clear button if wanted
});
And to clear select input programmatically
$("#selectelementid").val("").trigger("change");
$("#selectelementid").trigger("change");