APM rest api

This depends on how the agent will be started - if the class library is in an ASP.NET Classic application and you use the IIS module, then it'll pick up the configs from web.config as described here - same for ASP.NET Core and appsettings.json.

But if you let's say embed the class library into a .NET Framework console application, then in that case the agent will only read environment variables - even if you manually parse an ApSettings.config file - there would be a way to pass the config to the agent - we can discuss that, but that'll need some coding on your side.

I guess the ASP.NET + web.config will cover your scenario, but I'm not sure - if not, and using environment variables are too bad, let's follow up.