MOMENTUM
VALUE
RISK
SYNTHESIZE
← RETURN TO BASE
AGENTIC AI PAPER TRADING ● LIVE May 2026 — Present

SENTIENT
TRADER

An autonomous AI paper-trading system — a four-LLM committee debates every market headline in real time, then trades only when conviction, risk, and quality gates all clear. Running unattended for weeks with near-zero errors.

PythonLangGraphGroq LLaMA 3.1FastAPIReactViteTailwind CSSSupabaseRedis StreamsAlpaca APIDockerOracle CloudNetlifyGitHub ActionsPydanticRechartsReact Flow
Status Live · Autonomous
Period May 2026 — Present
Domain Agentic AI · Trading
Uptime Weeks Unattended

Production Metrics

4 LLM Agent Committee Sequential debate — not averaged noise
45% Signals Pre-Screened Zero LLM calls on low-quality noise
158+ Commits Shipped Active development & iteration
15+ Trading Features All hot-reloadable via DB config

About

> cat mission_briefing.txt CLASSIFIED...

Most trading bots pattern-match headlines and fire orders. Sentient Trader is fundamentally different — it runs a sequential four-agent AI debate where each persona reads and reacts to what the previous agent actually said, producing genuine disagreement rather than averaged noise.

Built on LangGraph and Groq-hosted LLaMA 3.1, the system ingests live market news via Alpaca WebSocket, routes signals through Redis Streams, and processes every headline through a full committee debate. The momentum trader sets a thesis, the value investor challenges it with fundamentals, the risk manager stress-tests both sides, and the portfolio manager synthesises the final call — all with complete decision traces stored for replay.

A pure-Python risk gate then evaluates five independent conditions before any trade executes. The system has been running autonomously since May 2026 — processing thousands of signals, executing risk-gated paper trades via Alpaca, and persisting every decision trace for full auditability. Safety boundary: paper trading only, educational use only, not financial advice.

See It In Action

🖥️ LIVE

Live Dashboard

Real-time signal feed, PnL equity curve, system health, and full agent decision traces — no login required for read access.

OPEN DASHBOARD →
▶️ REPLAY

Pipeline Replay

Every decision is replayable as an interactive pipeline — news → pre-screen → market context → 4-agent debate → risk gate → execution.

REPLAY GOOG SIGNAL →
💉 INJECT

Signal Injector

Submit your own ticker and headline to watch the full committee debate unfold in real time. Simulated signals are safely blocked from order execution.

TRY SIGNAL INJECTOR →

The Four-Agent Debate

Sequential, not parallel. Each agent reads and reacts to the previous agent's actual reasoning — producing a real argument, not independent guesses in a vacuum.

01 TREND

Momentum Trader

LLM call #1 — analyses price action, momentum indicators, and short-term directional bias. Sets the opening thesis that subsequent agents react to.

LangGraphGroq LLaMA 3.1RSI / SMA / EMA
02 FUNDAMENTALS

Value Investor

LLM call #2 — reads the momentum trader's actual take, then evaluates the headline through a fundamentals lens. Disagreement here is substantive, not coincidental.

LangGraphPydanticStructured Output
03 RISK

Risk Manager

LLM call #3 — stress-tests both sides. Identifies blockers, assigns risk levels, and flags concentration or circuit-breaker violations before synthesis.

LangGraphRisk AnalysisGuardrails
04 SYNTHESIZE

Portfolio Manager

LLM call #4 — the synthesiser. Reads the full three-agent debate, issues BUY / SELL / HOLD, and writes the decision trace. The final pure-Python risk gate decides execution.

LangGraphDecision TraceSupabase

How It Works

DATA SOURCES
📰 Alpaca News API WebSocket + REST backfill
📈 Alpaca Market Data Live price + day change
INGESTION & STREAMING
📡 Ingestion Worker Dedupe · Store · Outbox
🔴 Redis Streams Consumer groups · At-least-once
AI COMMITTEE
🤖 LangGraph Agent 4-LLM sequential debate
🛡️ Risk Gate Pure Python · 5 conditions
EXECUTION & DELIVERY
💰 Alpaca Paper Orders Brackets · Stop-loss · Fill verify
🖥️ React Dashboard Vite · Tailwind · Netlify
PERSISTENCE
🟢 Supabase Postgres Trades · Config · Decision traces
FastAPI Gateway REST · Auth · Rate limits

