From Brains to Agents and Back