Probably the 5th century BCE pre-socratic Greek philosopher, Protagorus, who said (at the beginning of his treatise on the gods):
Regarding the gods, I am not capable of knowing whether they exist or whether they do not exist, or what aspect [form] they might take. Too many things prevent us from knowing: their invisibility and the brevity of human life.
[Quoted in: The Forbidden Image: An Intellectual History of Iconoclasm, Alain Besancon, University of Chicago Press, 2000]
I haven’t been able to find an earlier affirmation of agnosticism (as opposed to atheism or theism). If someone knows of an earlier one, please let me know.
It’s interesting (to me) that it is Protagorus who probably made the first agnostic statement in history, for he is also attributed with being the originator of Sophism—the tradition of rhetoric—and, ultimately (at least according to Plato), relativism. Plato fiercely resisted Protagorus (as many theists and atheists resist relativism and postmodernism today). Anyone with a strong opinion about something is unlikely to think much of Protagorus.
Protogorus’s most famous saying can be interpreted in relativistic terms: “Man is the measure of all things: of things which are, that they are, and of things which are not, that they are not.” Protagorus is thus also sometimes credited as leading history in the direction of empiricism, for he wished for things to make sense from a human vantage. And ultimately agnosticism is a kind of empiricism. It is a way of saying: I withhold judgment on matters where the evidence is not available to me, or is unclear, and this includes matters concerning the existence of gods. I may have an opinion, or a leaning, but I do not profess to know.