During the past few years, there have been growing interests in using email for delivering various types of messages such as social, financial, etc. There are also people who use email messages to promote products and services or even to do criminal activities called Spam email. These unwanted messages are sent to different target population for different purposes and there is a growing interest to develop methods to filter such email messages. This paper presents a method to filter Spam email messages based on the keyword pattern. In this article, a multi-agent filter trade based on the Bayes rule, which has benefit of using the users’ interest, keywords and investigation the message content according to its topic, has been used. Then Nested Neural Network has been used to detect the spam messages. To check the authenticity of this proposed method, we test it for a couple of email messages, so that it could determine spams and hams from each other, effectively. The result shows the superiority of this method over the previous ones including filters with Multi-Layer Perceptron that detect spams.