Lewis Jackson Self-Improving Trading Agent Framework

Deploy a 24/7 autonomous trading agent that learns from its own trade outcomes and iteratively self-improves its strategy using the Hermes agent's built-in self-learning loop — without manual retraining.

// TL;DR

The Lewis Jackson Self-Improving Trading Agent Framework is a method for deploying a 24/7 autonomous crypto or forex trading agent that learns from its own trade outcomes using the Hermes agent's built-in self-learning loop. It uses a scientific method approach — changing one variable per cycle, measuring results against a well-defined success/failure goal, and promoting winning changes as the new baseline. Use it when you want an automated trading system that goes beyond static rules and continuously adapts its strategy without manual retraining. Setup is triggered by a single oneshot prompt pasted into Claude Code.

// When should I use the Lewis Jackson Self-Improving Trading Agent Framework?

Use this skill when you want to build or upgrade an automated trading agent that goes beyond static rules and can adapt its strategy over time. Trigger it when you have a trading strategy (or want one built) and want to architect it into a self-improving system running continuously in the cloud.

// What inputs do I need to set up a self-improving trading agent?

  • Existing trading strategy (optional)
    A pre-built strategy file or documentation on your current approach (e.g. entry/exit rules, asset class, position sizing). If absent, the onboarding agent will scaffold a basic baseline strategy for you.
  • Target assetrequired
    The asset or market you want the agent to trade (e.g. Bitcoin, Ethereum, Solana, a specific subnet token, forex pair, etc.).
  • Success definitionrequired
    A specific, measurable goal — e.g. target monthly return percentage, minimum Sharpe score, maximum drawdown threshold. Must be within realistic bounds given your starting capital.
  • Failure definitionrequired
    The threshold or condition that constitutes failure — e.g. drawdown below X%, return below Y% over Z days. Used by the agent to orient improvement direction.
  • Starting capital amountrequired
    The capital available for trading. Used to sanity-check whether the success definition is achievable (e.g. targeting $1M/month on $10 capital is flagged as impossible).
  • Railway accountrequired
    A Railway.app account for 24/7 cloud hosting of the agent so it runs regardless of whether your local machine is on.

// What core principles make the self-improving trading agent work?

Accuracy

The data feeding the agent must be clean, consistent, and objectively interpreted. Unreliable API connections or ambiguous news-feed parsing introduce errors that corrupt every downstream decision. Establish strict rules so conclusions drawn from incoming data are accurate and objective, not dependent on the AI's mood or interpretation drift.

Reliability

The agent must operate 24/7 regardless of local machine state. Host on a cloud server (Railway) so execution is never interrupted by a shutdown or network drop. Reliability means the system is always executing — not just when you're watching.

Well-Defined Goal

The agent needs a destination, not vibes. Define exactly what success looks like (specific return target, Sharpe score threshold) and exactly what failure looks like. The agent uses this polarity — toward-goal vs. away-from-goal — to orient every improvement cycle. Without this, 90% of trading agents are flying blind.

Self-Improving (Scientific Method Loop)

The agent must assemble outcomes, analyze whether they moved toward or away from the goal, form a hypothesis about why, then form a second hypothesis about what to change next — and apply only ONE variable change per cycle. This is the scientific method applied to strategy iteration: change one variable, observe the outcome, make the winning version the new baseline, repeat.

One Variable At A Time

When iterating the strategy, change only a single variable per cycle. If you changed multiple variables and profitability improved, you cannot know which variable was responsible. Single-variable testing produces a clean learning signal that compounds over cycles.

Oneshot Prompt Architecture

The entire agent setup — environment detection, strategy onboarding, scaffolding, cloud deployment, and Hermes installation — is triggered by a single copy-paste prompt fed into Claude Code. This reduces setup friction to near-zero and ensures reproducibility. The oneshot prompt improves over time as community feedback is incorporated.

