The simple answer is if you put light behind the material and you can see through it, then it is an Agate if you can’t then your holding Jasper. The more complex answer is that it is not always that straightforward. The simple science behind this question is that both Agates and Jaspers are comprised of Quartz- which is one of the most common minerals on the planet. Quartz is comprised of two major types- macrocrystalline (large crystal) and cryptocrystalline (small crystal).
Now here is where it can get confusing, one major variety of cryptocrystalline quartz is Chalcedony. Chalcedony includes Carnelian, Chrysoprase, Agate, Bloodstone, Jasper and others. When Chalcedony in concentrically banded it is called an Agate. Occasionally the banding is larger than the crystal and the banding is not visible- like with most Carnelian.
Another sub-variety of Chalcedony is opaque quartz called Jasper. Jasper can be banded or striated, depending on how it formed, and are most commonly red, yellow, green, brown or a mixture of these colors.
Examples of Macrocrystalline Quartz are clear quartz, Smokey Quartz, Amethyst, Citrine which form in a singular point or clusters. But these are neither an Agates nor a Jasper, so were moving on from these.
The main reason it is difficult to differentiate an Agate from Jasper is that they originate from the same minerals. Another major reason is due to the mislabeling of materials being cut in foreign countries as either an Agate or Jasper without considering the science in the naming process. We recognize this problem quite often, but for reasons of consistency in the marketplace we use the incorrect label.
I hope this taught you a little about the differences between Agate and Jasper.