Refactored NID for agent types. Routes agent notify events to trigger agents.