You should encapsulate the UVM_ACTIVE/UVM_PASSIVE within your agent’s configuration object. You do have an agent configuration object, right?
This configuration object should be created by the testbench or the test and passed to the agent using the uvm_config_db. You shouldn’t use the set_config_int as it is deprecated and doesn’t match the uvm_active_passive_enum type.
Also, this configuration has to be done in a component during the build phase since the UVM_ACTIVE/UVM_PASSIVE will determine if the agent builds the sequencer/driver. You can’t do any testbench configuration in a sequence since it is an object that is created after the testbench is built.