As is well-known, John Wesley was an Arminian while George Whitefield kept to a Reformed understanding of the doctrine of election. As the story goes, “when Wesley had passed away, someone asked Whitefield whether he thought that he would see Wesley in heaven. Whitefield answered that he didn’t think so – since he believed that Wesley would be standing so much nearer to the throne than he himself that he wouldn’t be able to see him.” Obviously, this story, or at least this version of it, must be apocryphal since Whitefield had already been dead for more than twenty years when Wesley passed away in 1791.
What is true, however, is that in his memorial sermon at the death of Whitefield in 1770, Wesley praised the qualities of the deceased and said about their differences: “There are many doctrines of a less essential nature … In these we may think and let think; we may ‘agree to disagree.’ But, mean time, let us hold fast the essentials of the faith, which was once delivered to the saints.”
According to the Wikipedia articles on “John Wesley” and on “Agree to Disagree,” this sermon by Wesley constitutes the first publication in history in which the phrase “agree to disagree” was put into print, while Whitefield himself had already used it in a letter dated June 29, 1750. Is this true or is it again an apocryphal story? A quick search in Google Books gives us the answer:
William Wycherley (ca. 1641–1716) used “agree to disagree” in his poem “An Epithalamium on the Marriage of Two very Ill Natur’d Blacks, who were to have their Liberty, in consideration of their Match,” published in his Miscellany Poems in 1706. At that moment John Wesley was only three years old, while Whitefield was still to be born.
However, before one starts claiming that Wycherley has coined the term “agree to disagree,” let’s have a second look in the Google Books archive. A century before the publication of Wycherley’s poems, the phrase was already used The Protestants Apologie for the Roman Church by “John Brereley, Priest” (=James Anderton, 1557–1613), in a discussion of how protestants themselves criticize their English Bible translations: “our learned adversaries do thus agree to disagree in their owne translations.”
However, what’s in a phrase? If I understand Brereley correctly, the expression has still a different meaning here. He does not seem to mean that the various brands of protestants accept of each other that they all have their own preferred translation. His sentence could rather be paraphrased as: “All of our learned adversaries [= protestants of various brands] disagree in [= criticize] their own [English, protestant] translations.”
So, if one does not want to count this as the first instance of the phrase “agree to disagree,” we are back at Wycherley’s poem, in which he addresses two slaves who expect to get freedom by marrying to each other but who will now be slaves to each other and in which he says towards the end: “Who, like Black Fiends, agree to disagree, | Each other’s Torment, out of Love to be.”
Leaving the further analysis of this poem and its usage of our phrase to someone more competent in Wycherley’s poetry, as for now our conclusion must be that John Wesley was simply not the first to put the phrase “agree to disagree” in print.
Or who could still disagree?
 A. Huijgen, “Brochure over HeartCry,” Refoweb, December 11, 2008, https://www.refoweb.nl/vragenrubriek/14116/brochure-over-heartcry. Huijgen presents this story as a “famous anecdote.”
 John Wesley, A Sermon on the Death of the Rev. Mr George Whitefield (London: J. and W. Oliver, 1770), 23 (italics original), https://books.google.be/books?id=OSZcAAAAQAAJ; cf. Wikipedia contributors, “John Wesley,” Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=John_Wesley&oldid=890936859 (accessed April 12, 2019).
 Wikipedia contributors, “John Wesley,” Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=John_Wesley&oldid=890936859 (accessed April 12, 2019); Wikipedia-bijdragers, “John Wesley,” Wikipedia, de vrije encyclopedie, https://nl.wikipedia.org/w/index.php?title=John_Wesley&oldid=52058818 (accessed April 12, 2019); Wikipedia contributors, “Agree to disagree,” Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Agree_to_disagree&oldid=870861636 (accessed April 12, 2019);
Wikipedia-bijdragers, “Agree to disagree,” Wikipedia, de vrije encyclopedie, https://nl.wikipedia.org/w/index.php?title=Agree_to_disagree&oldid=50557390 (accessed April 12, 2019).
The English Wikipedia articles refer to: The Phrase Finder, “The Meaning and Origin of the Expression: Agree to Disagree,” https://www.phrases.org.uk/meanings/agree-to-disagree.html (accessed April 12, 2019).
 W. Wycherley, Miscellany Poems: As Satyrs, Epistles, Love-Verses, Songs, Sonnets, &c. (London: Jeffery Wale, 1706), 432, https://books.google.com/books?id=pSb4vEcaPBcC.
 Wikipedia contributors, “James Anderton (controversialist),” Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=James_Anderton_(controversialist)&oldid=718552172 (accessed April 12, 2019).
 Iohn Brereley, The Protestants Apologie for the Roman Church, Divided into Three Severall Tracts (n.p.: 1608), 259 (italics added), https://books.google.be/books?id=srlbAAAAQAAJ.