In this paper we introduce a new agent-based approach for middleware in mixed mode environments. Mixed mode environments have different dimensions of heterogeneity: devices with widely differing capabilities, different soft- ware, and different communication technologies. To deal with these, each node in the network is seen as an inde- pendent entity: a device agent. These device agents are abstractions of the network nodes and they offer services corresponding to nodes' capabilities and also use services offered by other agents. Interoperability is achieved through an agent interaction interface. For the description of device types, capabilities and services a predefined but extensible ontology is used. This approach combines and adopts re- sults from the areas of multi agent systems and heteroge- neous ad hoc networks.