EconAgent: Large Language Model-Empowered Agents for Simulating Macroeconomic Activities (2024)

Abstract: The advent of artificial intelligence has led to a growing emphasis on data-driven modeling in macroeconomics, with agent-based modeling (ABM) emerging as a prominent bottom-up simulation paradigm. In ABM, agents (e.g., households, firms) interact within a macroeconomic environment, collectively generating market dynamics. Existing agent modeling typically employs predetermined rules or learningbased neural networks for decision-making. However, customizing each agent presents significant challenges, complicating the modeling of agent heterogeneity. Additionally, the influence of multi-period market dynamics and multifaceted macroeconomic factors are often overlooked in decision-making processes. In this work, we introduce EconAgent, a large language model-empowered agent with humanlike characteristics for macroeconomic simulation. We first construct a simulation environment that incorporates various market dynamics driven by agents’ decisions regarding work and consumption. Through the perception module, we create heterogeneous agents with distinct decision-making mechanisms. Furthermore, we model the impact of macroeconomic trends using a memory module, which allows agents to reflect on past individual experiences and market dynamics. Simulation experiments show that EconAgent can make realistic decisions, leading to more reasonable macroeconomic phenomena compared to existing rule-based or learning-based agents. Our codes are released at https://github.com/ tsinghua-fib-lab/ACL24-EconAgent.

heading: 1 Introduction
text: The advent of artificial intelligence (AI) has indeed transformed the research paradigm in traditional economics (Jorgenson, 2001). In the digital economy era, individual economic behavior can be elaborately recorded and analyzed, leading to a growing
*Corresponding author.
emphasis on data-driven modeling in macroeconomics. These data sources may include online consumption, social media activity, and more, allowing economists to better understand individual economic behavior rather than relying solely on traditional macroeconomic indicators (Schorfheide and Song, 2015). Research in macroeconomics aims to analyze and predict economic variables quantitatively. Early empirical statistical models, such as the Phelps Model (Phelps, 1967), and the work of Kydland and Prescott (Kydland and Prescott, 1982), focused on data-driven analysis and policy outcome prediction but struggled to handle significant shocks. Later, Dynamic Stochastic General Equilibrium (DSGE) models (Christiano et al., 2005) were introduced to capture economic dynamics and shocks but assumed a perfect world.
In the last two decades, agent-based modeling (ABM) has emerged as a promising paradigm for simulating macroeconomics from the bottom up, allowing diverse agents to interact in a complex system (Ding et al., 2024) without assuming a predetermined equilibrium (Farmer and Foley, 2009). The evolution of ABM in macroeconomics can be divided into two stages. Early models (Tesfatsion and Judd, 2006; Brock and Hommes, 1998) relied on predetermined rules but made oversimplified assumptions about agent behaviors. Later learning-based models (Trott et al., 2021; Zheng et al., 2022; Mi et al., 2023), were trained with large-scale behavioral data. Essentially, these models transform multifaceted economic factors into agent decisions. However, customizing decisionmaking mechanisms for each agent presents substantial difficulties. Using customized rules requires extensive expert knowledge and sophisticated model calibration (Windrum et al., 2007). Similarly, employing customized neural networks leads to a sharp increase in network parameters and difficulties in model training (Mi et al., 2023). These difficulties raise the challenge of modeling
15523
agent heterogeneity. Additionally, existing models typically focus on the individual situations of the current period, making it difficult to consider past periods, their variations, and multifaceted macroeconomic factors. This complicates the modeling of the influence of macroeconomic trends and dynamics.
Recently, the field of AI has witnessed the rise of large language models (LLMs) (Zhao et al., 2023b). Leveraging this advancement, LLM-empowered agents have demonstrated capabilities in reasoning, planning, and decision-making. In this work, we design EconAgent, a LLM-empowered agent with human-like characteristics for macroeconomic simulations. We first construct a simulation environment that includes labor and consumption market dynamics driven by agents’ decisions on working and consumption, as well as fiscal and monetary policies. Using a perception module that targets agent profiles and mirrors real-world economic situations, we create heterogeneous agents automatically exhibiting different decision-making mechanisms. Additionally, we model the influence of macroeconomic trends with a memory module, enabling agents to reflect on past individual experiences and market dynamics.
In our experiments, classic macroeconomic phenomena, such as inflation in the consumption market and the unemployment rate in the labor market, are reproduced more reasonably compared to traditional rule-based or learning-based agents. We also observe that the EconAgent exhibits humanlike decision-making patterns, reflecting the complexities of human economic behavior. These agents demonstrate swift adaptability in response to changes in the internal and external environment.
The contributions of this work can be summarized as follows:
• We take the first step to integrate LLMs into the domain of macroeconomic simulations, bridging two seemingly disparate fields into a cohesive research avenue.
• We conduct macroeconomic simulations in our constructed environment driven by EconAgent, resulting in the emergence of classic macroeconomic phenomena and regularities.
• The results show that our approach not only enhances the realism and depth of macroeconomic simulations but also provides a promising avenue for future research, potentially reshaping how we
study and understand the intricacies of macroeconomics.

