Biological systems process information at different scales and adapt to their changing environment. Informed both by experimental observations and theoretical constraints, we propose a chemical model for sensing that incorporates energy consumption, information storage, and negative feedback. We show that a biochemical architecture enclosing these minimal mechanisms leads to the emergence of dynamical memory and adaptation. Crucially, adaptation is associated with both an increase in the mutual information between external and internal variables and a reduction of dissipation of the internal chemical processes. By simultaneously minimizing energy consumption and maximizing information, we find that far-from-equilibrium sensing dominates in the low-noise regime. Our results, in principle, can be declined at different biological scales. We employ our model to shed light on large-scale neural adaptation in zebrafish larvae under repeated visual stimulation. We find striking similarities between predicted and observed behaviors, capturing the emergent adaptation of neural response. Our framework draws a path toward the unraveling of the essential ingredients that connect information processing, adaptation, and memory in biological systems.