The above needs to be tempered. Our positivist and reductionist scientific worldview makes claims that go too far for a pragmatist. From a section in Lecture 47 of Daniel N. Robinson's The Great Ideas of Philosophy, 2nd Edition:
[William] James the pluralist is not a relativist of the modern stripe. He countered the reigning positivism of his day with fallibilism. There is always more to the account than any current version can include, because there are always other experiences, other beliefs, and needs. We must conduct ourselves in such a way as to record what we take to be our highest interests, while never knowing if we have them right or have matched our interests by our actions. There is no final word.The most profound lesson of modernism is to recognize the limits of our reason, the limits to knowlege, and the ultimate fallibility or each of us. The existentialist is right in noting that we project ourselves into our future with a hope that has no foundation. In the end we all die, but we live as if we would live forever. We theorize as if there is "ultimate truth" when in fact we live in a very small corner of an inconceivably huge universe in which we don't even know how many physical dimensions exist or whether there are other "universes out there" beyond our ken.
William James was, above all, a realist: We must accept what is. Unlike the positivists, however, James took this to mean that we must accept that there is a religious element to life, because credible report points to the existence of one, as well as to a striving to perfect oneself and to needs that go beyond the individual soul or body. There are, however, things that we cannot finally know. The fallibilist doesn't deny that there is some absolute point of focus on which human interests can converge, but we are warned to be suspicious of those who come to us with final answers.
In some deep sense we are a "brain in a box" but science has not plumbed the depths of what this means. Yes, we are "only" matter in motion. But that matter, the brain, is so infinitely more complex than a figure like de La Mettrie had not a hint of what it truly means. And just as de La Mettrie claimed more than he really knew, so today's scientists and philosophers make claims far beyond what will be ultimately revealed. The universe is far more complex and mysterious than the human mind will ever comprehend. But that doesn't mean that we don't enjoy the quest. Knowledge and truth are still the shining lights on high that we strive to attain.