This paper describes ActionStreams, a system for inducing task models from observations of user activity. The model can represent several task structures: hierarchy, variable sequencing, mandatory vs. optional actions, and interleaved sequences. The task models can be used for just-in-time automation and for guidance in user interface design. Keywords Adaptive user interface, machine learning, task models, model-based user interface design, programming by demonstration