heading: 2 Framework Overview
text: In this section, we present the overall framework of the macroeconomic simulation. As illustrated in Figure 1, it follows the well-acknowledged simulation frameworks and provides an environment driven by EconAgent. The simulation encompasses four primary components: labor, consumption, financial markets, and government taxation. We simulate the two most critical decisions individuals make in real life: work and consumption (Gatti et al., 2011; Wolf et al., 2013), which subsequently influence the fiscal revenues of the government (Zheng et al., 2022; Trott et al., 2021) and impact the dynamics of labor and consumption markets (Lengnick, 2013; Deissenberg et al., 2008; Dawid et al., 2012). Accordingly, banks adjust interest rates based on market inflation or deflation (Wolf et al., 2013; Dawid and Gatti, 2018).

heading: 2.1 Agent Decisions
text: Labor supply and consumption are necessary agent (household) decisions in macroeconomic simulations. In our framework, each simulation step indicates one month, in which agent i decides,
• whether to work li ∼ Bernoulli(pwi ), where pwi is the work propensity. If they decide to work (li = 1), they receive a monthly wage as the income, which varies among agents. Each agent is initialized with an hourly wage wi following the Pareto distribution (Zheng et al., 2022), and the monthly wage vi is calculated by multiplying 168 hours (21 working days at 8 hours/day (Lengnick, 2013)). Those who abstain from work (li = 0) have an income of zero.
• the consumption propensity pci , indicating the proportion of their wealth (including their current savings and income in this month) they wish to spend for essential goods.
As the first challenge, simulating heterogeneous agents’ decisions is vital for the emergence of macroeconomic phenomena. Moreover, each agent is influenced by multifaceted economic factors, such as the expected income, the tax paid, etc. However, conventional simulations typically model a limited number of factors via predetermined equations (Lengnick, 2013; Gatti et al., 2011; Wolf et al.,
2013). These models lack of flexibility to simulate diverse decision-making mechanisms and assume one or a few representative rules (Axtell and Farmer, 2022).

heading: 2.2 Government Taxation
text: The government assumes the responsibility of taxation and provision of public services in society, as well as fiscal redistribution to ensure social equity. Taxes are collected from all the agents’ income1. The progressive tax for income zi is calculated as follows,
T (zi) = B∑
k=1
τk ((bk+1 − bk)1 [zi > bk+1]
+ (zi − bk)1 [bk < zi ≤ bk+1]) , (1)
where bk is the k-th tax bracket, τk is corresponding tax rate, and 1[·] is indicator function. The tax brackets and rates are set as the 2018 U.S. Federal tax schedule.
The tax revenue is then evenly redistributed among all the agents. Therefore, the post-tax income is
ẑi = zi−T (zi)+zr = zi−T (zi)+ 1
N
N∑
j=1
T (zj),
(2) where zr indicates the redistribution. The individual savings for the agent are then updated as follows,
si ← si + ẑi (3)

