From environment , how to limit the scope of an agent configuration object, only to its corresponding agent ,if we have a dynamic array of agents in environment

The uvm_config_db allows you to specify a scope for each item. So try something like this in your environment:


foreach (ahb-master_agent_config[i]) begin
  uvm_config_db#(ahb-master_agent_config)::set(this, $sformat("abh-master-agent[%0d]", i), "config_obj", ahb-master_agent_config[i]);
end