abstracting vector agent refactor