Since everyone seems to be discussing microfoundations, perhaps I should note some posts I've done on the topic. This one begins with a long discussion from Rajiv Sethi of some work on this by Duncan Foley, followed by some of my comments on the difficulties that macroeconomists encounter when trying to aggregate heterogeneous agents:
Those comments are based in large part upon a paper by Alan Kirman. [One note, I was probably too pessimistic about resolving the aggreagtion problem. There have been advances on this problem recently, but it's still not clear it can be satisfactorily overcome in gerneral. This paper was emailed to me the other day, and it discusses the heterogenous agent/aggregation problem in more detail.]
Let me add a bit to the post linked above. I encourage you to read Kirman's section on networks (toward the end of the paper), and the rest of the paper as well, but let me note his general comments:
The general lesson
At the risk of being repetitive, let me say again that we have to acknowledge that the direct interaction between agents and the way in which that interaction is organized has fundamental consequences for aggregate economic outcomes. When agents are directly linked to each other and influence each other, the relationship between the behavior of individuals and the behavior of aggregate variables will be different than in the anonymous market situation in which all agents are linked to each other only through the price system. What we observe at the aggregate level will not mimic what we observe at the individual level, nor will it correspond to the behavior of some “representative individual”. Moreover the rationality which we attribute to economic individuals in order to justify and analyze the behavior of aggregates may have to be modified. Thus the structure of the relationships between individuals, firms or groups is of profound importance if we are to understand aggregate or macro economic behavior. We should, indeed, be interested in the passage from micro to macro economic behavior, but this cannot be understood without taking into account the way in which individuals' decisions and actions are influenced by the networks of connections that link them to other agents. Furthermore, one will not, in general, be able to represent the behavior of the aggregate as the behavior of some average or representative individual. Just as neurologists would not think of explaining behavior by studying the changes in a representative neuron nor should economists try to explain aggregate phenomena in this way.
This does not mean that one should not be interested in what happens at the micro level, but rather, that the passage to the aggregate level is mediated by the network structure in which individuals find themselves. Neurologists will continue to examine what happens at the molecular level but would not argue that there is some simple passage from that level to the aggregate activity of the brain which does not involve the network of interactions between neurons.
Of course, as economists, unlike neurologists, we do not usually descend as far as the level of the neurons of economic agents, but, as interest in so-called “neuro-economics” has developed it has been argued that economic behavior is very much determined by the network of neurons that is activated in a certain situation and that as the situation changes another network may become active. Thus even at this level it is the network structure of the neurons that is important (see Oullier et al (2008). To return to another analogy, we would not expect to be explain how much food is stored by a colony of ants by looking at the behavior of individual ants in isolation. The organization of the ants plays an essential role. This example raises an important point. Far from complicating things, taking direct account of interaction and the networks which organize it, actually makes life simpler for the economic theorist. This is because the reasoning and calculating capacities we need to attribute to economic agents may be substantially less than it is in standard models. Individuals operating with simple rules in a limited context may, together, generate rather sophisticated behavior on the aggregate level. In other words, aggregation itself may be what is structuring market or group behavior. ...