Self-organization provides a suitable paradigm for developing self-managed complex computing systems,e.g., decision support systems. Towards this end, in this paper, a composite self-organization mechanism inan agent network is proposed. To intuitively elucidate this mechanism, a task allocation environment is simulated.Based on self-organization principles, this mechanism enables agents to dynamically adapt relationswith other agents, i.e., to change the underlying network structure, so as to achieve efficient task allocation.The proposed mechanism utilizes a trust model to assist agents in reasoning with whom to adapt relationsand employs a multi-agent Q-learning algorithm for agents to learn how to adapt relations. Moreover, inthis mechanism, it is considered that the agents are connected by weighted relations, instead of crisp relations.The proposed mechanism is evaluated through a comparison with a centralized mechanism and theK-Adapt mechanism in both closed and open agent networks. Experimental results demonstrate the adequateperformance of the proposed mechanism in terms of the entire network profit and time consumption. Additionally,a potential application scenario of this mechanism is also given, which exhibits the potential applicabilityof this mechanism in some real world cases.