Add basic functions of agent

add task running list;
calculate task running time;
convert task return value to SUCCESS or FAILED;
control the number of fork;