1. A system comprising: a memory for storing a web log; a processor coupled to the memory and configured for: identifying sequences of related web actions from the web log; grouping each set of similar web actions into an action class; mapping the sequences of related web actions into corresponding sequences of action classes; clustering each set of similar sequences of action classes into a cluster, wherein relationships among the action classes in the cluster are represented by a state machine; and generating an automated web task procedure from the state machine.