A new proposed technique for secure agent communication is used to transfer data and instructions between agent and server in the local wireless network. The proposed technique depends on the two stages of encryption processing (AES algorithm and proposed Lagrange encryption key generation supported by XOR gate) for packets encryption. The AES key was manipulated by using proposed Lagrange interpolation key generated in order to avoid the weak encryption keys. A good multi encryption operation with a fast encryption time was proposed with a high quality connection operation.