agents model calls api for all pages
unit tests for agent sums, order, and some refactoring