Grid computing and cloud systems are distributed systems which provide substantial widely-accessible services to resources. Quality of service is affected by the issues around resource allocation, sharing, task execution and node failure. The focus of this research is on task execution in distributed environments and the effects of node failure on service provision. Most methods in the literature which provide fault tolerance, use reactive techniques; these provide solutions to failure only after its occurrence. In contrast, this research argues that using multi-agent systems with self-organising capabilities can provide a proactive methodology which can improve task execution in open, dynamic and distributed environments. We have modelled a system of autonomous agents with heterogeneous resources and proposed a new delegation protocol for executing tasks within their time constraints. This helps avoid the loss of tasks and to improve efficiency. However, this method on its own is not sufficient in terms of task execution throughput, especially in the presence of agent failure. Hence, we propose, a self-organisation technique. This is represented in this research by two different mechanisms for creating organisations of agents with a certain structure; we suggest, in addition, the adoption of task delegation within the organisations. Adding an organisation structure with agent roles to the network enables smoother performance, increases task execution throughput and copes with agent failures. In addition, we study the failure problem as it manifests within the organisations and we suggest an improvement to the organisation structure which involves the use of another protocol and adding a new role. An exploratory study of dynamic, heterogeneous organisations of agents has also been conducted to understand the formation of organisations in a dynamic environment where agents may fail and new agents may join organisations. These conditions mean that new organisations may evolve and existing organisations may change