Which earlier writings? The Pali Canon, which is the earliest, is FILLED with theistic notions.
Zen came wayy after, which was more or less predicated on earlier Japanese Buddhism that integrates a great deal of Shinto beliefs.
These are not agnostic.
It is definitely a religion. But I'd like to add the remark that the earlier writings in particular (those attributed to the Buddha and those of early Zen masters) focus mostly on meditation practice and ethics and are quite agnostic about other (e.g. existential) questions.