added sanity test and agent::Agent::new()