Llm trading agent uses layered checks to improve live market safety

AllPath: Layered Verification for a Deployed, Self-Revising LLM Trading Agent under Human-Gated and Autonomous Regimes

Artificial Intelligence

Summary

Trading agents using large language models usually get tested in simulations, but when used live, mistakes can cost real money. The authors introduce AllPath, a trading agent that checks itself in three ways: automatic code rules, self-reviews within limits, and human approval. This setup caught different types of errors that simulation tests miss. It showed that human oversight is crucial and that interface improvements help spot problems early.

What this means in practice

  • For automated trading teams: Deploy large language model-based trading agents with layered verification to catch different error types during live trading.
  • For financial software developers: Design trading systems that integrate automated rule checks, agent self-review, and human gating to improve safety on live accounts.

Authors

Tian Zhang, Meng Li

Abstract

LLM trading agents are evaluated almost exclusively in backtests and autonomous benchmark harnesses. Deployment, where actions are irreversible, raises a different question: who verifies the agent's actions, and which failures can each verifier structurally catch? We report on AllPath, a personal LLM trading agent deployed against a live paper-brokerage account. The system watches positions through a deterministic rules engine, and each night it reviews its own day and proposes revisions to its own trading strategies. Verification is split across three layers. Code verifies what must not depend on judgment: deterministic gates enforce risk limits and block any strategy revision that fails an integrity check. The agent verifies itself within fixed bounds: its nightly review has an iteration cap and no tools that can act. A human verifies judgment, through approval screens that show the current state of each proposal. We also compared two verification policies for the agent's self-revisions on the live system: two and a half weeks with every self-revision human-gated, then five weeks with reflection revisions auto-applied behind the same code gates, while the operator's chat channel stayed human-gated throughout. Each layer caught a different kind of failure. The code gates rejected no proposal; their role was keeping revisions consistent. The human rejected two proposals that passed every code check, both over a disagreement about the market, and later removed 11 of the 19 rules the agent had added on its own, at a median lag of eight days. The most instructive production incidents, such as strategies silently left unmonitored, passed every gate; the operator found them by hand, and the fix each time was an interface change that makes the condition visible. We contribute the layered architecture, the two-regime account, and a production incident taxonomy, none observable in a backtest.