Refactor/Redesign: Agent with types