Social rituals, like male-male aggression in Drosophila, are often stereotyped and its component behavioral patterns modular. The likelihood of transition from one behavioral pattern to another is malleable by experience and confers flexibility to the behavioral repertoire. Experiential modification of innate aggressive behavior in flies alters fighting strategies during fights and establishes dominant-subordinate relationships. Dominance hierarchies resulting from agonistic encounters are consolidated to longer lasting social status-dependent behavioral modifications resulting in a robust loser effect. We show that cAMP dynamics regulated by Rut and Dnc but not the neuropeptide Amn, in specific neuronal groups of the mushroom body and central complex, mediate behavioral plasticity necessary to establish dominant-subordinate relationships. rut and dnc mutant flies are unable to alter fighting strategies and establish dominance relationships during agonistic interactions. This real time flexibility during a fight is independent of changes in aggression levels. Longer-term consolidation of social status in the form of a loser effect, however, requires additional Amn neuropeptide mediated inputs to cAMP signaling and involves a circuit-level association between the α/β and γ neurons of the mushroom body. Our findings implicate distinct modalities of cAMP signaling in mediating plasticity of behavioral patterns in aggressive behavior and in the generation of a temporally stable memory trace that manifests as a loser effect.