Difficulty understanding the role of istio-agent in the configuration of Envoy proxy belonging to a service mesh

Pilot uses ADS APIs to configure the Envoy proxy for each service or the configs are first pushed to the istio-agent and then mapped to the proxy.

I am unable to understand the role of istio-agent while configuring the proxies. The documentation does not provide sufficient information.

According to the documentation, the istio-agent run inside a pod and is used to requests certificates from citadel using an open gRPC connection. However, nothing is stated about proxy configurations and service discovery. Can someone kindly share the sources where I can get detailed information about the Istio-agent.