A method for configuring an automated dialogue system, comprising: collecting a plurality of traces (410, 412, 414) of interactions with a web server via a graphical user interface, GUI, each trace (412, 414) including interactions taken in a single session between a user and the web server; identifying interactive elements in a web page of one or more presentations of the GUI; associating templates of a plurality of templates with portions of the trace (412, 414) by extracting interactive elements from the web page, each template having one or more defined inputs and a defined output and wherein each template relates to a form configured to: be filled by a user in the GUI; specify the structures in the web page associated with filling the form; specify the nature of the information that is returned; configuring the system with the plurality of templates which can be invoked to process the portions of the traces (412, 414); wherein for each execution trace of the collected execution traces, and a set of predefined templates each having a defined output and set of inputs, a template configurator 420 of the system aligns the execution trace with a sequence of instances of the templates and with a machine learning model that assigns instantiated templates to each structure in each trace resulting in inferred dialogue scripts and association of inputs with structures of web pages providing the mechanism for mapping inputs to the output of the template; configuring the automated dialogue system with the configured templates; and once the templates for a web site have been extracted and the dialogue system has been trained to use the templates filling out one or more interactive elements in the web page using the one or more defined inputs and extracting information for arguments already provided on the page by preserving the alignments between properties in one or more inputs and with the interactive elements in the web page. collecting a plurality of traces (410, 412, 414) of interactions with a web server via a graphical user interface, GUI, each trace (412, 414) including interactions taken in a single session between a user and the web server; identifying interactive elements in a web page of one or more presentations of the GUI; associating templates of a plurality of templates with portions of the trace (412, 414) by extracting interactive elements from the web page, each template having one or more defined inputs and a defined output and wherein each template relates to a form configured to: be filled by a user in the GUI; specify the structures in the web page associated with filling the form; specify the nature of the information that is returned; configuring the system with the plurality of templates which can be invoked to process the portions of the traces (412, 414); wherein for each execution trace of the collected execution traces, and a set of predefined templates each having a defined output and set of inputs, a template configurator 420 of the system aligns the execution trace with a sequence of instances of the templates and with a machine learning model that assigns instantiated templates to each structure in each trace resulting in inferred dialogue scripts and association of inputs with structures of web pages providing the mechanism for mapping inputs to the output of the template; configuring the automated dialogue system with the configured templates; and once the templates for a web site have been extracted and the dialogue system has been trained to use the templates filling out one or more interactive elements in the web page using the one or more defined inputs and extracting information for arguments already provided on the page by preserving the alignments between properties in one or more inputs and with the interactive elements in the web page. be filled by a user in the GUI; specify the structures in the web page associated with filling the form; specify the nature of the information that is returned; configuring the system with the plurality of templates which can be invoked to process the portions of the traces (412, 414); wherein for each execution trace of the collected execution traces, and a set of predefined templates each having a defined output and set of inputs, a template configurator 420 of the system aligns the execution trace with a sequence of instances of the templates and with a machine learning model that assigns instantiated templates to each structure in each trace resulting in inferred dialogue scripts and association of inputs with structures of web pages providing the mechanism for mapping inputs to the output of the template; configuring the automated dialogue system with the configured templates; and once the templates for a web site have been extracted and the dialogue system has been trained to use the templates filling out one or more interactive elements in the web page using the one or more defined inputs and extracting information for arguments already provided on the page by preserving the alignments between properties in one or more inputs and with the interactive elements in the web page.