Abstract. The proliferation of services on the web is leading to the formation of service ecosystems wherein services interact with one another in ways not necessarily foreseen during their development or deployment. A key challenge in this setting is service mediation: the act of retrofitting existing services by intercepting, storing, transforming, and (re-)routing messages going into and out of these services so they can interact in unforeseen manners. This paper addresses a sub-problem of service mediation, namely service interface adaptation, that arises when the interface that a service provides does not match the interface that it is expected to provide in a given interaction. The paper focuses on reconciling mismatches between behavioural interfaces, i.e. interfaces that capture ordering constraints between interactions. It presents a declarative approach to service interface adaptation based on: (i) an algebra over behavioural interfaces; and (ii) a visual language that allows pairs of provided-required interfaces to be linked through algebraic expressions. These expressions are fed into an execution engine that intercepts, buffers, transforms and forwards messages to enact the adaptation logic.