unit tests for all agent functions complete