Context. Problem of traffic prediction in a city is closely connected to the tasks of transportations in a city as well as air pollution detection in a city. Modern prediction models have redundant complexity when used for separate stations, require large number of measuring stations, long measurement period when predictions are made hourly. Therefore, there is a lack of method to overcome these constraints. The object of the study is a city traffic.
 Objective. The objective of the study is to develop a method for traffic prediction, providing models for traffic quantification at measuring stations in the future under data and resource constraints.
 Method. The method for agent-oriented traffic prediction under data and resource constraints was proposed in the paper. This method uses biLSTM models with input features, including traffic data obtained from agent, representing target station, and other agents, representing informative city stations. These agents are selected by ensembles of decision trees using Random Forest method. Input time period length is proposed to set using autocorrelation data.
 Results. Experimental investigation was conducted on traffic data taken in Madrid from 59 measuring stations. Models created by the proposed method had higher prediction accuracy with lower values of MSE, MAE, RMSE and higher informativeness compared to base LSTM models.
 Conclusions. Obtained models as study results have optimal number of input features compared to the known models, do not require complete system of city stations for all roads. It enables to apply these models under city traffic data and resource constraints. The proposed solutions provide high informativeness of obtained models with practically applicable accuracy level.