new constructor for agent