Hi,
I have used both frameworks.
ns3-gym is a framework specifically developed for reinforcement learning, which enables the development of an OpenAI Gym interface for ns-3. It does work on the current version of ns-3. You just need to download it from the ns-3 App Store and place it on the contrib/ folder. ns3-ai is a more flexible framework that allows the integration of ns-3 with external processes, not limiting to AI. It uses shared memory to exchange information between the ns-3 simulation process and another process running on your PC.
Both frameworks work as intended, although ns3-gym does have some limitations if you plan to use more advanced reinforcement learning models (I tweaked ns3-gym to overcome its limitations). Depending on your objectives, you can see what framework suits you the best. For instance, if you plan to work on reinforcement learning, ns3-gym would ease the integration with common reinforcement learning Python libraries. If you plan to work on supervised learning, then ns3-ai is probably the easiest (only?) option.
To the best of my knowledge, both apps are not yet compatible with ns-3.36 and beyond, since they lack CMake support. However, it is very easy to convert the wscript script into the corresponding CMakeLists.txt.
Regards,
Eduardo Almeida