First, we need a working definition of an agnostic. Let's start by examining the question answered by agnosticism: Do we know that there is a deity in the sense that we know other things of which we are certain? OR Is it possible to know that there is a deity? These are epistemological questions, and the agnostic answers them in the negative, claiming that either we do not know or that we cannot know whether or not any deity exists.
Many agnostics treat their response to this question as an answer to the ontological question: Is there a deity or set of deities? Agnosticism does not in fact answer this question, but atheism (along with theism and deism) does answer this question, and most Western agnostics are atheists in the sense that they would not answer this question affirmatively. Some would, but agnostic theists and agnostic deists are much less common than their agnostic atheist counterparts, probably because epistemology is a bit of an obscure branch of Western philosophy and most people don't have enough formal training in it to parse out the distinctions involved.
There are only two ways in which I can imagine the Buddha being an agnostic: in the sense that he believed that we either cannot know or do not know that deity or deities exist while still believing in them and talking about them (agnostic theism) or in the sense that he believed that it doesn't matter (practical agnosticism from rational ignorance).
It's most likely that the Buddha would have been practically an agnostic with regard to Western conceptions of deity. He does not seem to be a fan of metaphysical speculations because they are often a distraction from attaining the cessation of suffering, so he might have just moved on to what he considered more useful questions as seen in the discourse below.
Buddha: "Suppose, Malunkyaputra, that a man had been wounded by a poisoned arrow, and his friends and family are about to call a doctor. 'Wait!' he says. 'I will not let this arrow be removed until I have learned the caste of the man who shot me. I have to know how tall he is, what family he comes from, where they live, what kind of wood his bow is made from, what fletcher made his arrows. When I know these things, you can proceed to take the arrow out and give me an antidote for its poison.' What would you think of such a man?"
Malunkyaputra: "He would be a fool, Blessed One. His questions have nothing to do with getting the arrow out, and he would die before they were answered."
Buddha: "Similarly, Malunkyaputra, I do not teach whether the world is eternal or not eternal; whether the soul and body are the same or different; whether a person who has attained Nirvana exists after death or does not, or whether perhaps he both exists and does not exist, or neither exists nor does not. I teach how to remove the arrow: the truth of suffering, its origin, its end, and the Noble Eightfold Path."
And in another place...
"What do I not teach? Whatever is fascinating to discuss, divides people against each other, but has no bearing on putting an end to sorrow. What do I teach? Only what is necessary to take you to the other shore."
It's likely that the Buddha, given his reliance on direct experience and rejection of rationalism as well as a healthy suspicion of traditions and authorities contemporary with him, would share some of the skeptical traits that tend to characterize Western agnostics. But his rejection of rationalism (rooted in his distinctly Eastern philosophy of the mind) and his acceptance of direct experience without the use of the modern scientific method to counterbalance it would likely put him very much at odds with them in key ways, as we see in the quoted discourse from the Pali Canon below.
"Do not go by oral tradition, by lineage of teaching, by hearsay, by a collection of texts, by logic, by inferential reasoning, by reasoned cogitation, by the acceptance of a view after pondering it, by the seeming competence of the speaker, or because you think, 'The ascetic is our teacher.' But when you know for yourselves, 'These things are unwholesome; these things are blameable; these things are censured by the wise; these things, if undertaken and practiced, lead to harm and suffering.' then you should decide to abandon them."This all leads nicely into the answer to another question.
Related: Was the Buddha an Atheist?
This is a popular Google search question, and the Wikipedia article on the subject is actually pretty good.
The Buddha may have been technically an atheist specifically with regard to Western conceptions of a monotheistic omnipotent, omniscient, omnipresent, and omnibenevolent creator deity, for example. He does not seem to be a fan of metaphysical speculations because they are often a distraction from attaining the cessation of suffering, so I think it likely that he would have viewed some of the theological richness of Western religions somewhat askance and seen it as a hindrance to following the Eightfold Path to cross the River of Sorrow and come to the other shore.
Calling the Buddha an atheist in the sense that he did not have any beliefs in any sort of god is probably wrong. My readings of the Pali Canon suggest that the Buddha and his disciples accepted certain kinds of theistic claims with regard to Brahma. Specifically with reference to devas and asuras (gods and demons), it is fairly clear that they are a standard part of Buddhist cosmology. The below quotes from the Dhammapada help illustrate how routinely theistic concepts are invoked in Buddhist teaching.
"Even the gods praise the bhikshu who is contented and lives a pure life of selfless service."
"But who can blame those who are pure, wise, good, and meditative? They shine like a coin of pure gold. Even the gods praise them, even Brahma the creator."
"Even the gods envy the saints, whose senses obey them like well-trained horses and who are free from pride."
Add to this the frequent references to Mara the tempter demon, and the idea that the Buddha was comparable to the Western materialist and scientific realist who reaches atheism as a result just can't be maintained with any credibility.
"Therefore I say, dig up craving root and all, as you would uproot birana grass, if you don't want Mara to crush you as the stream crushes the reed on its banks."
"This is the path; there is no other that leads to the purification of the mind. Follow this path and conquer Mara."
"All the effort must be made by you; Buddhas only show the way. Follow this path and practice meditation; go beyond the power of Mara."
Related: Did the Buddha Believe in Hell (or Heaven)?
One of the other claims I have heard made (several years ago in the workplace) is that there is no hell in Buddhism. This is pretty flatly contradicted by the recorded teachings of the Buddha, as you can see below in the following quotes from the Dhammapada:
"If one harms the innocent, suffering will come in these ten ways. They may suffer grief, infirmity, painful accident, serious illness, loss of mind, legal prosecution, fearful accusation, family bereavement, or financial loss; or their house may burn down, and after death they may be thrown into the fire of suffering."
"He who transgresses the central law of life, who speaks falsely or scoffs at the life to come, is capable of any evil."
"Some are born again. Those caught in evil ways go to a state of intense suffering; those who have done good go to a state of joy. But the pure in heart enter nirvana."
Additionally, the following quotes show a pretty obvious belief on the Buddha's part that there is an afterlife for those who have practiced right conduct in their lives.
"Misers do not go to the world of the gods; they do not want to give. The wise are generous, and go to a happier world."
"In this dark world, few can see. Like birds that free themselves from the net, only a few find their way to heaven. Swans fly on the path of the sun by their wonderful power; the wise rise above the world, after conquering Mara and his train."
As a disclaimer, it is also fairly clear that the sorts of suffering and joyful afterlife states discussed by the Buddha, while they may be very long, are ultimately cut off by rebirth in which the person has another chance to attain Nirvana. The naraka of Buddhism is not quite the same thing as the eternal Hell of Christianity or Islam, nor is it quite the same thing as the Sheol of Judaism or the Hades of the Greeks.
In the end, it's extremely difficult to reach the conclusion that the Buddha would accept the Western notions of agnosticism, atheism, or scientific realism that so many who have only a superficial understanding of Buddhism would like very much to attribute to him.
By Hintha - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=11359793
Note: The above is a depiction of Mara tempting the Buddha.