The problem of context-aware task sequence planning by an autonomous intelligent system (intelligent agent) for a case of independent or loosely coupled tasks is considered. The principle of matching the task to the context was analyzed, the structure of the task sequence planning module and the algorithm of its work were proposed. The paper also proposes an algorithm for calculating the dynamic priority of a task, an algorithm for determining whether a task meets context, and an algorithm for adapting a set of rules for matching tasks to a context based on reinforcement learning in a stationary random environment with context dependence (contextual multi-armed bandit problem). The outline of the reinforcement learning procedure, implemented in the prototype of the task sequence planning module, has been proposed.
 Stuart Russell, Peter Norvig, Artificial Intelligence: A Modern Approach, 3rd Ed., Pearson, 2009. — 1152 p.
 David L. Poole, Alan K. Mackworth, Artificial Intelligence: Foundations of Computational Agents, 2nd Ed., Cambridge University Press, 2017. — 820 p.
 Multiagent Systems, by Gerhard Weiss (Editor), 2nd Ed., The MIT Press, 2013. — 920 p.
 Melnyk A., Cyber-physical systems: problems of creation and directions of development, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 806, 2014. — pp. 154–161 (in Ukrainian)
 Melnyk A., Integration of the levels of the cyber-physical system, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 830, 2015. — pp. 61–67 (in Ukrainian)
 Golembo V., Botchkaryov A., Approaches to the construction of conceptual models of cyber-physical systems, Transactions on Computer Science and Information Technology, Lviv Polytechnic National University Press, No. 864, 2017. — pp. 168–178 (in Ukrainian)
 Tierney K., Browne J., Task sequence planning, In: Bernhardt R., Dillman R., Hörmann K., Tierney K. (eds) Integration of Robots into CIM. Springer, 1992. — pp. 36—44
 Tiehua Cao, Arthur C. Sanderson, Intelligent Task Planning Using Fuzzy Petri Nets, World Scientific, 1996. — 192 p.
 J. Rosell, N. Munoz and A. Gambin, «Robot tasks sequence planning using Petri nets», Proceedings of the IEEE International Symposium on Assembly and Task Planning, 2003., Besancon, France, 2003, pp. 24—29.
 L. Zhang et al., «Adaptive quantum genetic algorithm for task sequence planning of complex assembly systems», in Electronics Letters, vol. 54, no. 14, 2018. — pp. 870—872.
 Schilit B., Adams N., Want R., Context-aware computing applications, in Proceedings of the IEEE Workshop on «Mobile Computing Systems and Applications», IEEE Computer Society, 1994. — pp. 85—90.
 Abowd G.D., Dey A.K., Brown P.J., Davies N., Smith M., Steggles P. (1999) Towards a Better Understanding of Context and Context-Awareness. In: Gellersen HW. (eds) Handheld and Ubiquitous Computing. HUC 1999. Lecture Notes in Computer Science, vol 1707. Springer, Berlin, Heidelberg. — pp. 304—307
 Cristiana Bolchini, Carlo A. Curino, Elisa Quintarelli, Fabio A. Schreiber, and Letizia Tanca. 2007. A data-oriented survey of context models. ACM SIGMOD Record, 36, 4 (December 2007), pp. 19—26.
 C. Perera, A. Zaslavsky, P. Christen and D. Georgakopoulos, «Context Aware Computing for The Internet of Things: A Survey», in IEEE Communications Surveys & Tutorials, vol. 16, no. 1, First Quarter 2014, pp. 414–454.
 Grifoni P., D’Ulizia A., Ferri F., Context-Awareness in Location Based Services in the Big Data Era, In: Skourletopoulos G., Mastorakis G., Mavromoustakis C., Dobre C., Pallis E. (eds) Mobile Big Data. Lecture Notes on Data Engineering and Com-munications Technologies, Springer, vol 10, 2018. — pp. 85—127
 Nicholas Capurso, Bo Mei, Tianyi Song, Xiuzhen Cheng, A survey on key fields of context awareness for mobile devices. Journal of Network and Computer Applications, Volume 118, 2018. — pp. 44—60.
 Botchkaryov A., Golembo V., Applying intelligent technologies of data collection to autonomous cyber-physical systems, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 830, 2015. — pp. 7–11 (in Ukrainian)
 Melnyk A., Golembo V., Botchkaryov A., The new principles of designing configurable smart sensor networks based on intelligent agents, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 492, 2003. — pp. 100–107 (in Ukrainian)
 Botchkaryov A., Collective behavior of mobile intelligent agents solving the autonomous distributed exploration task, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 546, 2005. — pp. 12–17 (in Ukrainian)
 Botchkaryov A., Structural adaptation of the autonomous distributed sensing and computing systems, Transactions on Computer systems and networks, Lviv Polytechnic National University Press, No. 688, 2010. — pp. 16–22 (in Ukrainian)
 Botchkaryov A., The problem of organizing adaptive sensing and computing processes in autonomous distributed systems, Transac-tions on Computer systems and networks, Lviv Polytechnic Natio-nal University Press, No. 745, 2012. — pp. 20–26 (in Ukrainian)
 Richard S. Sutton, Andrew G. Barto, Reinforcement Learning: An Introduction, 2nd Ed., A Bradford Book, 2018. — 532 p.
 L.P. Kaelbling, Michael L. Littman, and Andrew W. Moore, Reinforcement learning: A survey. Journal of AI Research, N 4, 1996. — pp. 237—285.
 Csaba Szepesvari, Algorithms for Reinforcement Learning, Morgan and Claypool Publishers, 2010. — 104 p.
 Maxim Lapan, Deep Reinforcement Learning Hands-On, Packt Publishing, 2018. — 546 p. H. M. Schwartz, Multi-Agent Machine Learning: A Reinforcement Approach, Wiley, 2014. — 256 p.
 Langford, John; Zhang, Tong (2008), «The Epoch-Greedy Algorithm for Contextual Multi-armed Bandits», Advances in Neural Information Processing Systems 20, 2008. — pp. 817—824.
 Lu T, Pál D, Pál M., Contextual multi-armed bandits, InProceedings of the Thirteenth international conference on Artificial Intelligence and Statistics, 2010 Mar 31. — pp. 485—492.
 Djallel BouneffoufAmel BouzeghoubAlda Lopes Gançarski, «A Contextual-Bandit Algorithm for Mobile Context-Aware Recommender System», Neural Information Processing — 19th International Conference, ICONIP 2012, Doha, Qatar, November 12–15, 2012, Proceedings, Part III, Lecture Notes in Computer Science, 7665, Springer. — pp. 324—331.
 Kumpati S. Narendra, Mandayam A. L. Thathachar, Learning Automata: An Introduction, Dover Publications, 2012. — 496 p.
 Auer, P. Using upper confidence bounds for online learning. Proceedings 41st Annual Symposium on Foundations of Computer Science. IEEE Comput. Soc., 2000. — pp. 270—279.
 Auer, P., Cesa-Bianchi, N., Fischer, P., Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2-3), 2002. — pp. 235–256.