// How do you build a self-improving trading agent step by step?

  1. 1

    Define your four agent criteria before writing a single line of code

    Before touching any tooling, answer in writing: (1) How will I ensure data accuracy? (2) How will I guarantee 24/7 reliability? (3) What is my exact success definition (target return, Sharpe score, drawdown limit)? (4) What is my exact failure definition? These four answers become the scoring and improvement backbone of the entire agent. Do not skip this — without a well-defined goal, the self-improvement loop has no direction.

  2. 2

    Obtain the oneshot prompt from the creator's community resource

    Retrieve the most current version of the oneshot prompt (Lewis Jackson stores these in 01 Systems community > Classroom > YouTube Video Prompts). Always use the latest version — these prompts are themselves iterated based on community feedback and supersede any version shown in the video.

  3. 3

    Open Claude Code in your terminal and paste the oneshot prompt

    Launch a terminal session with Claude Code. Paste the oneshot prompt in full. The prompt initiates a guided multi-phase onboarding flow — do not try to shortcut or pre-answer phases; let the agent walk through each phase in sequence.

  4. 4

    Complete Phase 1 — Environment Check

    The agent detects your OS (Mac or Windows) and available runtimes (e.g. Node.js). It will fork into OS-specific instructions. Confirm your environment when prompted. No action needed beyond confirmation if your environment is detected correctly.

  5. 5

    Complete Phase 2 — Strategy Definition

    Choose one of three paths: (A) Point the agent at an existing strategy file on your machine by name — it will locate, parse, and extract goals and parameters from it. (B) Tell the agent you have no strategy and want a basic one scaffolded — it will create a solid baseline. (C) Build a new strategy interactively with the onboarding agent. Whichever path, the agent will output a strategy document including: asset, position limits, slippage tolerance, gas reserve, scorer weights, target return, Sharpe floor, max drawdown, and failure thresholds. Confirm or correct these before proceeding.

  6. 6

    Complete Phase 3 — Scaffold the Hermes Side-State

    The agent creates all folders, files, and a Hermes-readable trade ledger. Existing trade history (wins and losses) is converted into structured data Hermes can analyze. Review the generated strategy document and goals document to confirm they accurately reflect your intent — this is the source of truth the self-improvement loop will reference.

  7. 7

    Complete Phase 4 — Strategy Deployment (if not already live)

    If you already have a live strategy, this phase may be skipped automatically. If not, the agent will walk you through connecting the necessary APIs to make trades execute. Ensure API connections are validated before proceeding — inaccurate API connections undermine the Accuracy criterion.

  8. 8

    Authenticate with Railway for 24/7 cloud hosting

    When prompted, the agent will attempt a Railway CLI login. If the interactive login fails inside the session, open a split terminal, paste the provided login command, complete browser authentication, then return and type 'done, continuing'. If you don't have a Railway account, create one during this step — it is free up to a significant usage threshold. This step ensures Reliability: the agent runs 24/7 regardless of local machine state.

  9. 9

    Allow the agent to install Hermes automatically

    The oneshot prompt installs Hermes agent as part of the handoff phase. Verify installation by opening a new terminal and typing 'hermes' — if it launches, installation succeeded. Hermes is now the self-learning brain that will review trades on a weekly cadence, own portfolio mechanics and score weights, and write updated strategy iterations.

  10. 10

    Review the final configuration summary and confirm

    The agent will output a full confirmation: deployed strategy name, live asset, Railway hosting status, Hermes brain assignment, review cadence, Sharpe floor, max drawdown, and operating mode. The FIRST Hermes cycle is READ-ONLY — Hermes observes and produces a markdown review but does not write to the live strategy yet. You must manually approve the transition to live mode by editing the Hermes trading strategy YAML. Do not flip to live mode until you have reviewed the first cycle's output.

  11. 11

    Monitor improvement cycles and approve strategy promotions

    Hermes reviews trades on a weekly cadence. It will produce scored hypotheses, change ONE variable, and run the next cycle against the new baseline. Use the check-in commands provided in the final summary to inspect cycle outputs. When Hermes produces a cycle result that moves toward your success definition, it becomes the new baseline. Track directional progress: toward-goal outputs are good signals; away-from-goal outputs inform the next hypothesis.

// What does the self-improving trading agent look like in real scenarios?

A trader has a manually-built momentum strategy for a Layer-1 token with 6 weeks of trade history (roughly 50 trades, mix of wins and losses) but has never been able to systematize improvement.

Feed the existing strategy file into Phase 2 path A. The agent extracts current parameters (position limits, entry signals, slippage tolerance) and trade history. Phase 3 converts the 50 trades into a Hermes-readable ledger. Success is defined as 15% monthly return with Sharpe ≥ 1.2 and max drawdown ≤ 12%; failure is defined as two consecutive months below 5% return. Hermes runs read-only for Week 1, identifies that position sizing on losing trades was 40% larger than on winning trades (one variable), proposes reducing max position size by 20% as the sole change for Cycle 2, and the trader approves. This becomes the new baseline if Cycle 2 moves toward goal.

A complete beginner has no existing strategy, only a small starting capital, and wants to trade a major crypto asset.

In Phase 2, select path B (no existing strategy). The agent scaffolds a basic baseline strategy appropriate for the asset. Success and failure definitions are set conservatively given the capital size — the agent will flag any success definition that is mathematically impossible given starting capital (e.g. targeting 10x returns in 30 days on minimal capital). Hermes begins the self-improvement loop from this baseline, changing one variable per weekly cycle (e.g. first testing a tighter stop-loss, then a different entry signal), compounding improvements toward the defined goal over time.

