add state_machine gem with patch for rails 4.1+
fix factory_girl setup
add agent model and start implementation