SPB Git

spb/wp25_uqo

Public
10.3 KB

# 🤖 When AI Agents Become Economic Agents

UQO Working Paper No. 25 — An Agentic General Equilibrium Theory

Paper Python Data Reproducible Institution Author

TL;DR — Delegating economic decisions to agents built on shared foundation models converts idiosyncratic decision errors (which average out) into common ones (which do not). Three nested models: (A) a task-based growth economy with a compute market whose decision problem is a linear-quadratic game with dispersed information — delegation = buying a correlated signal; closed-form loadings of capital, wages and returns on model noise in D (delegation share) and 1/M (independent models); the private value of delegation equals its social value identically under constant returns (model noise is real but not an inefficiency), with closed-form wedges under three frictions; (B) an Aiyagari economy where the rich delegate first (Gini 0.68 → 0.70 from the decision channel alone; 0.58 broad vs 0.66 concentrated ownership of compute); (C) an agentic market lab with balance sheets, margin, defaults, three market designs and live local LLM agents under hard constraints: order-flow correlation 0.11 → 0.97 → 0.43 (private / one model / eight models), no-trade with a shared model, collateral amplification ×2.6 of a false shared signal in a call market (halved at a 50 % margin, eliminated by model diversity), none in a continuous auction.


# 📌 Status

Item Value
Version 1.0 (October 2026) — built 2026-10-27
SSRN not yet submitted
Journal target: JME / JEDC / Journal of Financial Economics (computational) — not submitted
Code & data fully reproducible from scripts/ (see Quick start); raw data re-downloadable (data/raw/README.md), not redistributed
LLM results live local inference (Qwen2.5-7B, Mistral-7B-v0.3, Llama-3.2-3B, 4-bit, mlx_lm.server); replayable from results/llm_cache

# 🎯 What this paper does

Four roles of AI are kept apart: production technology, information service, delegated decision-maker, and (hypothetical) independent principal. The paper asks what changes in general equilibrium when decisions are delegated to agents that many principals share. The mechanism: a human forecast error is idiosyncratic and washes out; a foundation model's error is common to all its users. Aggregate action

text
X = Abar * theta + (D a_A / M) * sum_m eta_m ,   Var(model noise) = D^2 a_A^2 / (M tau_A)

Propositions: linear equilibrium and D²/M loading (P2); private value and adoption threshold (P1); efficiency benchmark — wedge ≡ 0 under CRS (P3, derived symbolically, property-tested); wedges under non-pecuniary effects, uninsurable wage risk and collateral (P4, P7); compute-market crowding-out (P5); ownership (P6).

# 🏆 Headline results

