updated agent_env.erl with start/2 and stats/0 functions