Agarwood is a unique and valuable resin synthesized within a few tree species of the tree family Thymelaeaceae primarily as a self-defence mechanism against stress causes such as fungal invasions. Instead, artificial inoculation leads to short-time harvesting practiced in intensive commercial-level cultivations. The extraction of this resin can be done only after the harvesting where accurate estimation of resin yield is crucial for avoiding immature or underdeveloped harvesting. However, the amount of resin accumulated in the trunk cannot be estimated by the outside inspection. As a result, trees are being cut down before they have reached their maximum harvest potential. Therefore, precise detection of fragrant resin formation status inside the tree has become one of the primary challenges in the agarwood production industry. Currently, the methods available are either destructive, inefficient, or inaccurate. As such, this study evaluates the possibility of the use of NIR spectroscopy as a non-destructive and quick detection method for agarwood formations status inside trees in the in-situ mode. Near-infrared (NIR) range (588–1,025 nm) spectra were acquired from resin-formed and non-formed areas from twenty tree trunks of agarwood with five different formation levels. The best agarwood formation areas of logs were assigned as class level 1 and the least was assigned as the class level 5. The spectra were acquired near the opening made for the artificial inoculation process of considered Aquilaria crassna tree trunks. The results of Soft Independent Modelling of Class Analogies showed consistent evidence of differences in the NIR spectral profiles of all levels of agarwood formations. The SIMCA discrimination between the resin developed versus not was achieved with 86% accuracy. The accuracy rates of the degree of the presence of agarwood were obtained as 80%, 100%, 85%, 90%, and 85% respectively, as assigned levels 1 to 5 in the SIMCA models. This research revealed the potential possibility of using NIR technology for the prediction of agarwood resin status inside the agarwood tree in A. crassna before harvesting the tree as a non-destructive and rapid method.
 
 Keywords: NIR spectroscopy, Agarwood, Aquilaria crassna, Non-destructive, Agarwood formation