In economics, an agent is an actor (more specifically, a decision maker) in a model of some aspect of the economy. Typically, every agent makes decisions by solving a well- or ill-defined optimization or choice problem.
For example, buyers (consumers) and sellers (producers) are two common types of agents in partial equilibrium models of a single market. Macroeconomic models, especially dynamic stochastic general equilibrium models that are explicitly based on microfoundations, often distinguish households, firms, and governments or central banks as the main types of agents in the economy. Each of these agents may play multiple roles in the economy; households, for example, might act as consumers, as workers, and as voters in the model. Some macroeconomic models distinguish even more types of agents, such as workers and shoppers or commercial banks.
In agent-based computational economics, corresponding agents are "computational objects modeled as interacting according to rules" over space and time, not real people. The rules are formulated to model behavior and social interactions based on stipulated incentives and information. The concept of an agent may be broadly interpreted to be any persistent individual, social, biological, or physical entity interacting with other such entities in the context of a dynamic multi-agent economic system.
An economic model in which all agents of a given type (such as all consumers, or all firms) are assumed to be exactly identical is called a representative agent model. A model which recognizes differences among agents is called a heterogeneous agent model. Economists often use representative agent models when they want to describe the economy in the simplest terms possible. In contrast, they may be obliged to use heterogeneous agent models when differences among agents are directly relevant for the question at hand. For example, considering heterogeneity in age is likely to be necessary in a model used to study the economic effects of pensions; considering heterogeneity in wealth is likely to be necessary in a model used to study precautionary saving or redistributive taxation.