How could an agent obtain the server IP?

Hello,

How my scheduled agent could automatically obtain the IP Adress from his server?? It´s possible?