In mobile agents systems, classical techniques for system optimization are not applicable due to continuous changes of the
execution contexts. MAWeS (MetaPL/HeSSE Autonomic Web Services) is a framework whose aim is to support the development of
self-optimizing autonomic systems for Web service architectures. In this paper we apply the autonomic approach to the reconfiguration
of agent-based applications. The enrichment of the Aglet Workbench with a Web Services interface is described, along with
the extensions to the MAWeS framework needed to support the mobile agents programming paradigm. Then a mobile agents application
solving the N-Body problem is presented as a case study.