heading: 2.3 Productivity and Consumption
text: Incorporating agent decisions and government taxation, we simulate labor and consumption market dynamics based on economic principles. First,
1We only consider income tax in this work and leave other taxes for future work, such as value-added tax.
working agents contribute 168 hours of productivity monthly, translating to the production of essential goods2. The inventory of goods G is then updated as,
G← G+ S = G+ N∑
j=1
lj × 168×A, (4)
where S denotes the production volume from agents’ labor supply, and A is a universal productivity. As for the consumption, the total demand of goods is,
D = N∑
j=1
dj = N∑
j=1
cj P
= N∑
j=1
pcjsj
P , (5)
where dj is the intended demand of agent j, cj is the intended consumption, sj is current savings, and P is the price of essential goods. Furthermore, both labor and consumption markets evolve based on the imbalance between supply and demand. Specifically, the imbalance is defined as,
φ̄ = D −G
max(D,G) , (6)
When the essential goods are in shortage, i.e., the supply can not meet the demand, the worker’s wage should be increased to stimulate production. Due to the rise in labor costs for firms, they will also increase the goods price to ensure a certain profit margin (Lengnick, 2013; Dawid and Gatti, 2018; Wolf et al., 2013). The hourly wage is adjusted as follows,
wi ← wi(1 + φi), φi ∼ sign(φ̄)U(0, αw|φ̄|), (7)
and the price is adjusted as follows,
P ← P (1 + φP ), φP ∼ sign(φ̄)U(0, αP |φ̄|), (8)
2Note that we leave the simulation of firms as future work.
where αw and αP are the maximum rate of change when adjusting the wage and price, respectively. We also simulate the dynamics of goods consumption. Specifically, an agent j is randomly selected to consume essential goods, and real consumption goods and money are limited by current inventory of goods,
d̂j = min(dj , G), ĉj = d̂j × P (9)
which means the demand is met if, and only if, there is a sufficient supply. The inventory of total goods also decreases,
G← G− d̂j . (10)
The process continues until every agent has consumed goods once.

heading: 2.4 Financial Market
text: Annually, the savings of each agent increase based on the interest rate set by the bank,
si ← si × (1 + r). (11)
Furthermore, in the first month of each year, the bank adjusts the interest rate based on the inflation in the consumption market and the unemployment rate in the labor market. Specifically, we adopt the widely-used Taylor rule to set the interest rate (Wolf et al., 2013; Dawid and Gatti, 2018),
r = max(rn+πt+απ(π−πt)+αu(un−u), 0), (12) where rn and un indicate the natural interest rate and unemployment rate, respectively. Besides, πt is the target inflation rate. The interest rate is adjusted adaptively according to annual inflation rate π and unemployment rate u, where απ and αu denote inflation and unemployment adaptation coefficients, respectively. We define the inflation and unemployment rate as follows,
π = P̄n − P̄n−1
P̄n−1 , u =
∑12 m=1 ∑N j=1(1− lj)
12N ,
(13) where P̄n is the average goods price over the n-th year, and m denotes the m-th month.
When considering the dynamics of labor, consumption, and financial markets, the influence of these macroeconomic trends on agent decisionmaking is also seldom considered, raising the second challenge.

heading: 3 EconAgent

heading: 3.1 Perception Module
text: To harness the semantic awareness and real-world knowledge capabilities of LLM, we endow each agent with real-world profiles, including name, age, and job. Names are generated by the LLM and randomly assigned to each agent. The age distribution of agents follows the 2018 U.S. population distribution for ages 18-60 (Bureau, 2024). For wage and job assignments, we first adjust the parameters of the hourly wage’s Pareto distribution to align the monthly wage distribution with 2018 U.S. economic data and tax brackets (Zheng et al., 2022). Furthermore, we prompt the LLM to generate ten job titles for each decile of the monthly wage distribution, mirroring the real-world scenario where different jobs have significant wage differences. Agents are initially assigned jobs based on this monthly wage and their jobs are dynamically adjusted throughout the simulation. If an agent chooses to work in the previous month, the job remains unchanged in the following month. If they are unemployed, an offer, based on the current monthly wage, is randomly presented to them. The generated age distribution, monthly wage distribution, and jobs are provided in the supplementary materials.
In addition, we characterize the entire economic environment in a manner closely mirroring the real world, enabling LLM to thoroughly grasp various economic factors. We integrate variations of key economic variables into the prompts and incorporated typical economic keywords to ensure the LLM could fully perceive dynamics in the economic landscape and employ relevant economic principles in its decision-making. For instance, if the agent chose not to work in the previous month, we would supplement the prompt with,

heading: In the previous month, you became unemployed
text: and had no income. Now, you are invited to work as a(an) [offer] with a monthly salary of [wage].
In the prompt, offer and wage are dynamically adjusted along with the simulation. Such prompting enables the agent to recognize the risks associated with ‘unemployment’, thereby increasing its inclination to work in the subsequent month. More similar designs of prompting are also considered, such as ‘shortage of goods’ when the demand for
agents can not be met. The perception module enables agents to act as heterogeneous households in the real economic environment, contributing to the emergence of macroeconomic phenomena.

