AI Trading Agent for Research, Risk Management, and Robinhood Execution

Designing AI agents willing to say no - even to the people who built them

AI Agent Designer · Prompt Engineer · Workflow Architect — Confidential Client (Small Investment Firm)

A confidential investment firm's trading process ran on discretion, not discipline - research wasn't retained, and risk rules bent under pressure. I designed a six-agent AI system where every trade has to clear explicit research, risk, and portfolio gates, plus a human checkpoint it can never skip.

TL;DR Snapshot

Role
AI Agent Designer · Prompt Engineer · Workflow Architect
Client
Confidential Client (Small Investment Firm)
Project Type
AI Trading Agent Design & Robinhood Workflow Automation
Duration
Ongoing engagement (active development, no fixed end date)
Architecture
Six-agent pipeline feeding a mandatory human approval checkpoint, with execution staged for Robinhood, backed by a Backtesting Engine and Memory Engine
Core Capabilities
Research synthesis, evidence scoring, risk-gated trade evaluation, portfolio constraints, human approval, Robinhood-oriented execution staging, and persistent decision memory
Validation Method
Backtesting Engine + $100K Paper Trading Environment
Outcome
Structured trading workflow with enforced risk controls, persistent memory, and human approval

The Setup

This was a confidential engagement for a small investment/trading firm. I worked it solo - research, agent design, prompt engineering, and workflow architecture - with nothing handed to me pre-built. The firm's process already worked, in the sense that trades got made. It just didn't hold up under pressure or repetition.

Problem

The client's research and trading process was structurally fragile in three specific ways:

  • Research on a given ticker had to be re-derived from scratch each time - nothing persisted between sessions.
  • Risk discipline depended on willpower in the moment - stop-losses, sizing, and exposure limits were easy to bend "just this once."
  • There was no record of what had already been learned - the same mistakes could repeat without anyone noticing the pattern.

None of that is a strategy problem - it's a discipline-and-memory problem. Solving it meant building agents that could actually refuse a request, not just agree with whatever the user wanted to hear.

What I Did

I designed and built six narrow-purpose agents end-to-end, plus a human approval checkpoint that sits between every agent's output and any action taken on it. I wrote each agent as a full specification - not a prompt - with a fixed output format, a set of hard rules it cannot be talked out of, and worked examples covering both approval and every rejection path.

Agent-automated Human-required Active path (paper trading) Disabled — Robinhood, paper trading only
Merged system architecture and agent workflow diagram Data sources feed Research Analyst, which feeds a gate pipeline of Strategy Lab, Market Regime Master, Risk Manager, and Portfolio Manager, which feeds a human approval checkpoint, which splits to the active Paper Trading Environment and a built-but-disabled Robinhood Execution Layer (paper trading only). Paper Trading connects to the Backtesting Engine and the Memory Engine, which loops back to Research Analyst. Data Sources Finviz · TradingView · Filings & earnings · Analyst actions · Economic calendar · Sector rotation Research Analyst — evidence + score Gate Pipeline — in sequence, any gate can reject Strategy Lab Market Regime Master Risk Manager Portfolio Manager Approval Staging — human checkpoint Paper Trading Environment Robinhood Execution Layer Built · Disabled · Paper Trading Only shares metric formulas with Backtesting Engine Memory Engine Memory Engine findings loop back into Research Analyst for the next idea — append-only, never overwritten.
The full system in one view. Strategy Lab and Market Regime Master are upstream gates documented in the same pipeline; Research Analyst, Risk Manager, Portfolio Manager, the Backtesting Engine, the Paper Trading Environment, and the Memory Engine are the six agents I designed and built in depth.

Research Analyst

Gathers and scores evidence on a ticker across filings, earnings, and analyst actions.

Rule: never recommends a trade, no execution authority.

Risk Manager

Gatekeeper for one trade's structure - approves or rejects against hard capital-preservation rules.

Rule: default posture is reject; the rule wins over the opportunity.

Portfolio Manager

Checks the whole book - concentration, sector exposure, cash reserves.

Rule: recommendations only, never auto-executes a rebalance.

Backtesting Engine

Runs a strategy against history, benchmarked to SPY, before it can be called "Active."

Rule: logs every result, including failed and inconclusive tests.

Paper Trading Environment

Runs the full pipeline against a simulated $100K account - same gates, no exceptions.

Rule: human approval required before every paper fill too.

Memory Engine

Append-only record of setups, mistakes, and ticker history, tagged by evidence status.

Rule: no opinion self-promotes to a rule without evidence.

