Optical biosensors for short peptide motifs, an important class of biomarkers, have been developed based on "affinity clamps", a new class of recombinant affinity reagents. Affinity clamps are engineered by linking a peptide-binding domain and an antibody mimic domain based on the fibronectin type III scaffold, followed by optimization of the interface between the two. This two-domain architecture allows for the design of allosteric coupling of peptide binding to fluorescence energy transfer between two fluorescent proteins attached to the affinity clamp. Coupled with high affinity and specificity of the underlying affinity clamps and rationally designed mutants with different sensitivity, peptide concentrations in crude cell lysate were determined with a low nanomolar detection limit and over 3 orders of magnitude. Because diverse affinity clamps can be engineered, our strategy provides a general platform to generate a repertoire of genetically encoded, label-free sensors for peptide motifs.