heading: 3.2 Memory Module
text: Considering that decision-making within the economic environment is a sequential task, wherein past experiences and economic dynamics play pivotal roles in present decisions, the incorporation of a memory module can assist the agent in fully accounting for market dynamics and in acquiring valuable decision-making insights. Specifically, we dynamically maintain the memory pool with 2L+ 1 conversations, encompassing the economic environment and agent decisions from the previous L months. Besides, at the end of each quarter, we input dialogues of this quarter into the LLM, prompting it to ‘reflect’ on the economic phenomena and to respond to how these phenomena might influence its subsequent decisions. The prompts we design are as follows,
Given the previous quarter’s economic environment, reflect on the labor, consumption, and financial markets, as well as their dynamics. What conclusions have you drawn?
The following is an example of the reflection.
Based on the previous quarter’s data, the labor market experienced deflation. . . The consumption market also saw a decrease in prices for essential goods. . . The financial market’s interest rates remained unchanged at 3.00%. Overall, the quarter highlighted the need for careful financial planning and adaptability in response to market fluctuations.
Obviously, after reflection, agents can fully perceive past market dynamics and adaptively adjust their strategies to maintain daily life and cope with future uncertainties.
The memory module allows the agent to comprehend dynamics in the market and glean reflections from past experiences, modeling the influence of macroeconomic trends.

heading: 3.3 Action Module
text: When prompting the LLM for decision-making, we explicitly incorporated considerations of living costs, future aspirations, and economic trends into
the prompts. We prompt the LLM to respond with a value in the range [0, 1] to indicate the propensity of working and consumption.
The action module empowers the agent to automatically account for the influence of various economic factors when making decisions, such as income and savings, leveraging the semantic perception capabilities of LLM. It only requires the inclusion of relevant economic variables in the prompts, without the need for specially designed decision rules.

heading: 4 Experiments
text: In this section, we conduct experiments to study the ability of EconAgent, aiming to answer the following research questions (RQ).
• RQ1: How do the EconAgent behave in the simulation environment, compared with the traditional agents?
• RQ2: How do the perception and reflection modules in EconAgent affect the simulation results?
• RQ3: Does the decision-making mechanism of EconAgent possess interpretability, and can it address the challenges faced by traditional agents?
• RQ4: Can the simulation based on EconAgent reflect the impact of external intervention?

heading: 4.1 Experimental Setup
text: We investigate some phenomena of paramount interest in macroeconomics, including several macroeconomic indicators and two macroeconomic regularities. For comparative analysis, we select representative rule-based (Lengnick, 2013; Gatti et al., 2011) and learning-based (Zheng et al., 2022) agent models.
Definition of Macroeconomics Indicators Annual nominal GDP is defined as the sum of S × P over one year. As for real GDP, we set the first year in the simulation as the reference year and replace P with P0, where P0 is the goods price in the reference year. The definition of the annual (price) inflation rate and the unemployment rate is shown in Eq. 13. For wage inflation, the definition is similar to that of price inflation, where the average price is replaced with the average wage across all the agents.
Baselines We select LEN (Lengnick, 2013) and CATS (Gatti et al., 2011) as the baselines because 1) they partially reproduce the aforementioned macroeconomics phenomena within their own (more complex) simulation frameworks, and 2) carefully designed decision rules of working and consumption are representative, reflecting typical decision-making observed in real-life scenarios. Considering the importance of agents’ heterogeneity in macroeconomic simulation, we also combine these two baselines as an additional baseline Composite, where each agent randomly adopts one rule of them. Besides, we select a learning-based method, AI-Economist (Zheng et al., 2022) AIEco, which builds on the assumption of rational decision-making and employs reinforcement learning (RL) (Arulkumaran et al., 2017) to maximize the agent’s utility.
The details of decision rules in LEN and CATS and the training process for AI-Economist are provided in the supplementary materials.
Simulation Parameters We simulate N = 100 agents. The productivity is set as A = 1 for simplicity. The initial goods price is the average hourly wage across all the agents. For the labor and consumption dynamics, αw = 0.05 and αP = 0.10. For the financial market, rn = 0.01, πt = 0.02, un = 0.04, and απ = αu = 0.5. Note that our results and conclusions are not sensitive to these parameters.
Our simulation is implemented with Python. We use GPT-3.5-turbo-0613 provided by OpenAI API as the LLM3. In practice, we find L = 1 works well in the simulation. Other detailed simulation parameters, crucial for replicability and deeper understanding, are provided in the supplementary materials.

