You can call org.jboss.as.server.CurrentServiceContainer#getServiceContainer() to do this, however it is trickey from a JavaAgent (as the module will not be available from the agent's class loader).
Unfortunately there is no getting around this, as none of the API classes you need will be available in the module. As I see it you have a few different options:
1) Use reflection to get hold of this class, and then use reflection to make the calls
2) Create a class that does this directly, and then make sure it is loaded from the server module (which has access to the classes you need).
There may be some other options, but that is all I can think of of the top of my head.
If you want more info on how to implement either of these approaches feel free to ask me on hipchat.
Stuart