Apple interview question

How would you build an agent?