Providing security for the customers in the e-commerce system is an essential issue. Providing security for each single online customer at the same time is considered a time consuming process. For a huge websites such task may cause several problems including response delay, losing the customer orders and system deadlock or crash, in which reduce system performance. This paper aims to provide a new prototype structure of multi agent system that solve the problem of providing security and avoid the problems that may reduce system performance. This is done by creating a software agent which is settled into the customer device to be responsible of purchase and encryption process without the customer interfering. The proposed agent avoids the problem of deadlock (i.e., break down) and the loss of requests which provides the required protection for information transmitted among all entities. Experimental results showed that employing software agent to manage purchase and encryption tasks improve system performance by 10% and increase system response time by 30.5%.