Most functions contributing to cognitive flexibility, such as working-memory, are thought to mature in parallel with the development of prefrontal circuits and therefore, to progressively augment from childhood to young adulthood and to decline only after middle age. However, some aspects of cognitive flexibility, such as decision-making strategies, have been found to reach a maximal performance at juvenile age. The principles that govern the emergence of cognitive flexibility and corresponding neuronal ensembles, in general, and the performance differences for working-memory and decision-making during development, in particular, are poorly understood. Our previous studies elucidated the mechanisms underlying the temporal coordination within neonatal prefrontal circuits and its relevance for adult cognitive behavior. Here, we aim to tackle the dynamic assembling of prefrontal ensembles during working-memory and decision-making at different juvenile ages and identify their task-dependent patterning by hippocampal and thalamic inputs. We hypothesize that prefrontal ensembles are differently organized and input controlled during the two tasks across juvenile development. The investigation will identify the maturation principles of cognitive flexibility in relation with the dynamic formation of prefrontal ensembles.