You have a couple of options here, depending on how complex your wqo agents are, and what they are trying to do.
My general advice would be to port your LotusScript (I'm assuming it's LS) to be Server Side Javascript and call it in the beforePageLoad event of your Custom Control or XPage. It's unlikely that, if you're setting fields etc, that the code can be ported directly across, but the logic should still be sound.
If you'd rather there are a couple of other things you could try:
- Convert your wqo agent to be AJAX enabled (using documentContext and the QUERY_STRING field) and call it in front end javascript using the dojo.xhrGet function. Again, with this you're going to need some extra logic to get a hold of the fields you want to set etc, but it's not difficult once you've understood the "#{id:myfield}" syntax (more here).
- You can manually run an existing agent using the syntax of:
var agent:NotesAgent = database.getAgent("myagent");
agent.runOnServer(optionalnoteid);
Hope these options help.
Matt