This paper provides an extension of general equilibrium theory that incorporates the actions of individuals both as demanders and suppliers of goods and as members of firms, schools, social groups, and contractual relationships. The central notion of the paper is a
: a collection of individuals associated with one another for some purpose. The model takes as primitive an exogenous set of group types, interpretable as (potential) firms, schools, social groups, contracts etc. The types of schools and firms that materialize in equilibrium, as well as the way that agents acquire skills, are determined endogenously in a competitive market, as are the contracts they enter into, and the production and consumption of private commodities. Equilibrium exists and the core coincides with the set of equilibrium states. Examples and Applications illustrate the flexibility and power of the framework.