added java-friendly agent factory method
Changed doc samples to use agent factory method instead of conductor