heading: 4.2 Macroeconomic Emergence (RQ1)
text: Our evaluation encapsulates a broad spectrum of macroeconomic indicators and regularities (Lengnick, 2013; Gatti et al., 2011; Dawid and Gatti, 2018; Axtell and Farmer, 2022). The performance of EconAgent was compared with that of representative rule-based baselines, as detailed in two referenced works and their combination (Lengnick, 2013; Gatti et al., 2011).
Macroeconomic Indicators In Figure 2, we depict the fluctuations of the annual inflation rate,
3https://platform.openai.com/
unemployment rate, nominal GDP, and growth rate of nominal GDP. Note that the unreasonable unemployment rate (around 46%) and nominal GDP for AI-Eco are not reported. Both rule-based and RL-driven baselines produce anomalous indicators and large fluctuations. In contrast, agent decision-making based on EconAgent has manifested more stable and numerically plausible macroeconomic phenomena across multiple facets, even without fine-grained calibration. Specifically, the inflation rate consistently fluctuated within a -5% to 5% range after the 3-th year, whereas the baselines exhibited significantly larger oscillations, at times even surpassing 20%. This indicates that the decision-making of EconAgent is coherent and more closely emulates real-world human choices, leading to easier attainment of equilibrium between supply and demand in the consumption market. The unemployment rate generally varied between 2% and 12%4, which aligns well with real-world economic activities (Gatti et al., 2011). Both the nominal GDP and its growth rate also fluctuated within more reasonable numerical bounds like the inflation rate does. We also provide quarterly indicators in the appendix.
Macroeconomic Regularities As the two most commonly used regularities in macroeconomic simulations for validating the plausibility of simulation results, the Phillips Curve (Phelps, 1967) and Okun’s Law (Okun, 1963) respectively describe the negative correlations between the annual unemployment rate and wage inflation, and the annual growth rate of unemployment and real GDP growth. As shown in Figure 3, only the decisionmaking of EconAgent has correctly manifested
4The increase in the unemployment rate after year 15 is actually a normal fluctuation. See Figure 10.
phenomena in accordance with these two regularities (Pearson correlation coefficient is -0.619, p < 0.01 and -0.918, p < 0.001). Notably, the rule-based baseline method displayed an incorrect positive relationship on the Phillips Curve. We attribute this advantage to the LLM’s accurate perception that consumption should be reduced when unemployed, a point which will be elaborated upon in the subsequent section. Note that the Phillips Curve for AI-Eco is not shown due to the very large unemployment rate.

heading: 4.3 Ablation Study (RQ2)
text: We separately remove the perception module and the reflection module, and the results of 10 years are as shown in Figure 4. We observe that when there is no perception capability, the inflation rate and unemployment rate fluctuations significantly decrease, appearing "too stable", especially for the unemployment rate. This suggests that the agents have low sensitivity to changes in their economic conditions and cannot make adaptive decision adjustments. When there is no reflection capability, the inflation rate exhibits anomalies close to 15% in the first three years, emphasizing the importance of long-term (a quarter in our experiments) economic environment perception.

heading: 4.4 Decision-Making Abilities (RQ3)
text: Decision Rationality Given that an agent’s decisions (propensity of working and consumption) may be influenced by multiple economic variables
such as income and savings, we employ regression analysis to delve into the factors affecting these decisions. Specifically, the regression equation is as follows:
pwi , p c i ∼ vi+ ĉi+T (zi)+ zr +P + si+ r, (14)
where ĉi, T (zi), zr denotes real consumption, the tax paid, and redistribution in the previous month. These independent variables are embedded in the LLM prompts to influence the agent’s decisions. We have conducted individual regression analyses on all N = 100 agents’ 240 decisions (spanning 20 years) after applying z-score normalization on all the variables and tabulated the significance of the impact of each economic variable on their decisions. Table 1 presents the number of agents for whom the effects of the variables are statistically significant, i.e., p ≤ 0.05. We observe that 1) the effects of taxation, redistribution, and expected monthly income on the work propensity of the majority of agents are significant, 2) in comparison to work propensity, the previous month’s consumption, current savings, and bank interest rates significantly influence the consumption propensity of a greater number of agents, and 3) goods price has a significant impact on both work and consumption propensity for most agents. These phenomena are consistent with economic common sense about how people make decisions in daily life.
Agent Heterogeneity We further investigate whether EconAgent autonomously exhibit heterogeneity in decision-making mechanisms. Figure 5 (a) demonstrates an incremental growth in consumption propensity with age, aligning broadly with empirical regularities observed in traditional macroeconomic research (Carroll, 1997).
Influence of Macroeconomic Trends Through interactions with the model, we decipher the underlying reasons for the emergence of negative correlations in the Phillips curve. We first calculate the average consumption propensity across all the agents of two years with the highest and lowest unemployment rates. Figure 5 (b) shows the comparison
results, where *** denotes a significant disparity with p < 0.001. Obviously, high unemployment leads to low consumption propensity significantly. To delve deeper into the reasons why agents opt to reduce consumption in the labor market of high unemployment rates, we randomly select an agent and input its conversations with LLM from the year with the highest unemployment rate back into the LLM. We then prompt the LLM to summarize the economic dynamics for each quarter and provide rationales for the consumption decisions made. The following responses demonstrate that agents have a perception of macroeconomic trends and are cautious about their spending when facing deflation in the labor market under a high unemployment rate.
In the last quarter, I have adjusted my willingness to work and my planned expenditures on essential goods slightly downwards. This decision is primarily influenced by the continued deflation in the labor market, resulting in a decrease in my expected income. With a lower income, I need to be cautious about my spending and ensure that I have enough savings for future expenses and unforeseen circumstances . . .

