https://www.gnu.org/licenses/gpl-faq.en.html
"However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and nonfree programs communicate at arms length, that they are not combined in a way that would make them effectively a single program."
I think you can interact with GPL/AGPL and retain your code propietary by:
- Don't modify the AGPL program.
- Run separatly, using docker container, vm etc
- Interact with CLI, REST API, filesystem, database etc
- Keep the AGPL interaction only to your program, non public consumption, minimum the surface of distirbution the code.
- Keep your code non directly interact, such as avoid use node npm dependencies directly, avoid library linking, use api gateway, use thirdparty module.