He was soon generally recognized as one of the most skillful organists of his time. The success of his comic opera, Il filosofo convinto in amore, performed at Potsdam in 1750, led to an appointment as court composer to Frederick the Great. In 1759, on the death of Carl Heinrich Graun, he was appointed conductor of the royal orchestra. He married the noted court operatic soprano Benedetta Emilia Molteni, despite the king's prohibition of court employees marrying each other. Because of this trespass, the king reduced Molteni's and Agricola's combined salaries to a single annual salary of 1,000 Thalers (Agricola's annual salary alone had been 1,500 Thalers). Agricola died in Berlin at age 54.
During his lifetime, Agricola wrote a number of Italian operas, as well as Lieder,chorale preludes, various other keyboard pieces and church music, especially oratorios and cantatas. His reputation chiefly rests, however, on his theoretical and critical writings on musical subjects. In 1754 he co-wrote, with Carl Philipp Emanuel Bach, an obituary for J.S. Bach. His 1757 Anleitung zur Singekunst (Introduction to the Art of Singing) is a translation of Pier Francesco Tosi's 1723 treatise Opinioni de' cantori antichi e moderni with Agricola's own extensive comments. He edited and added extensive commentary to the 1768 (posthumous) edition of Jakob Adlung's Musica mechanica organoedi (English translation). His annotations are considered an important source of information on J. S. Bach's views on the fortepiano designs of Gottfried Silbermann, on the lute-harpsichord, and on organ building. He is also noted in Bach studies as one of the copyists for both books of the Well-Tempered Clavier and the St. Matthew Passion.