Calling Web agent from within XPages context

Hi Folks,I need to log in when I open a XPage from either Notes client or browser, so that the XPage carries the credential onwards, what happens if I call a Web agent from within the XPage by a link like this:

http://servername/databasename.nsf/agent

Will the credential be passed on to the agent as well, or I just need to log in again if necessary?

I don’t have Lotus Domino 8.5.1 server but local nhttp.exe, that is why I’m asking here.

Thanks

Subject: you need to enable the agent to run as the web user (check mark in agent properties)

and then it should run as the person who was logged in