// Register a death event for the Agent NPC
AgentNPCDeathEvent deathEvent = PixocracySDK.AgentNPCManager().registerDeathEvent(instance, agentNpc);
// The Agent NPC is now considered dead and will be removed from the instance
// Their wealth may be redistributed and their relationships will be terminated