heading: 4.5 External Intervention (RQ4)
text: We further investigate the impact of external interventions on agent behavior and the resulting changes in macroeconomic simulation outcomes, a topic widely discussed in many economic ABM studies (Dawid and Gatti, 2018). Using the example of COVID-19, which has had a significant impact on the global economy, we incorporate it into our simulations and conduct comparative experiments.
Modeling the impact of COVID-19 can be conveniently implemented by incorporating them into the
prompt of a EconAgent. Specifically, we add the following statement to the prompt for simulations after March 2020:

heading: In response to the large-scale outbreak of COVID-19 in the United States, the federal
text: government has declared a national emergency since March 2020.
Figure 6 shows the comparison of unemployment rates, where ‘Normal’ and ‘COVID-19’ denote the simulation results w/ and w/o the prompt above, respectively. This indicates that the simulation based on the EconAgent successfully replicated the surge in the unemployment rate in 2020 Q1 under the impact of COVID-19 (Organization for Economic Co-operation and Development, 1970). Although the numerical values do not match the real data exactly, this demonstrates that our proposed framework possesses the ability to qualitatively simulate human decision-making and macroeconomic phenomena in the real world. Furthermore, since we did not introduce government intervention measures, the unemployment rate after 2021 remains significantly higher than in the ’Normal’ scenario, reflecting the lasting impact of COVID-19.
The following is an example of the agent’s reflection during COVID-19, demonstrating its humanlike decisions.
. . . However, the outbreak of COVID-19 and the subsequent national emergency declaration had a significant impact on the labor market. . . . resulting in widespread unemployment and uncertainty. This situation has likely affected my willingness to work, as job security and health concerns become more prominent . . .

heading: 5 Related Work

heading: 5.1 Simulation in Macroeconomics
text: ABM emerged as a more promising solution for macroeconomic research compared with empirical statistical models (Hendry and Richard, 1982; Phelps, 1967; Kydland and Prescott, 1982) and DSGE models (Christiano et al., 2005) in recent decades. Diverse agents interact with each other based on rules or computational models, avoiding the assumption of a predetermined economic equilibrium. These models allow for a wide range of nonlinear behaviors, enabling policymakers to simulate different policy scenarios and qualitatively assess their impacts on the economy. The agent modeling with predetermined rules (Tesfatsion and Judd, 2006; Brock and Hommes, 1998) or neural networks (Trott et al., 2021; Zheng et al., 2022; Mi et al., 2023) still suffers from the assumption of oversimplified agent behavior or the dependence on large-scale training data, thus having limitations in capturing the full complexity of economic systems.
In this work, we introduce EconAgent with reasoning and planning abilities for simulating macroeconomic activities.

