1. A system comprising: a memory for storing a web log comprising a plurality of sequences of web actions; and a processor coupled to the memory and configured for: constructing, based on the web log, a plurality of sequences of related web actions directed toward web transactions, wherein the related web actions in each sequence are directed to an associated web transaction for the sequence, and wherein the constructing comprises: recording a stream of two or more web actions; identifying one or more repetitions within the stream to determine a plurality of boundaries of the plurality of sequences of related web actions; and segmenting the stream into the plurality of sequences of related web actions based on the identifying the one or more repetitions; grouping each set of similar web actions into an action class; mapping the plurality of sequences of related web actions into corresponding sequences of action classes; clustering each set of similar sequences of action classes into a cluster, wherein the action classes in the cluster are represented by a state machine, the state machine comprising: a plurality of states, each state representing a corresponding action class; and a plurality of transitions between pairs of the plurality of states; wherein the plurality of states and the plurality of transitions together form a plurality of paths through the state machine, the plurality of paths comprising a path corresponding to each sequence of web actions in the plurality of sequences of web actions; and generating an automated web task procedure from the state machine.