A Multi-Agent and Multi-Level Architecture to Secure Distributed Systems