The compost barn system has become popular in recent years for providing greater animal well-being and quality of life, favoring productivity and longevity. With the increase in the use of compost barn in dairy farms, studies related to the thermal environment and behavior are of paramount importance to assess the well-being of animals and improve management, if necessary. This work aimed to characterize the thermal environment inside a compost barn during the four seasons of a year and to evaluate the standing and lying behavior of the cows through images. The experiment was carried out during March (summer), June (autumn), August (winter), and November (spring). Dry bulb temperature (tdb, oC), dew point temperature (tdp, oC), and relative humidity (RH, %) data were collected every 10 minutes during all analyzed days, and the temperature and humidity index (THI) was subsequently calculated. In order to analyze the behavior of the cows, filming of the barn interior was carried out during the evaluated days. Subsequently, these films were analyzed visually, and in an automated way to evaluate the behavior of these animals. For the automated analysis, an algorithm was developed using artificial intelligence tools, YOLOv3, so that the evaluation process could be automated and fast. It was observed that during the experimental period, the highest mean values of THI were observed during the afternoon and the autumn. The animals' preference to lie down on the bed for most of the day was verified. It was observed that the algorithm was able to detect cow behavior (lying down or standing). It can be concluded that the behavior of the cows was defined, and the artificial intelligence was successfully applied and can be recommended for such use.