You certainly do need ToolsRunMacro. Using WebQuerySave is too limiting because it only runs when you submit for save. If you create a button that executes ToolsRunMacro, then you can execute an agent at any time you want just by clicking the button. WebQuerySave does not run every time you click a formula button on a form. The onload, however, does run when any formula button completes processing.
I just built a web interface to an existing db that doesn’t open any document at all. The form that’s presented to the user is used to gather information. Upon clicking a button an agent retrieves and updates the real document (as well as creating other documents, as per the requirements of this particular process.) So in this particular case the WebQuerySave never executes because I never actually submit the form, so it couldn’t have been used.