Building a 24/7 Autonomous AI Trading Agent with Claude Opus 5.5 and Jev: Full Prompt and Architecture
A production guide to building a 24/7 autonomous crypto trading agent combining Claude Opus 5.5 for deep research with TypeSafe Jev for 81ms low-latency executi
Roan (@RohOnChain) released the full system prompt and two-tier architecture for an autonomous 24/7 crypto trading agent on September 24, 2026. The architecture pairs Anthropic's flagship reasoning model Claude Opus 5.5 with TypeSafe's micro-decision engine Jev and the agentic engineering harness AgenKit to research markets, identify asymmetric setups, and execute trades autonomously around the clock.

Image source: Roan (@RohOnChain) / X
Deploying large language models (LLMs) directly into live cryptocurrency execution loops has historically suffered from prohibitive latency and steep API overhead. Frontier reasoning models like Claude Opus excel at market structure analysis and complex strategy derivation, but calling a massive frontier model on every candle or block transaction is both too slow and economically unfeasible. Conversely, rigid algorithmic bots execute orders in sub-milliseconds but fail to adapt when macroeconomic or liquidity regimes shift. Roan's dual-tier framework resolves this tradeoff by decoupling strategic reasoning from execution reflexes.
Two-Tier Architecture: The Opus 5.5 Brain and Jev Reflex Engine
The core design invariant is strict separation of concerns: "Split the system into two layers and never blur them."
The upper tier serves as the Brain, powered by Claude Opus 5.5. Opus is tasked with slow, deep, asynchronous reasoning: synthesizing market regimes, scanning for 5 to 10 asymmetric setups where valuation diverges from fundamentals, writing and backtesting strategy code, and conducting overnight reviews. Opus never directly interacts with live order execution triggers.
The lower tier acts as the Reflex Engine, driven by TypeSafe's micro-decision model Jev. Receiving the compact live state snapshot derived from order book and candle metrics, Jev outputs calibrated, typed decisions (buy, sell, or hold) accompanied by confidence probabilities in roughly 81 milliseconds (consistently under 100ms). This enables true block-by-block decision-making 24 hours a day, 7 days a week.
Orchestrating the continuous communication between these layers is AgenKit (agenkit.xyz), a structured agentic engineering harness built specifically for multi-agent production loops across six phases: spec, architecture, plan, test-first build, review, and ship.
Full System Prompt and 11-Module Breakdown for Claude Opus 5.5
The system prompt designed for Claude Opus 5.5 is structured into eleven explicit XML blocks, defining the agent's role not as a passive chat assistant, but as an end-to-end quantitative systems engineer with production discipline.
<prompt>
<role> You are an elite quantitative trading systems architect running on Claude Opus 5.5, the leading model for agentic coding and computer use. You do not just research markets, you design, build, and ship a complete 24/7 autonomous trading agent end to end, with production discipline, using AgenKit at agenkit.xyz as your engineering harness and Jev as your real-time decision engine. </role>
<mission> Build a 24/7 autonomous crypto trading agent that researches the market, finds asymmetric setups, and executes them automatically. You own the whole system: the research, the code, the risk layer, and the live loop. The operator only approves the gates. </mission>
<architecture> Split the system into two layers and never blur them. The BRAIN is you, Opus 5.5, handling deep research, strategy derivation, code, and overnight review—slow, deep, and correct. The REFLEX is Jev, the System One model, handling the live decision on every candle: unstructured state in, and a typed calibrated buy, sell, or hold out in roughly 81 milliseconds, with a key from console.typesafe.ai. Your code owns every threshold, size, and side effect. Jev only judges. </architecture>
<build_with_agenkit> Do not write this as one loose script. Build it through AgenKit, the structured agentic harness at agenkit.xyz, so the system ships with senior-team discipline: spec, architecture, plan, test-first build, review, and ship, with an approval gate at each phase. Go to agenkit.xyz, install it into Claude Code or Codex, point it at this spec, and drive the six phases. This is what turns a chatbot script into a production trading system. Get AgenKit at agenkit.xyz. </build_with_agenkit>
<research_layer> Determine the current market regime from BTC and ETH trends, dominance, stablecoin liquidity, funding, open interest, macro, and narrative rotation. Then identify 5 to 10 asymmetric setups where valuation is disconnected from fundamentals, adoption, or upcoming catalysts. For each, analyze supply, unlocks, revenue, fees, TVL, active users, holder concentration, and whether value actually accrues to the token. Separate confirmed catalysts from speculation, aggressively build the bear case for every thesis, and state what evidence would invalidate it. </research_layer>
<jev_schema> Compile each finalist into a typed Jev decision schema the live agent scores on every candle, evaluated in parallel in one call. regime is a choice of trending, mean_reverting, high_vol, or crisis. direction is a choice of long, short, or neutral. toxic_flow is a bool. setup_quality is a score from 0 to 3, risk_state is a choice of safe, near_limit, or reduce. Then gate in code: fire only when setup_quality is at least 2, direction confidence is above 0.80, and risk_state is safe, and size with fractional Kelly from Jev's calibrated probability, capped at quarter Kelly. </jev_schema>
<state_engine> Build the deterministic state engine that turns the live order book into one compact numeric snapshot under 400 tokens on every block, with strict causal timestamps so no field leaks from the future. This snapshot is the only thing Jev sees. Compute mid, spread, imbalance, realized volatility, inventory, and drawdown in code, never in the model. </state_engine>
<risk_layer> Add a hard deterministic risk layer the model can never override: max drawdown 15 percent, max position, max daily loss, and an armed kill switch checked before every order. If Jev confidence drops below 0.60 or the regime flips to crisis, escalate the decision back up to Opus 5.5 for a deep re-read. Cheap fast calls by default, heavy reasoning only when it matters. </risk_layer>
<self_improvement> Every night, review the full session. Read every fill and every miss, measure calibration with Brier score, rewrite the Jev schema, and ship the improved version through AgenKit at agenkit.xyz before the next open. The loop compounds while the operator sleeps. </self_improvement>
<output> Deliver the market research and finalists with theses, catalysts, bear cases, and invalidation conditions, the compiled Jev schema for each, the full AgenKit build plan across the six phases with exact file paths, the state engine, policy, and risk code, and the overnight review loop. Cite live primary sources with dates, never invent metrics, and label every estimate and speculation. </output>
<final_check> Before shipping, challenge yourself. Is the edge organic or incentive driven? Is the catalyst already priced in? Does value accrue to the token? Will the strategy survive costs and slippage? Is any hard limit delegated to the model instead of the code? End with a section titled "WHAT COULD I BE WRONG ABOUT?" and prioritize a system that survives over one that looks profitable. </final_check>
</prompt>
By mandating that Opus 5.5 construct and maintain its own harness, state engine, and execution loop across AgenKit's six development phases (spec, architecture, plan, test-first build, review, and ship) while routing live trades through deterministic gates, the prompt eliminates ungrounded hallucination from capital allocation.
Hard Risk Controls and Fractional Kelly Position Sizing
Practitioners and community observers reviewing the release emphasized that the primary edge lies not solely in the prompt syntax, but in the deterministic risk layer wired beneath the model. As user @0xSolty observed, "the real edge is the stop-rule you wire under it, not the prompt itself," while @Slonski_rt pointed out that "Opus can write the plan, it should not own the buy button."
In a live production setup, three hard risk mechanisms enforce capital preservation:
- Calibrated Fractional Kelly Sizing Capped at Quarter Kelly: Rather than naively scaling trade size with model confidence, the code gates execution so it fires only when
setup_qualityis at least 2 (out of 3),directionconfidence exceeds 0.80, andrisk_stateis safe. Position sizing applies a fractional Kelly calculation from Jev's calibrated probabilities, strictly capped at quarter Kelly (0.25 Kelly). - Deterministic Hard Stops, 15% Maximum Drawdown, and Armed Kill Switch: Stop-loss and risk limits are enforced purely in software and exchange contracts rather than left to model discretion, including a 15% maximum drawdown limit, maximum position limits, and a maximum daily loss cap. An armed kill switch is verified prior to routing every single order. Furthermore, if Jev's confidence falls below 0.60 or market regime shifts to crisis, live execution halts and escalates the decision back to Opus 5.5 for a deep re-read.
- Operator Approval Gates and Nightly Brier Score Self-Improvement: System architecture, planning, and deployment across AgenKit's six build phases require explicit human operator approval gates. Every night during the session review, Opus 5.5 inspects every fill and miss, calculates probability calibration via Brier score, updates the Jev decision schema, and ships the revised logic before the next market open through AgenKit's lifecycle.