The incremental growth of computer networks caused by new users joining the network results in a confidentiality problem with the transmission of data. To solve this problem, symmetric / asymmetric key cryptography is mostly used. However, this cipher suffers from the problem of secret key maintenance and distribution across the internet which is unsecure channel. To get rid of this problem, different key exchange schemes have been developed and classified as a key redistribution scheme, key distribution scheme and key agreement scheme. In this paper, a key agreement scheme based on a multi-agent system is developed. This scheme aims to exchange the secret key between two parties. The mobile agent is the heart of this scheme where it carries the program that is responsible for generating the secret key.