Section 13 of the AGPLv3 says
...if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version...
So when do you modify the program? The license text says:
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission
So the central question is whether your combination of new code plus unaltered AGPL-licensed code creates a derivative or combined work under copyright law, such that you would need to permission from the copyright holder to prepare it:
- If so, you must make the source code of your entire work (which comprises your work and the AGPL-licecnsed work) available to network users.
- If not, and your work is actually separate from the AGPL work under copyright law, then you do not satisfy the criteria in Section 13 and the AGPL does not impose its source-sharing requirement on you.
Whether the linkage or interaction between the two works will create a derivative work is not an exact science. The FSF's opinion is captured in their GPL FAQ:
What is the difference between an “aggregate” and other kinds of “modified versions”?
Where's the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication [...] and the semantics of the communication [...]
[...] If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.
By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.
For the second part of your question, see How do I detect an AGPL violation?.
Practically determining if a particular web service uses AGPL-licensed code in a way that the license would require source availability: this, too, is an inexact science. To a limited degree, the same problem exists in non-networked software: how do you determine if closed-source software A secretly and illegally includes work from copyleft-licensed software B? In that case, we can do reverse engineering on the binary, but it can be extremely difficult, especially if the closed-source project deliberately obfuscated their use of the copyleft code.
Ultimately, this is very difficult practical problem, and it could be very hard (harder than it is already for non-network software) to prove infringement. In general, you might have a reasonable case if you can demonstrate an uncanny similarity (e.g., it has the same bugs as your software) or if the service provider outright admits using your AGPL-licensed software. The degree to which a court could demand to examine the source code or development correspondence of such a potentially-infringing service surely varies by jurisdiction, and is possibly untested is some jurisdictions.
If you are seriously concerned about this, you may want to speak to an experienced intellectual property lawyer in your jurisdiction who might tell you your options and how a court would go about judging the merits of such a copyright infringement case.