Apple Interview Question

How would you build an agent?