Gun shops that sell ultrasonic cleaners also sell cleaning solutions for that application. In general, there are two types, one for parts cleaning and the other for shell preparation. It only takes a capfull per tank, so it goes a long way.
The best cleaner for brass contains a low-sudsing detergent with EDTA. It is slightly basic, and will not etch brass unless you leave it in the solution for a couple of days.
Solutions for general cleaning and degreasing usually contain citric acid and a stronger detergent. It can also be used for brass, but is more agressive than EDTA. Vinegar (acetic acid) is not particularly effective, but causes no harm either. It smells bad, so it must be doing some good
For cleaning parts, Simple Green works well. I use it on carburetors and bicycle parts. For cleaning barrels and receivers, nothing works as well as elbow grease and a brass brush.
Ultrasonic cleaning is not a short cut to avoid stripping and disassembly. Grease is fairly resistant to ordinary gun cleaning agents, but ultrasonic cleaning will strip it bare. In any event, you must rinse everything well with clean water and dry it before use. Gun parts must be greased or lubricated and reassembled.