Existing systems are able to learn information agents through demonstration that provide programmatic access to web-based information. However it is still difficult for end users to combine these information agents in procedures that are customized to their particular needs. We combine learning by demonstration with learning by instruction to build a system to learn such procedures with a small amount of human input. The instruction system relies on knowing the input-output types of the information agents in order to combine them. We make use a system that learns to predict the types from examples to simplify this part of the task. Our instruction system performs a search that has interesting similarities with proof search in explanation-based learning.