How I Approached It

Default posture is reject

A trade only becomes approved once every rule has passed - never the reverse. If a rule and a good opportunity conflict, the rule wins.

Pressure isn't new information

"Just this once" gets treated as pressure, not evidence. The agent restates the rule and the reason instead of re-evaluating the trade.

One job per agent

No agent can recommend, size, and approve a trade at once. Splitting responsibility made every decision independently auditable.

Evidence has to earn its status

Findings are tagged Observation, Hypothesis, Testing, Confirmed, or Retired. Conviction alone - even repeated - never promotes itself to Confirmed.

Risk Manager's checks run in a fixed order and stop at the first failure. Grouping them into four stages, instead of a flat list, made the agent's behavior easy to test: break one rule, and it fails at exactly the right stage.

Condensed risk-gate decision flow A flowchart of Risk Manager's four grouped check stages, each able to reject the trade, ending in approved. Proposed Trade 1. Structural Validity Stop loss valid · No margin, cash covers it Entry price ≥ $5.00 REJECTED names the failed rule 2. Circuit Breakers Daily loss < 2% of day-open equity Weekly loss < 5% of week-open equity REJECTED breaker already tripped 3. Sizing & Cash Check 1%-of-equity position size, rounded down, always - must fit cash on hand REJECTED doesn't fit cash on hand 4. Risk/Reward Computed and surfaced every time weak R:R is flagged, not auto-rejected APPROVED Every rejection is logged with the exact rule name - never silent.
Risk Manager's four grouped check stages - same underlying rules as a flat checklist, organized so a failure is easy to locate and explain.

What I Learned

The hard part was never getting an agent to compute a position size correctly - that's a formula. The hard part was getting it to hold a boundary under direct pressure from the person it answers to.

I also learned to be deliberate about where automation stops. It would have been easy to let "the system handles it" quietly expand into decisions that should stay with the client:

  • Moving a strategy to Active
  • Promoting a memory finding to a rule
  • Approving a trade

I rewrote every skill so the agent's job ends at a recommendation, and the client's approval begins right after. The agents compute, score, and propose - whether a trade happens, or a finding becomes a rule, is never decided by the agents themselves. It's decided by the client, every time.

Human-in-the-loop diagram A pipeline showing which steps the agents handle automatically and which steps require explicit human approval. Agent-automated Human-required, no exceptions Research & scoring automated Risk & portfolio math automated Approval Staging explicit yes/no - every single trade Paper fill / reject + log automated Promote to Active strategy or memory rule Memory tagging automated
Where the agents run on their own, and where the pipeline stops and waits on the client - on purpose, in both paper and live mode.

The Pivot

The strategy didn't change. What changed is whether the process has a memory and a spine.

Before and after process diagram A comparison table contrasting discretionary trading before this system with the gated, evidence-tracked process after. Before: discretionary After: Gated & Accountable Research Scattered notes, re-derived from scratch each time a ticker was revisited Research Dated, evidence-rated reports appended to a running file per ticker Position sizing By feel, in the moment, no enforced stop-loss requirement Position sizing 1%-of-equity rule, no stop loss means no trade, full math shown every time Memory Whatever happened to be remembered - no record of past mistakes Memory Append-only, status-tagged record that survives between sessions Pressure / override "Just this once" usually won, because no one was there to push back Pressure / override Agent restates the rule and the reason - pressure is logged, not rewarded
Gap found

Win rate and expectancy were both blocked by one fact: zero trades had ever closed. I added the Paper Trading Environment to generate real decision data safely, through the same gates a live trade faces.

Rule added

Paper trades closed faster than real evidence could justify. I capped paper-derived memory findings at Observation/Hypothesis - never Confirmed - until they clear the same sample-size bar real evidence needs.

Framing fixed

"Automatic" close-checking implied live streaming the system doesn't have. I replaced it with an explicit disclosure: positions are checked at invocation time, not streamed continuously.

Impact

There's no win rate to report, and I'm not going to dress one up - zero live trades have been placed, and the paper book is still early. That's the right state for a system like this to be in before real capital is involved; the impact here is the process it produced.

6 Specialized AI Agents
0 Trades Executed Without Approval
Live First Real Decision Data

What Stayed With Me

The agents didn't need to be smarter to be trustworthy - they needed narrower jobs and the willingness to say no. The best thing I built into this system wasn't a feature. It was a boundary it won't cross, even under pressure.

Claude · Prompt Engineering · Agent Architecture · Risk & Workflow Design