A sinkhole attack attempts to harm wsn’s where in an intruder attempts to redirect all network traffic towards itself, by providing false routing data. This has an adverse effect on the network load balance as well as it provides a stage for other attacks to go through as well. This makes it extremely important to monitor, detect and avoid this attack on network. Our system proposes we a more secure routing algorithm designed to protect against sinkhole attacks that is based on mobile agents to be used on mobile MWSN’s. We show the results based on simulation how our algorithm can avoid such attacks on MWSN’s.