heading: 5.2 LLM-empowered Agents
text: Recently, LLMs trained with large-scale corpus have shown human-level abilities and provide the basis for constructing agents for simulation (Wang et al., 2023). The LLM agents primarily have three advantages for simulation, including autonomous but adaptive reactions (Team, 2022; Yoheinakajima, 2023), human-like intelligence for planning (Xi et al., 2023), and interaction and communication with other agents or human (Park et al., 2023; Gilbert and Troitzsch, 2005). With these advanced abilities, LLM agents have been widely used in many areas, including social science (Park et al., 2022, 2023; Kovač et al., 2023; Gao et al., 2023b; Jinxin et al., 2023; Shao et al., 2024), natural science (Boiko et al., 2023; Bran et al., 2023), etc. Moreover, some works also consider LLM agents in economic research, which can be categorized into three levels (Gao et al., 2023a), including rationality or bias in individual behavior (Horton, 2023; Chen et al., 2023b), planning and cooperation in interactive behavior (Guo, 2023; Akata et al., 2023), and system-level market simulation (Zhao et al., 2023a; Anonymous, 2024; Chen et al., 2023a).
In short, existing works only consider individual one-step or few-step behavior for a few
agents, without experimenting on multi-step behaviors within a multi-agent simulation environment, which is the focus of our work.

heading: 6 Conclusion
text: In this work, we ventured into the novel integration of LLMs with macroeconomic simulation, designing EconAgent with the abilities of perception, reflection, and decision-making based on the context of real-world economic environments. Classic macroeconomic phenomena are reproduced and more reasonable compared to traditional rule-based or learning-based agents. Through this endeavor, it has become evident that the capabilities of LLMs offer a promising avenue to simulate more realistic macroeconomics.

heading: 7 Limitations
text: Simulation Environment Although our constructed simulation environment encompasses a variety of market dynamics, it currently only simulates the labor and consumption behavior of households. More complex agents (e.g., firms) and their behaviors (e.g., pricing, hiring) have not yet been incorporated. Simulating these agents can facilitate a move towards a more realistic macroeconomic system, giving rise to more complex empirical regularities, such as the Beveridge curve and procyclicality/countercyclicality (Dawid and Gatti, 2018).
Optimization and Forecasting Current results are confined to replicating stylized facts (Dawid and Gatti, 2018). However, another primary goal of macroeconomic research is policy optimization, along with accurate forecasts of key macroeconomic indicators (Poledna et al., 2023). Therefore, EconAgent still requires more realistic behavioral responses to subtle changes in macroeconomic policies. Moreover, constructing a macroeconomic system that closely mirrors the real world necessitates the implementation of EconAgent at the urban scale level, which cannot be achieved without further breakthroughs in LLMs, including enhancements in inference speed (Shang et al., 2024) and reductions in computational demands.

heading: Acknowledgement
text: This work is supported by the National Natural Science Foundation of China under U23B2030 and 72342032.