Object Result
Savings channel (news about TFP) κ₀ = −0.0015: no stake — which decision is delegated matters
Portfolio channel, first / last adopter +3.3 % / +0.4 % of consumption per year (illustrative information parameters)
Wage-noise s.d. at full adoption 7.7 % (one model) · 3.2 % (eight models)
Private − social value wedge (CRS) 0 (max
Pigouvian tax / fee, 50 % hand-to-mouth 4.5× (M = 1) · 0.8× (M = 8)
Compute crowding-out (H6) sign confirmed, labour share +≤0.2 pp — negative result
Model B Gini: no AI / delegation only / full broad / full concentrated 0.683 / 0.701 / 0.575 / 0.661
Model C order-flow corr. (Walrasian): D=0 / D=1,M=1 / D=1,M=8 0.11 / 0.97 / 0.43 (20 seeds, CRN)
Stress, call market: unlevered / levered m=0.2 / m=0.5 / M=4 −3.7 % / −9.8 % / −5.4 % / −2.4 %
LLM lab see results/llm_lab/summary.csv and Table "LLM laboratory" in the paper

# 🗂 Repository layout

text
agentic-general-equilibrium/
├── CLAUDE.md                     # research programme (as supplied)
├── configs/baseline.yaml
├── data/raw/ (README + MANIFEST.json; files not committed)  data/processed/calibration_targets.csv
├── docs/   literature_matrix.md · references_verification.md · model_specification.md · research_blueprint.md
│           parameter_ledger.csv · research_log.md · limitations.md · referee_report.md
├── experiments/pre_registration.md
├── src/age/
│   ├── economy/tasks.py            task-based production with compute
│   ├── equilibrium/lq_game.py      LQ delegation game (closed forms + Monte Carlo)
│   ├── equilibrium/lq_map.py       economy → game mapping, delegation share, compute market
│   ├── equilibrium/aiyagari.py     Model B (numba VFI, owner class)
│   ├── banking/ledger.py           balance sheets, margin, default, bail-in (invariants asserted)
│   ├── markets/designs.py          Walrasian call · CDA · bilateral bargaining
│   ├── markets/simulation.py       Model C period loop, metrics, stress
│   ├── agents/policies.py          Bayesian MV · rules · LLM agent · action schema · clipping
│   ├── llm/client.py               OpenAI-compatible client, cache, audit log, surrogate
│   └── analysis/plotstyle.py
├── scripts/  00_lq_derivations.py · 01_download_data.py · 02_build_calibration_targets.py · 10_model_a.py
│             20_model_b.py · 30_model_c.py · 35_llm_lab.py · 40_figures.py · 50_tables.py · llm_serve.sh · llm_tunnel.sh
├── tests/{unit,integration,property}   (30 tests: zero wedge, Euler's theorem, ledger invariants, H2/H4 controls)
├── results/{model_a,model_b,model_c,llm_lab,figures,tables,llm_cache,llm_audit}
└── paper/  main.tex · sections/ · appendices/ · tables/ · figures/ · references.bib (144 verified) · main.pdf

# 🚀 Quick start

bash
python3 -m pip install -e . && python3 -m pip install pytest hypothesis
python3 -m pytest tests -q                                  # ~2 min
python3 -I scripts/01_download_data.py && python3 -I scripts/02_build_calibration_targets.py
python3 scripts/10_model_a.py                               # < 1 min
python3 scripts/20_model_b.py                               # ~8 min
python3 scripts/30_model_c.py                               # ~5 min (20 seeds)
scripts/llm_serve.sh start && scripts/llm_tunnel.sh         # optional: local models on MacLustr nodes
python3 scripts/35_llm_lab.py --quick                       # replays from results/llm_cache if present
python3 scripts/40_figures.py && python3 scripts/50_tables.py
cd paper && make                                            # latexmk → main.pdf

# 🗃 Data

Public macro/financial data fetched 2026-10-27 (FRED 23 series, Fed DFA, Fernald TFP, Shiller, SEC XBRL capex, EIA, Epoch AI, Census BTOS); provenance, sha256 and the not-obtained list in data/raw/README.md and data/raw/MANIFEST.json. The AI-specific behavioural parameters are illustrative and marked as such in docs/parameter_ledger.csv.

# 🔬 Methodology

  1. Symbolic derivation of the delegation game (scripts/00_lq_derivations.py, sympy) → Propositions 1–4.
  2. Steady state + linearised household (sequence space) and mean-variance mapping (lq_map.py).
  3. Model B: VFI with discrete delegation choice, Howard acceleration, non-stochastic simulation, Brent on r.
  4. Model C: discrete-event simulation with common random numbers, three designs, ledger invariants, stress tests.
  5. LLM lab: schema-validated JSON actions, deterministic clipping, content-addressed cache, JSONL audit.
  6. Tables/figures/macros generated from results only (50_tables.py → paper/tables/numbers.tex).

# 🖼 Figures & tables inventory

Figure Content
fig_architecture, fig_timing ownership flows; within-period timing
figA_private_value_noise, figA_threshold, figA_wedge, figA_compute_market, figA_ownership, figA_heatmap, figA_savings_news Model A
figB_lorenz_delegation, figB_shares_concentration, figB_welfare_percentile Model B
figC_herding, figC_volatility_volume, figC_designs, figC_stress Model C
figL_llm_lab, figL_cost_frontier LLM laboratory

Tables (paper/tables/*.tex): notation, novelty matrix, ledger, targets, Model A baseline, Model B scenarios and decomposition, Model C factorial and stress, LLM lab, computational cost; numbers.tex holds every number quoted in the text.

# ⚠️ Limitations

See docs/limitations.md and docs/referee_report.md: second-order benchmark; illustrative information parameters; reduced-form decision-quality returns in Model B; stress test requires persistent dividends, preloaded leverage and thin depth; small LLM lab with 4-bit 7B/3B models; no external causal identification.

# 📝 Citation

bibtex
@techreport{boucher2026agentic,
  author      = {Boucher, Simon-Pierre},
  title       = {When AI Agents Become Economic Agents: An Agentic General Equilibrium Theory},
  institution = {Universit\'e du Qu\'ebec en Outaouais, D\'epartement des sciences administratives},
  type        = {Working Paper},
  number      = {25},
  year        = {2026},
  month       = {October}
}

# 👤 Author & contact

Simon-Pierre Boucher — Département des sciences administratives, Université du Québec en Outaouais (UQO), Gatineau, QC. 📧 simon-pierre.boucher@uqo.ca

# 🗒 Notes

  • Deviations from Recherche-UQO/HARMONISATION.md: paper/appendices/ (plural, as the research programme requires) instead of paper/appendix/; pyproject.toml instead of requirements.txt (plus requirements.lock.txt).
  • Research programme supplied by the author as CLAUDE.md (2026-10-27); gates 1–6 and the live TODO are in docs/research_log.md.
Files · 2c7f64611b7e4e05b42b2c034a2fd9beb6d14a58
Menu

Theme