Astrocytes, glial cells of the central nervous system, help to regulate neural circuit operation and adaptation. They exhibit complex forms of chemical excitation, most prominently calcium transients, evoked by neuromodulator and -transmitter receptor activation. However, whether and how astrocytes contribute to cortical processing of complex behavior remains unknown. One of the puzzling features of astrocyte calcium transients is the high degree of variability in their spatial and temporal patterns under behaving conditions. Here, we provide mechanistic links between astrocytes' activity patterns, molecular signaling, and behavioral cognitive and motor activity variables by employing a visual detection task that allows for in vivo calcium imaging, robust statistical analyses, and machine learning approaches. We show that trial type and performance levels deterministically shape astrocytes' spatial and temporal response properties. Astrocytes encode the animals' decision, reward, and sensory properties. Our error analysis confirms that astrocytes carry behaviorally relevant information depending on and complementing neuronal coding. We also report that cell-intrinsic mechanisms curb astrocyte calcium activity. Additionally, we show that motor activity-related parameters strongly impact astrocyte responses and must be considered in sensorimotor study designs. Our data inform and constrain current models of astrocytes' contribution to complex behavior and brain computation beyond their established homeostatic and metabolic roles.