pneumatic circuit

is that okay:
-presure switch
-main regulator
-2air tanks
-secondary regulator
-pressure vent valve

The vent valve and perssure switch should be on a tee out of the compressor. the other end of the tee should go to the tanks. After that the rest is good

If this is the order in which your system is connected then no. The pressure vent valve should be located prior to the regulator.

However, you can store more energy if the the two storage tanks are connected after the pressure switch and before the pressure regulator. This method is also legal if you also make the change above.