Aaahh I see - Sorry about that.
He documents a method of using an XPage as a call-able agent.
The XPage doesn't have to actually render anything - Just generate a response.
You simply place the SSJS code you want to compute in the afterRenderResponse event of the XPage, and return the computed value back to the calling script.
It has worked brilliantly for me, and I have used it in exactly the same scenario as you are proposing.
HOWEVER, I have experienced a strange issue when using this technique.
My agent (Xpage) is called many times over the course of a visit to the site, so I have a feeling it is related to the documented APAR.
It is handled for the moment with an event handler that restarts the HTTP task whenever it goes astray, but I'm hanging out for 8.5.3 to see if that's a cure.
Hope this helps this time!