fixed many broken agent tests and added a nice framework to rid ourselves of copypasta