We constructed a fluorescent sensor of adenylate nucleotides by combining a circularly permuted variant of GFP with a bacterial regulatory protein, GlnK1, from Methanococcus jannaschii. The sensor's affinity for Mg-ATP was <100 nM, as seen for other members of the bacterial PII regulator family, a surprisingly high affinity given that normal intracellular ATP concentration is in the millimolar range. ADP bound the same site of the sensor as Mg-ATP, competing with it, but produced a smaller change in fluorescence. At physiological ATP and ADP concentrations, the binding site is saturated, but competition between the two substrates causes the sensor to behave as a nearly ideal reporter of the ATP:ADP concentration ratio. This principle for sensing the ratio of two analytes by competition at a high-affinity site probably underlies the normal functioning of PII regulatory proteins. The engineered sensor, Perceval, can be used to monitor the ATP:ADP ratio during live-cell imaging.