Whole organism–based small-molecule screens have proven powerful in identifying novel therapeutic chemicals, yet this approach has not been exploited to identify new cognitive enhancers. Here we present an automated high-throughput system for measuring nonassociative learning behaviors in larval zebrafish. Using this system, we report that spaced training blocks of repetitive visual stimuli elicit protein synthesis–dependent long-term habituation in larval zebrafish, lasting up to 24 h. Moreover, repetitive acoustic stimulation induces robust short-term habituation that can be modulated by stimulation frequency and instantaneously dishabituated through cross-modal stimulation. To characterize the neurochemical pathways underlying short-term habituation, we screened 1,760 bioactive compounds with known targets. Although we found extensive functional conservation of short-term learning between larval zebrafish and mammalian models, we also discovered several compounds with previously unknown roles in learning. These compounds included a myristic acid analog known to interact with Src family kinases and an inhibitor of cyclin dependent kinase 2, demonstrating that high-throughput chemical screens combined with high-resolution behavioral assays provide a powerful approach for the discovery of novel cognitive modulators