Managing resources in the framework of the civil construction sector is usually an extremely complex task. There are many factors contributing to this complexity: the variety and great number of existing resources, both human and material; the diversity of tasks that each working unit is able to execute; the performance of each working unit; the involved costs; and the spatial distribution of all resources over the different places, leading to the need for displacement from one site to another. All these important factors imply a high number of variables, resulting in a somewhat difficult optimization process. On the other hand, these factors are highly dynamic as a result of unpredictable situations responsible for the modification of the initial conditions, e.g., weather conditions, uncertainties attached to task duration, acquisition of new resources, technical problems related with those resources, and accidents. Such dynamics make it mandatory for the systems to have the capability to continuously adapt themselves to the evolving real conditions, overcoming usual limitations of classical inflexible solutions. To handle this problem, we set up MACIV a project whose goal is to design and implement a computer system, mainly based on distributed artificial intelligence techniques, enabling a decentralized management of the different available resources in civil construction companies. This problem was inspired by an existing large company whose experts are collaborating with us, both in the problem definition and in the system design phases. In this article, the overall multiagent system architecture is presented, and the employed techniques are explained, with special emphasis on our own contributions to the specific negotiation and agents' coalition formation protocols. In order to support the particulars of the application, original intercoalition and intracoalition negotiation algorithms and strategies were developed and are explained here. Finally an application example is described in order to illustrate how our proposal enables the system to reach a goad solution for a concrete scenario.