1\section{LLM agent design}2\label{sec:llm_design}34The laboratory follows one discipline, borrowed from the zero-intelligence tradition of \citet{gode1993allocative}:5the market and the accounting are deterministic code, and a language model is one of several interchangeable6\emph{policies} that may propose actions. Nothing a model writes changes a ledger until it has been parsed, validated7and clipped.89\paragraph{Roles and mandates.} Eight roles are defined (household, investor, firm manager, lender, market maker,10AI portfolio manager, procurement agent, regulator). The experiments in this paper exercise the investor/AI portfolio11manager role, with the lender and market-maker roles implemented as deterministic rules; the remaining prompts are in12Appendix~\ref{app:prompts} and are part of the replication package. The investor mandate states the principal's13objective (next-period expected wealth with moderate risk), the borrowing limit and the exact JSON format.1415\paragraph{Observations and actions.} Observations are JSON objects containing only $t$-dated information plus the16agent's own signal about $t+1$ (price, dividend, rate, expected dividend, cash, holdings, loan, equity, margin, loan17capacity, the last five prices and the agent's own valuation). Actions must satisfy a JSON schema18(\texttt{side}, \texttt{quantity}, \texttt{order\_type}, \texttt{limit\_price}, \texttt{borrow}, \texttt{rationale});19a reply that is not a valid object is sent back once with a repair instruction, and a second failure is recorded as an20\emph{invalid action} and treated as ``hold''. Valid actions are clipped by the ledger (borrowing to capacity,21purchases to cash, sales to holdings). Invalid and clipped actions are counted and reported.2223\paragraph{Inference, audit and cache.} Inference runs on local open-weight models served through an24OpenAI-compatible endpoint (\texttt{mlx\_lm.server} on Apple-silicon nodes of the author's cluster): Qwen2.5-7B-Instruct,25Mistral-7B-Instruct-v0.3 and Llama-3.2-3B-Instruct, all 4-bit. Optional hosted providers are supported through26environment variables only; no credential is embedded and none was used for the results reported here. Every call27records provider, model, system fingerprint, prompt and context hashes, full messages, temperature, seed, response,28validity, latency, token usage and (zero, here) cost, in an append-only JSONL audit log. Responses are cached29content-addressed on (provider, model, messages, temperature, seed, schema); network errors are never cached. A run can30therefore be replayed bit-for-bit without inference.3132\paragraph{Controls.} The pre-registered controls are the Bayesian mean-variance agent; a rule-based \emph{surrogate}33that implements the Bayesian rule behind the LLM interface (interface effects only); a single shared model for all34agents; three heterogeneous models assigned round-robin; one model with five prompt variants; temperature 0 and350.7; memory of the last three actions; and seed stability. Simulated LLM behaviour is reported as such and is never36interpreted as evidence about human preferences.3738\paragraph{What is and is not live.} Figures labelled ``LLM'' use live inference on the models above, at the dates in39the audit logs. The surrogate is not an LLM and is labelled as such everywhere. No trained policy surrogate (a model40fitted to LLM actions) is used in this version; the design supports it, and validation on held-out actions would be41required before any such surrogate is reported.42