Scenario: Host A, has an algorithm which computes function f. A wants to send its mobile agent to B which holds input x, to compute f(x). But A doesn't want B to learn anything about f.
Scheme: Function f is encrypted in a way that results in E(f). Host A then creates another program P(E(f)), which implements E(f), and sends it to B through its agent. B then runs the agent, which computes P(E(f))(x) and returns the result to A. A then decrypts this to get f(x).
Drawbacks: Finding appropriate encryption schemes that can transform arbitrary functions is a challenge. The scheme doesn't prevent denial of service, replay, experimental extraction and others.