In this paper, we develop a general Open Multi-Agent Systems (OMAS) framework over undirected graphs where the agents' interaction is, in general, nonlinear, timevarying, and heterogeneous, in that the agents interact with different pairwise interaction rules for each link, possibly nonlinear, which may change over time. In particular, assuming the agents interact by exchanging flows, which modify their states, our framework guarantees that the sum of the states of agents participating to the network is preserved. To this end, agents maintain a state variable for each of their neighbors. Upon disconnection of a neighbor, such a variable is used to completely eliminate the effect of previous interaction with disconnected agents from the overall systems. In order to demonstrate the effectiveness of the proposed OMAS framework, we provide a case study focused on average consensus, and, specifically, we develop a sufficient condition on the structure of the agents' interaction guaranteeing asymptotic convergence under the assumption that the network becomes fixed. The paper is complemented by simulation results that numerically demonstrate the effectiveness of the proposed method.