The cytokine IL-17 is expressed in the brain, but its function is not known. Chen et al. found that the Caenorhabditis elegans orthologue of IL-17 regulates the aggregation of worms following a rise in environmental oxygen and that it mediates this effect by enhancing the responsiveness of the RMG interneuron that coordinates this response to presynaptic input from oxygen sensors. Thus, IL-17 might act as a neuromodulator that can potentiate neural circuit function.