In the recent past, emergent computing based self-adaptive systems such as multi-agent swarms have become an attractive paradigm for designing large-scale distributed systems. In this paper, we consider a multi-agent swarm-based system for performing tasks in a domain characterized by search and execute operations. Our main focus is on the task allocation problem among the swarm units in our system. The main contribution of this paper is a multi-agent auction-based algorithm with dynamically adjustable bids that enables a swarm unit(agent) to plan its path efficiently while maintaining certain constraints on its cost and on the completion times of the tasks in the system. Experimental results of our algorithm within a simulated environment show that the auction-based algorithm performs significantly better than other heuristics-based strategies.