As wide-area open networks like the Internet and intranets grow larger, mobile agent technology is attracting more attention. Mobile agents are units of software that can deal with environmental changes and the various requirements of open networks through features such as autonomy, mobility, intelligence, cooperation, and reactivity. In addition, some people consider the agent technology as a promising solution to the reuse issue because of the aspect of the agents as highly adaptable software components. However, since the usual development methods of secure mobile agent applications are not sufficiently investigated, the technology is not yet widespread, In this paper, we propose a formal framework that supports mobile agent application development and reuse with consideration of the trade-offs between the security issues and the performance issues. In our framework, we design a mobile agent application by building a computational cost model and a security model, and combining patterns so that the combination satisfies the models. Therefore we can develop the application considering the security and the performance trade-offs. Since the models and the patterns are presented according to a formal framework, we can make sure that the pattern combination satisfies the models rigorously. In addition, if the security policy of the new environment is different from the old one in reusing the system in a new organization, we can easily modify and adapt the behavior because the pattern application can be figured out automatically by an algorithm.