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.