// What mistakes should I avoid when building a self-improving trading agent?

  • Defining a success goal that is impossible relative to your starting capital — the agent cannot self-improve toward an unreachable target and will waste cycles. Sanity-check: $10 starting capital cannot target $1M/month.
  • Skipping or vaguely defining the failure threshold — without a clear failure definition, the agent has no polarity to orient its improvement direction. 'Losing money' is not a failure definition; 'drawdown exceeding 15% in any 30-day window' is.
  • Changing multiple strategy variables between cycles — if you or a secondary agent modifies several parameters simultaneously, the learning signal is corrupted. You cannot attribute the result to any single change. Enforce the scientific method: one variable per cycle.
  • Flipping to live trading mode before reviewing the first Hermes read-only cycle — the first cycle exists to validate that Hermes has correctly understood your strategy and goals. Skipping this review risks live capital being managed by a misconfigured loop.
  • Using inaccurate or inconsistently sourced data — different AI interpretations of the same news article can produce different conclusions. Establish objective, rules-based interpretation criteria for all non-numerical inputs before deploying.
  • Hosting the agent locally instead of on Railway — a local-only agent goes offline when your machine does, violating the Reliability criterion. The 24/7 cloud hosting is non-negotiable for the system to function as designed.
  • Treating the oneshot prompt as static — the prompt improves over time based on community feedback. Always pull the latest version from the community resource rather than reusing a version from a video recording.

// What do the key terms in the self-improving trading agent framework mean?

Self-Improving Trading Agent
An autonomous trading agent that completes a continuous loop: execute strategy → observe outcome → analyze toward-goal or away-from-goal → form hypothesis → change one variable → update strategy → repeat. Distinct from a static bot that executes fixed rules without learning.
Hermes Agent
The self-learning AI brain installed into the trading agent stack. Hermes natively learns from every interaction and engagement without requiring manual retraining instructions. It owns portfolio mechanics, score weights, and weekly strategy review cycles.
Oneshot Prompt
A single copy-paste prompt that, when fed into Claude Code, orchestrates the entire agent setup end-to-end: environment detection, strategy onboarding, scaffolding, cloud deployment, and Hermes installation. No multi-step manual configuration required.
Well-Defined Goal
A specific, measurable destination that includes both a success definition (e.g. target return, minimum Sharpe score) and a failure definition (e.g. maximum drawdown, minimum return floor). The agent uses this polarity to orient every improvement cycle.
Sharpe Score
A numerical metric representing the risk-adjusted profitability of a trading strategy. Used as a quantitative success/failure threshold in the agent's goal definition rather than relying on subjective performance assessment.
Hermes-Readable Ledger
A structured file of all historical trades (wins and losses) converted into a format Hermes can parse, score, and learn from. Generated automatically during Phase 3 scaffolding from existing trade history.
Scientific Method Loop
The self-improvement cycle protocol: change only ONE variable per iteration, observe the outcome, promote the better-performing version to the new baseline, then iterate again. Ensures clean attribution of performance changes to specific strategy modifications.
Railway
Cloud hosting platform used to run the trading agent 24/7, independent of the user's local machine. Integrates with the terminal via CLI so strategy updates are pushed automatically without manual redeployment.
Read-Only Cycle
The first Hermes review cycle, in which Hermes observes, scores, and produces a markdown analysis of the strategy but does not write any changes to the live strategy. The user must manually approve the transition to live write mode.
Score Weights
Configurable parameters in the strategy document that determine how different trade outcomes are scored relative to the defined goal. Hermes owns and adjusts score weights as part of its self-improvement process.
Weekly Cadence
The default review and improvement cycle frequency for Hermes — once per week, with a 3-day offset from any secondary agent (e.g. Cornelius) to prevent simultaneous conflicting parameter updates.
01 Systems
Lewis Jackson's free community resource where all oneshot prompts from his videos are stored, versioned, and updated. Always retrieve prompts from here rather than manually transcribing from video to ensure you have the most improved version.

// FREQUENTLY ASKED QUESTIONS

What is the Lewis Jackson Self-Improving Trading Agent Framework?

It is a framework for building an autonomous trading agent that continuously improves its own strategy by analyzing trade outcomes against defined success and failure thresholds. The system uses the Hermes agent as its self-learning brain, applies the scientific method (changing one variable per cycle), and runs 24/7 on Railway cloud hosting. Setup is handled by a single oneshot prompt pasted into Claude Code that orchestrates environment detection, strategy onboarding, scaffolding, and deployment end-to-end.

