How to use ProxyAgent with http_proxy and no_proxy environment variables

Im looking into how to use ProxyAgent to enable the functionality of https_proxy and http_proxy environment variables but I cant quite make sense of the documentation (https://www.npmjs.com/package/proxy-agent/v/6.4.0).
If I instantiate a new ProxyAgent, how do I pass in the uri? Would it be something like

new ProxyAgent({uri:process.env.http_proxy})

The documentation says that ProxyAgent will take an options argument of type ProxyAgentOptions, but im not sure what the ProxyAgentOptions should look like and if it even accepts a uri parameter.

Also how will ProxyAgent know to use http_proxy or the https_proxy variable? Is that logic that ProxyAgent handles or would I have to implement that logic myself? Same for a no_proxy list; Is that something that ProxyAgent can handle? Or would I have to implement no_proxy logic myself. Asking because I couldnt find documentation explaining this.