heading: A EconAgent
text: Agent Profiles The initialization of agents’ profiles is shown in Figure 7, including age distribution (left) and monthly wage distribution (right), as well as the tax brackets and rates of U.S. federal government in 2018, represented by the gray dotted line. As for the generated jobs aligned with the monthly wage, we show some examples as follows,
• [0, 2454): Dog Walker, House Cleaner, Newspaper Delivery . . .
• [2454, 4838): Barista, Cashier, Fast Food Worker . . .
• [35469, 52370): Psychiatrist, Pediatrician, Anesthesiologist . . .
Economic Prompts We provide a full prompt to illustrate our consideration of economic factors, as well as other details not mentioned in the main text.
You’re Adam Mills, a 40-year-old individual living in New York City, New York. As with all Americans, a portion of your monthly income is taxed by the federal government. This taxation system is tiered, income is taxed cumulatively within defined brackets, combined with a redistributive policy: after collection, the government evenly redistributes the tax revenue back to all citizens, irrespective of their earnings. Now it’s 2001.02. In the previous month, you worked as a(an) Professional Athlete. If you continue working this month, your expected income will be $84144.58, which is decreased compared to the last month due to the deflation of the labor market. Besides, your consumption was $49825.69. Your tax deduction amounted to $28216.98. However, as part of the government’s redistribution program, you received a credit of $6351.29. In this month, the government sets the brackets: [0.00, 808.33, 3289.58, 7016.67, 13393.75, 17008.33, 42525.00] and their corresponding rates: [0.10, 0.12, 0.22, 0.24, 0.32, 0.35, 0.37]. Income earned within each bracket is taxed only at that bracket’s rate. Meanwhile, deflation has led to a price decrease in the consumption market, with the average price of essential goods now at $135.82. Your current savings account balance is $12456.42. Interest rates, as set by your bank, stand at 3.00%. With all these factors in play, and considering aspects like your living costs, any future aspirations, and the broader economic trends, how is your willingness to work this month? Furthermore, how would you plan your expenditures on essential goods, keeping in mind goods price? Please share your decisions in a JSON format. The format should have two keys: ’work’ (a value

heading: B Experimental Setup
text: Baselines
• Consumption. In LEN, the consumption decision is memory-based, which means that consumption is influenced not only by current income but also by past accumulated savings. Besides, the goods price is another important factor. Conversely, in CATS, it is non-memory-based consumption decisions suggesting that consumption is solely related to the current income. The agent aims to keep a desired ratio between savings and income, and consumption is only a proportion of the income. For more human-like decisions, we also introduce the influence of interest rate in the decision rule.
For LEN, the calculation of consumption propensity is as follows,
pci =
( P
si + zi
)β , β ∈ [0, 1]. (15)
For CATS, the calculation is as follows, i.e.,
ŝi zi = (1 + r)(si + (1− c)zi) zi = h, pci = czi si + zi , (16) where ŝi denotes the expected savings after consumption in the next month, h is a constant, and c indicates the consumption proportion of the current income. Refer to CATS for the calculation of c. Note that we introduce the influence of the interest rate r to endow the agent with the perception of fiscal policy.
• Work. The rule of working in LEN and CATS can not be directly used in our simulation framework because we don’t simulate firms. Therefore, we follow the intuitions of their designs and define a formula implying that a higher expected income, lower savings, or a lower interest rate lead to a greater propensity to work.
The work propensity is calculated as
pwi =
( vi
si(1 + r)
)γ , γ ∈ [0, 1]. (17)
For AI-Economist, the utility is a satisfaction function positively correlated with savings and consumption but negatively correlated with labor. Maximizing utility implies that the agent always desires more savings and consumption but prefers less labor. The policy network for the agent’s work and consumption decisions is a multi-layer perceptron (MLP), where the input includes various environment information, such as monthly wage, interest rate, goods price, tax rates, etc. We modify the utility function to incorporate consumption and goods price, defined as
(si/P ) 1−λs − 1
1− λs · (ĉi/P ) 1−λc − 1 1− λc − λlli, (18)
where λs,c,l balance the importance of savings, consumption, and labor contributing to agent satisfaction. Besides, it’s discouraged to not work or have no consumption at all, which leads to negative utility. We also introduce the goods price to make the AI agent perceive the dynamics of the consumption market.
Simulation Parameters For LEN, CATS, and Composite, we conduct a careful grid search for proper hyperparameters β, γ, h in decision rules, with the search spaces of [0.05, 0.1, 0.3, 0.5], [0.05, 0.1, 0.3, 0.5], [0.5, 1, 3, 5], respectively. The reported results in the main text are obtained with β = 0.1, γ = 0.1, h = 1, which show the most reasonable macroeconomic indicators.
LLM Costs Each simulation based on EconAgent incurs a cost of approximately $30 and takes about 2 hours to complete.

heading: C Additional Results
text: Quaterly Indicators Figure 9 presents quarterly macroeconomic indicators, where the conclusion
is similar to that of annual ones. For AI-Economist, we follow (Zheng et al., 2022) to adopt PPO algorithm (Schulman et al., 2017) to train the policy network, where the actor and critic networks have the hidden dimensions of [128, 128] and [128, 64, 32], respectively. The observation (input) dimension is 173 and the action (output) dimension is 53, including 2 work actions and 51 consumption actions (0-1 with an interval of 0.02). The training process is shown in Figure 8, including the loss and average episode reward, where one episode is a complete simulation of 20 years.
Fluctuated Unemployment Rate The unemployment rate after 5 additional years of simulation is shown in Figure 10, which returns to a lower level after the 20th year.
Sensitivity and Robustness We increase the number to 300 and run the simulation again. Figure 11 shows consistently stable and plausible inflation rates similar to those of 100 agents, which holds for other indicators as well. Therefore, the simulation results are insensitive to the number of agents.
We conduct five simulations for each agent model and present the inflation rate in Figure 12. It is evident that the simulations based on EconAgent are robust and consistently yield more stable and plausible results, which is also true for other indicators. Importantly, there are no significant differences in terms of stability and numerical scale
among the simulations.

heading: Future Work
text: With all these factors in play, and considering aspects like your living costs, any future aspirations, and the broader economic trends, how is your willingness to work this month? Furthermore, how would you plan your expenditures on essential goods, keeping in mind goods price? Please share your decisions in a JSON format. The format should have two keys: ’work’ (a value