Aglets is a mobile agent system that allows an agent to move with its code and execution state across the network to interact with other entities. Aglets utilizes Java RMI to support client-server inter-agent communication. However, Java RMI requires static stubs and skeletons to be precompiled and deployed at both the client and server before communication can take place. There are also issues of interoperability, where the single communication protocol is embedded in the Java RMI stubs and skeletons at compile time. Runtime connection to non Java RMI entities is therefore difficult if not impossible. In Aglets, the use of Java RMI runs counter to modern trends for late-binding and highly nomadic code in heterogeneous environments. To address these shortcomings, we have designed and implemented an alternative RMI architecture that is easily retrofitted into the existing Aglets distribution. We have adopted lightweight stubs generated dynamically by the client's supporting runtim...