Why v2 of my trading system strips the LLM of its execution rights (Blueprint & Architecture)

Reddit r/artificial / 4/30/2026

💬 OpinionDeveloper Stack & InfrastructureIdeas & Deep AnalysisModels & Research

Key Points

  • The author is redesigning a trading system’s LLM control from a “distributed veto” of eight agents to a deterministic state-machine approach for v2.
  • In the new architecture, Python performs all math and makes the execution decision, while LLMs are limited to interpreting market context (e.g., institutional narrative, selecting POIs, and greenlighting or vetoing via contextual checks).
  • The Trigger (M15/M5) and Risk layers are made 100% deterministic in Python, with state transitions to EXECUTING allowed only when those modules approve.
  • The piece outlines a five-module blueprint (HTF, Structure, Trigger, Context, Risk) and asks quant/architect input on whether the split of responsibilities is appropriate and whether deterministic triggering undermines the value of using AI.
  • The author also considers whether merging the HTF and Structure agents would reduce token constraints and hallucinations versus keeping them separate for debugging and maintainability.

Thanks to the incredible feedback on my last post, I’m officially moving away from the "distributed veto" system (where 8 LLM agents argue until they agree to trade).

For v2, I am implementing a strict State Machine using a deterministic runtime (llm-nano-vm).

​The new rule is simple: Python owns the math and the execution contract. The LLM only interprets the context.

​I've sketched out a 5-module architecture, but before I start coding the new Python feature extractors, I want to sanity-check the exact roles I’m giving to the AI.

Here is the blueprint:

​1. The HTF Agent (Higher Timeframe - D1/H4)

​Python: Extracts structural levels, BOS/CHoCH, and premium/discount zones.

​LLM Role: Reads this hard data to determine the institutional narrative and select the most relevant Draw on Liquidity (DOL).

​2. The Structure Agent (H1)

​Python: Identifies all valid Order Blocks (OB) and Fair Value Gaps (FVG) with displacement.

​LLM Role: Selects the highest-probability Point of Interest (POI) based on the HTF Agent's narrative.

​3. The Trigger Agent (M15/M5)

​100% Python (NO LLM): Purely deterministic. It checks for liquidity sweeps and LTF CHoCH inside the selected POI.

​4. The Context Agent

​LLM Role: Cross-references active killzones, news blackouts, and currency correlations to either greenlight or veto the setup.

​5. The Risk Agent

​100% Python (NO LLM): Calculates Entry, SL, TP, Expected Value (EV), and position sizing.

​The state machine will only transition to EXECUTING if the deterministic Trigger and Risk modules say yes. The LLMs are basically just "context providers" for the state machine.

​My questions for the quants/architects here:

​Does this division of labor make sense? Am I giving the LLMs too much or too little responsibility in step 1 and 2?

​By making the Trigger layer (M15/M5) 100% deterministic, am I losing the core advantage of having an AI, or is this the standard way to avoid execution paralysis?

​Would you merge the HTF and Structure agents to reduce token constraints/hallucinations, or is separating them better for debugging?

​Would love to hear your thoughts before I dive into the codebase.

submitted by /u/Simone_Crosta
[link] [comments]