Representative agent
Economists use the term representative agent to refer to the typical individual of a certain type (for example, the typical consumer, or the typical firm).
More technically, an economic model is said to have a representative agent if all agents of the same type are identical. Also, economists sometimes say a model has a representative agent when agents differ, but act in such a way that the sum of their choices is mathematically equivalent to the decision of one individual or many identical individuals. A model that contains many different agents whose choices cannot be aggregated in this way is called a heterogeneous agent model.
The notion of the representative agent can be traced back to the late 19th century. Francis Edgeworth (1881) used the term "representative particular", while Alfred Marshall (1890) introduced a "representative firm" in his Principles of Economics. However, after Robert Lucas, Jr.'s critique of econometric policy evaluation spurred the development of microfoundations for macroeconomics, the notion of the representative agent became more prominent and more controversial. Many macroeconomic models today are characterized by an explicitly stated optimization problem of the representative agent, which may be either a consumer or a producer (or, frequently, both types of representative agents are present). The derived individual demand or supply curves are then used as the corresponding aggregate demand or supply curves.

# Motivation
When economists analyze the behavior of a representative agent, this is because it is usually simpler to refer to one 'typical' decision maker instead of simultaneously analyzing many different decisions. Of course, economists must abandon the representative agent assumption when differences between individuals are central to the question at hand. For example, a macroeconomist might analyze the impact of a rise of oil prices on a 'typical', i.e. representative, consumer; but an analysis of health insurance would probably require a heterogeneous agent model (since health insurance, by definition, is a transfer of money from relatively healthy people to others with illnesses requiring expensive care).
Hartley (1997) discusses the reasons for the prominence of representative agent modelling in contemporary macroeconomics. The Lucas critique (1976) pointed out that policy recommendations based on observed past macroeconomic relationships may neglect subsequent behavioral changes by economic agents, which, when added up, would change the macroeconomic relationships themselves. He argued that this problem would be avoided in models that explicitly described the decision-making situation of the individual agent. In such a model, an economist could analyze a policy change by recalculating the decision problem of each agent under the new policy, and then aggregating these decisions to calculate the macroeconomic effects of the change.
Lucas' influential argument convinced many macroeconomists to build microfounded models of this kind. However, this was technically more difficult than earlier modelling strategies. Therefore, almost all the earliest general equilibrium macroeconomic models were simplified by assuming that consumers and/or firms could be described as a representative agent. General equilibrium models with many heterogeneous agents are much more complex, and are therefore still a relatively new field of economic research.

# Critique
Hartley, however, finds these reasons for representative agent modelling unconvincing. Kirman (1992), too, is critical of the representative agent approach in economics. Because representative agent models simply ignore valid aggregation concerns, they sometimes commit the so-called fallacy of composition.  He provides an example in which the representative agent disagrees with all individuals in the economy. Policy recommendations to improve the welfare of the representative agent would be illegitimate in this case. Kirman concludes that the reduction of a group of heterogeneous agents to a representative agent is not just an analytical convenience, but it is "both unjustified and leads to conclusions which are usually misleading and often wrong." In his view, the representative agent "deserves a decent burial, as an approach to economic analysis that is not only primitive, but fundamentally erroneous."
A possible alternative to the representative agent approach to economics could be agent-based simulation models which are capable of dealing with many heterogeneous agents. Another alternative is to construct dynamic stochastic general equilibrium models with heterogeneous agents, which is difficult, but is becoming more common (Rios-Rull, 1995).

# Literature
- Mauro Gallegati and Alan P. Kirman (1999): Beyond the Representative Agent, Aldershot and Lyme, NH: Edward Elgar, ISBN 1-85898-703-2
- James E. Hartley (1996): 'Retrospectives: The origins of the representative agent', Journal of Economic Perspectives 10: 169-177.
- James E. Hartley (1997): The Representative Agent in Macroeconomics. London, New York: Routledge, ISBN 0-415-14669-0
- Alan P. Kirman (1992): 'Whom or what does the representative individual represent?' Journal of Economic Perspectives 6: 117-136.
- Lucas, Robert E. (1976): 'Econometric policy evaluation: A critique', in K. Brunner and A. H. Meltzer (eds.) The Phillips Curve and Labor Markets, Vol. 1 of Carnegie-Rochester Conference Series on Public Policy, pp. 19-46, Amsterdam: North-Holland.
- Rios-Rull, Jose-Victor (1995): 'Models with heterogeneous agents', Chapter 4 in T. Cooley (ed.) Frontiers of Business Cycle Theory, Princeton University Press.