UL Recognized AGM batteries, or UL Listed complete energy storage system with lithium (which isn't a guarantee they won't catch fire, just that it won't give your insurance company any excuses).
https://www.cpsc.gov/Recalls/2020/l...e-energy-storage-batteries-due-to-fire-hazard
AGM has cycle life of a few hundred cycles to 75% DoD (varies with brand.) I used SunXtender, cost $5000 for 20kWh gross capacity, 14 kWh usable. You might get by with $1400 for 5 kWh. Since it is for grid backup, I don't expect enough cycles to wear it out over a decade. Large PV array, relatively small battery, runs A/C and everything else during the day but have to turn off most things at night.
For an off-grid system cycling every night, lithium batteries might last 5x as many cycles so could last 10 years of nightly cycling. If they are reliable, which 95% of brands tested are not.
DIY LiFePO4 might cost $2000 for 15 kWh gross capacity, which does make it an attractive alternative to AGM.
Most rooftop systems are wired outside to a disconnect. Maybe with RSD at the panel and a control outside, it's OK. to have the conduit disappear through the roof to interior. I would use rigid for the exposed portion with a service entrance cap.
Batteries are the most expensive and least reliable or shortest lived part of the system, so if they can be minimized or eliminated that would be better. SolArk is a hybrid that I think can operate without batteries, so could be added later. SMA Sunny Boy can generate up to 2kW 120VAC direct from PV while grid is down (confirm that is compatible with RSD). Addition of (high voltage lithium) Sunny Boy Storage or (low voltage AGM or lithium) Sunny Island makes a backup system. Instead of SolarEdge, StorEdge allows addition of a battery. Some other brands are much lower priced.
SolarEdge brand uses optimizers that provide RSD. SMA uses an RSD box:
Each PV system is unique. Different roof structures, system alignments and various types of shading influence the PV system's energy yield. Thanks to the innovative TS4-R module technology, energy yields can be increased.
www.sma-america.com