This is a good primer on an interesting concept:
http://www.codeproject.com/gen/design/MobileAgents.asp