: Presented is the vision of the authors on how diverse web services may be composed, mediated by dynamic task coalitions of agents performing tasks for service requestors. The focus and the contribution of the paper is the proposal of the layered web service mediation architecture. Middle Agent Layer is introduced to conduct service request to task transformation, agent-enabled cooperative task decomposition and performance. Presented are the formal means to arrange agents’ negotiation, to represent the semantic structure of task-activity-service hierarchy and to assess fellow-agents’ capabilities and credibility factors. Finally, it is argued that the presented formal technique is applicable to various application domains. Presented is the ongoing work on building agent-based layered architecture for intelligent rational information and document retrieval mediation in frame of the RACING1 project.