The original vision of ubiquitous computing is about enabling people to more easily accomplish tasks through the seamless interworking of the physical environment and a computing infrastructure. A major challenge to the practical realization of this vision involves the integration of commercial-off-the-shelf (COTS) hardware and software components: consider the awkwardness of such a mundane task as exporting a textual memo written on a Palm Pilot to a Microsoft Word document. It is not enough to overcome the protocol and data format mismatches that currently impede the interoperation of these entities: for the user experience to be truly seamless, we must provide a framework for the dynamic connection of such endpoints on demand, to support the ad-hoc interactions that are an integral part of ubiquitous computing. To this end, we offer a dynamic mediation framework called Paths. A Path consists of dynamically instantiated, automatically composable operators that bridge datatype and protocol mismatches between components wishing to communicate. Because operator composability is inferred from the type system, adding support for a new type of endpoint requires only incremental work; because the control and data flow for Paths are largely decoupled from the communicating endpoints, it is easy to connect COTS or legacy components. We describe the Paths architecture, our prototype implementation, and our experience and lessons based on several production applications built with the framework, and outline some continuing work on Paths in the context of the Stanford Interactive Workspaces project.