Once an ssh-agent has been launched per /etc/X11/profile.d/ssh-agent.sh, it is never killed explicitly. As the Xsession process is terminated, there is no way to get the PID of the ssh-agent.
There are no need to kill \"ssh-agent -u\".
When you leave console, just execute \"ssh-add -D\".
The only downside left is that $SSH_AGENT_PID is lost with the first server shutdown. Anyway, it has little added utility.