The Pipeline at a Glance

📰Alpaca News
📡Ingestion
🔴Redis Stream
🤖LangGraph
🧠4-LLM Debate
📈Alpaca Orders
🟢Supabase
🖥️Dashboard

Capabilities

🤖

Sequential Agent Debate

Not parallel guesses — each agent reads the previous agent's actual reasoning. The value investor reacts to the momentum trader's thesis, producing genuine disagreement.

🔍

Full Decision Transparency

Every signal persists the complete four-agent debate, risk gate verdict, and final call as JSONB. Open any signal on the live dashboard to replay the reasoning.

🧠

Deterministic Pre-Screening

Pure-Python quality scorer evaluates every headline before spending LLM budget. ~45% of signals resolved with zero LLM calls — low-quality noise filtered for free.

🛡️

Risk-Gated Execution

Five independent conditions must all pass in pure Python: sentiment threshold, confidence calibration, article quality, execution plan, and position risk — no LLM in the loop.

🔌

LLM Provider Cascade

ModelRouter handles rate limits, quota exhaustion, and outages automatically — cascading across Groq and OpenRouter providers within the same signal processing.

▶️

Pipeline Replay

Every decision is replayable as an interactive pipeline — news → pre-screen → market context → 4-agent debate → risk gate → execution — reconstructed from stored traces.

📊

Technical Analysis Engine

RSI, SMA, EMA, MACD technical indicators pipeline with volume ratio and momentum scoring feed directly into agent context for data-grounded LLM reasoning.

⚙️

Hot-Reloadable Config

15+ institutional-grade trading features — circuit breaker, bracket orders, trailing stops, concentration limits — all toggleable via database config, zero redeployments.

💾

Store-First Architecture

At-least-once delivery via Redis Streams + consumer groups. Nothing is lost if Redis goes down. 4-layer deduplication from ingestion through agent cache.

My Contributions

Designed and built the four-agent LangGraph StateGraph orchestration — defining sequential debate flow, structured Pydantic output schemas, and inter-agent context passing
Implemented the quota-aware LLM provider cascade (ModelRouter) across Groq and OpenRouter — automatic rate-limit handling, cooldown management, and fallback within single signal processing
Built the deterministic pre-screening system that filters ~45% of signals with zero LLM calls — pure-Python quality scoring with source credibility, catalyst detection, and freshness gates
Engineered the risk-gated execution pipeline — five independent conditions in pure Python (sentiment, confidence calibration, article quality, execution plan, position risk)
Developed the React + Vite dashboard with real-time signal feed, PnL charting (Recharts), interactive pipeline replay (React Flow), and live system health monitoring
Architected the event-driven ingestion pipeline — Alpaca WebSocket + REST backfill, 4-layer deduplication, Redis Streams outbox, and consumer group processing
Built the signal outcome tracking system — 15min / 1hr / EOD return labeling to validate whether committee recommendations move in the expected direction
Deployed the full stack across Oracle Cloud (3 workers) + Netlify (frontend) + Supabase (Postgres) with Docker Compose and CI/CD via GitHub Actions

Challenges Overcome

Making four sequential LLM calls reliable at scale — solved with a quota-aware provider cascade that handles rate limits, quota exhaustion, and outages automatically across Groq and OpenRouter
Preventing the system from trading on noise — built a multi-layer gating system: deterministic pre-screen, calibrated confidence thresholds, article quality scoring, and price-move gates
Running autonomously for weeks without intervention — designed 4 independent services with distinct failure domains, store-first architecture, and Redis-backed health heartbeats
Balancing transparency with performance — stored complete decision traces as JSONB without impacting pipeline throughput, enabling full replay of any historical decision

Repository

← RETURN TO PROJECTS