What is the Hermes agent in trading?

Hermes is the self-learning AI brain installed into the trading agent stack. It natively learns from every trade interaction without requiring manual retraining. Hermes owns portfolio mechanics, score weights, and weekly strategy review cycles. Each week it analyzes whether trade outcomes moved toward or away from your defined goal, forms a hypothesis, changes one variable, and runs the next cycle against the updated baseline. Its first cycle is always read-only for safety.

How do I set up a self-improving trading agent with Claude Code?

Retrieve the latest oneshot prompt from the 01 Systems community resource, open Claude Code in your terminal, and paste the full prompt. It launches a guided multi-phase onboarding flow: environment check, strategy definition, Hermes side-state scaffolding, strategy deployment, Railway authentication for 24/7 hosting, and automatic Hermes installation. Do not shortcut phases — let the agent walk through each sequentially. The entire setup is triggered by that single copy-paste prompt.

How does the self-improvement loop actually work in this trading agent?

The loop follows the scientific method: execute the current strategy, observe outcomes, analyze whether results moved toward or away from your defined goal, form a hypothesis about why, propose a single variable change, apply it, and measure the next cycle. If the change improves performance, it becomes the new baseline. If not, Hermes forms a new hypothesis. Only one variable changes per cycle so you get clean attribution of what caused any performance shift.

How does the Lewis Jackson trading agent compare to a regular trading bot?

A regular trading bot executes fixed, static rules indefinitely — it never adapts unless you manually reprogram it. The Lewis Jackson framework adds a self-improvement layer via Hermes that reviews trades weekly, scores outcomes against your success/failure definitions, and iteratively modifies the strategy one variable at a time. This means the agent compounds learning over time, while a static bot degrades as market conditions change. The framework also enforces 24/7 cloud hosting and structured goal definitions that most basic bots lack.

When should I use the Lewis Jackson Self-Improving Trading Agent Framework?

Use it when you want an automated trading system that adapts its strategy over time rather than running static rules. It's ideal when you have a trading strategy (or want one scaffolded) and want to architect it into a continuously improving system. Trigger it when you're ready to define specific, measurable success and failure thresholds, have a target asset in mind, and want 24/7 autonomous execution hosted in the cloud without depending on your local machine.

What results can I expect from a self-improving trading agent?

Expect gradual, compounding strategy improvements over weekly cycles — not overnight transformation. Each cycle changes one variable and measures the result, so improvements are incremental but attributable. Realistic outcomes depend entirely on your starting capital, asset volatility, and goal definitions. The framework will flag impossible targets (e.g., $1M/month on $10 capital). Over multiple cycles, the agent converges toward your defined success metrics as winning changes become new baselines.

What do I need before I can deploy a self-improving trading agent?

You need five things: a target asset to trade, a specific measurable success definition (e.g., 15% monthly return, Sharpe ≥ 1.2), a specific failure definition (e.g., drawdown exceeding 12%), your starting capital amount, and a Railway.app account for 24/7 cloud hosting. An existing trading strategy is optional — if you don't have one, the onboarding agent scaffolds a baseline for you. You also need Claude Code installed in your terminal.

Is the Lewis Jackson trading agent framework free to use?

The oneshot prompt and community resources from 01 Systems are free. Railway.app offers a free tier with a significant usage threshold sufficient for running the agent. Claude Code requires a Claude subscription. There are no additional framework licensing costs. Your main expenses are API access for trade execution on your chosen exchange, the Claude subscription, and any Railway costs if you exceed the free tier.

What assets can I trade with this self-improving agent?

The framework supports any asset you can connect via API — Bitcoin, Ethereum, Solana, subnet tokens, forex pairs, and other crypto assets. You specify your target asset as a required input during setup. The strategy parameters (position limits, slippage tolerance, gas reserves) are configured specifically for your chosen asset's characteristics during the Phase 2 strategy definition step.

Why does the Hermes agent only change one variable at a time?

Changing one variable per cycle is the scientific method applied to strategy iteration. If you change multiple variables simultaneously and performance improves, you cannot determine which change was responsible. Single-variable testing produces a clean learning signal — you know exactly what caused the outcome. This clean attribution compounds over cycles, meaning each improvement builds reliably on the last. Changing multiple variables corrupts the learning signal and wastes improvement cycles.

// GET STARTED

Turn Any YouTube Video Into An AI Skill

SkillForge captures a creator's exact methodology from their video and turns it into a reusable AI skill you can invoke in Claude, ChatGPT, or any LLM.

Forge your own skill