Personal Project · Multi-Agent System

Portfolio Intelligence

I got tired of checking five apps before making a portfolio decision, so I built a system that does it for me

Two LangGraph pipelines handle different sides of portfolio management. The Analysis Pipeline runs 9 agents in a 3-tier architecture — scanning macro conditions, tracking congressional trades, analyzing fundamentals, and scouting new securities. The Allocation Builder runs 7 agents that take a target allocation model and recommend specific stocks and ETFs to construct a portfolio from scratch, with side-by-side scenario comparison. Haiku-powered context routers build targeted intelligence briefings between tiers in both pipelines. I can ask Siri "Portfolio Check" for a spoken answer, or pull up the full React dashboard. The backend runs on FastAPI and BigQuery on GCP, deployed to Railway.

🔒 Read-Only · No Trade Execution 🤖 LangGraph + CrewAI + Claude ⚛️ React + FastAPI 📊 SnapTrade + Fidelity ☁️ GCP BigQuery 🗣️ Siri Voice Integration 🔑 Encrypted · JWT Auth
System Overview
LangGraph Pipeline Tiered Orchestration · Context Routing Portfolio Smart $ Macro Security Synthesizer Calendar Tax Scout 9 specialists DataStore Abstraction Strategy Pattern · Backend-Agnostic BigQuery · GCP Finnhub SnapTrade FMP ⭐ React + Vite Vercel FastAPI Railway
Click any tab · Sample data
How this works
Everything the agents produce ends up here — organized into tabs so I can find what I need fast. Recharts handles the portfolio-level visualizations, TradingView's Lightweight Charts powers the candlestick views, and each tab shows which agent and data sources are behind it.
📈
Portfolio Analyst Agent + SnapTrade Brokerage API
Live holdings pulled from Fidelity via SnapTrade, priced through Finnhub. The Portfolio Analyst agent runs five skill tools to compute risk metrics, then Claude synthesizes the full picture.
SnapTrade APIFinnhub QuotesRisk CalculatorDrift Detector
Total Value
$487,231
Day Change
+$2,847
+0.58%
Total P&L
+$63,441
+14.97%
Holdings Heatmap
AAPL
+2.1%
$89K
MSFT
+1.4%
GOOGL
-0.8%
AMZN
+3.2%
NVDA
-1.5%
JPM
+0.9%
V
+0.4%
Sector Allocation
Tech 42%
Healthcare 18%
Financials 15%
Consumer 12%
Energy 8%
Other 5%
📊
Holdings — Positions, Tax Lots & Candlestick Charts
Live positions synced from Fidelity via SnapTrade. Click any row to expand tax lots with per-lot cost basis, gain/loss, and long-term vs short-term classification. Below the table, a TradingView candlestick chart and detail strip show the selected position. Tax lots sourced from Fidelity CSV import or reconstructed from SnapTrade trade history.
SnapTrade HoldingsFinnhub PricesTax Lot TrackerTradingView ChartsStock Story Generator
Ticker Shares Price Value P&L Return
NVDA 25 $892.45 $22,311 +$4,621 +26.1%
📋 3 lots Short-term: +$1,840 Long-term: +$2,781
2022-03-15 10 $242.18 $8,925 +$6,500 LT +268%
2023-08-22 8 $456.30 $3,650 +$3,490 LT +95.6%
2025-11-04 7 $629.55 $4,407 +$1,840 ST +41.8%
AAPL 45 $198.42 $8,929 +$1,240 +16.1%
MSFT 30 $432.18 $12,965 +$2,184 +20.3%
GOOGL 20 $178.56 $3,571 -$284 -7.4%
JPM 40 $198.32 $7,933 +$586 +8.0%
V 35 $278.91 $9,762 +$743 +8.2%
UNH 12 $524.67 $6,296 -$228 -3.5%
NVDA NVIDIA Corporation
Shares25
Avg Cost$708.33
Mkt Value$22,311
Total P&L+$4,621
30d 90d 180d 1Y
⚖️
Allocations — AI Profile Builder + Drift Detection
Two powerful features: an AI allocation profile builder that translates plain-English investor descriptions into 6-dimension allocation models (sector, risk, geography, market cap, asset class, income style), and a drift detector that compares targets against actual positions in real-time and suggests rebalancing moves.
AI Profile Builder (Claude)Drift DetectorRebalance SuggesterTarget Profiles (BigQuery)
🧠 Build Allocation Profile with AI
AI-Generated Profile — "Growth + Income Blend"
SectorTechnology 35%Healthcare 25%Financials 15%Consumer 15%Energy 10%
RiskModerate 50%Growth 35%Conservative 15%
GeographyUS 70%International 20%Emerging 10%
Market CapLarge 55%Mid 30%Small 15%
Asset ClassEquity 75%ETF 20%REIT 5%
Income StyleGrowth 55%Dividend 30%Blend 15%
Category Allocations — Live Drift
Technology
40% → 42.3%
+2.3%
Healthcare
20% → 18.1%
-1.9%
Financials
15% → 15.4%
+0.4%
Consumer
12% → 11.8%
-0.2%
Energy
8% → 7.9%
-0.1%
🧠
Portfolio Analyst Agent — Full 5-Tool Analysis
Five skill tools crunch the numbers: Sharpe ratio, concentration risk (HHI), allocation drift, performer rankings, and pairwise correlation across all holdings. Claude reads the results and writes the narrative — the tools guarantee the math is right.
Sharpe & VolatilityHHI ConcentrationCorrelation MatrixPerformer RankingDrift Detector
Risk Metrics
Sharpe Ratio
1.42
Portfolio Beta
1.08
Max Drawdown
-12.4%
Volatility
16.2%
Correlation Matrix
AAPL
MSFT
NVDA
GOOGL
AAPL
1.00
0.87
0.72
0.65
MSFT
0.87
1.00
0.68
0.45
NVDA
0.72
0.68
1.00
0.51
GOOGL
0.65
0.45
0.51
1.00
Top Performers
Gainers
AMZN +24.3%
NVDA +18.7%
AAPL +12.1%
Losers
UNH -4.2%
GOOGL -2.8%
🏛️
Smart Money Agent — Congressional Trade Tracker
Pulls STOCK Act disclosures from Finnhub, cross-references against my holdings, and spots patterns — which members are buying, sector clustering, timing relative to legislation. The overlap detection highlights when Congress is trading the same stocks I own.
Finnhub Congressional APIOverlap DetectorPattern Analyzer
Recent Congressional Trades
Member Ticker Type Amount Date
Rep. Johnson MSFT BUY $50K–$100K Mar 2026
Sen. Chen AAPL SELL $10K–$50K Feb 2026
Rep. Williams NVDA BUY $100K–$250K Mar 2026
Sen. Davis JPM BUY $50K–$100K Feb 2026
Rep. Patel V BUY $25K–$50K Mar 2026
Sen. Martinez GOOGL SELL $100K–$250K Jan 2026
Your Portfolio Overlap (3 matches)
MSFT
AAPL
NVDA
🌍
Macro Scanner + Security Scanner Agents — Multi-Signal NLP
Two agents working in parallel: Macro Scanner covers world and US news, Security Scanner focuses on my specific holdings. Each article gets scored by 4 independent signals — keyword rules, VADER NLP, Alpha Vantage AI, and Fear & Greed. When signals disagree, that story gets priority.
NewsAPI (150K+ sources)Finnhub NewsVADER NLPAlpha Vantage AICNN Fear & Greed54 Keyword Rules
Macro Events
Trade tensions with EU escalate
Market impact: High
GDP growth exceeds expectations
+2.8% vs. +2.4% forecast
Fed signals rate hold through Q2
Market impact: Low
Oil prices up 8% on supply disruption
WTI crude to $89/barrel
Security Alerts
NVDA
Earnings beat by 12%
Stock rally likely continues
JPM
Analyst upgrade to overweight
Goldman Sachs PT raised to $215
AAPL
Supply chain concerns in SE Asia
Potential margin pressure Q2
MSFT
Azure growth accelerates
AI workloads driving revenue
📅
Earnings & Events Calendar Agent
Pulls market events from Finnhub (earnings, ex-dividends, Fed meetings) and combines them with personal financial events I add myself. The agent scans this timeline and flags conflicts — like a tax payment due the same week as a rebalancing opportunity.
Finnhub CalendarPersonal Events (BigQuery)Conflict Detector
Apr 15
MSFT Ex-DividendDividend
Apr 15
Quarterly Tax PaymentPersonal
Apr 24
AAPL EarningsEarnings
Apr 30
Bonus ExpectedPersonal
May 6–7
Fed MeetingEvent
May 12
GOOGL EarningsEarnings
May 22
AMZN Ex-DividendDividend
🔄
SnapTrade Brokerage Integration — Transaction History
Full trade history pulled directly from Fidelity via SnapTrade — every buy, sell, dividend, contribution, and fee. Multiple agents reference this data: the Tax Strategy agent uses it for cost basis, the Portfolio Analyst uses it for performance attribution.
SnapTrade TransactionsMulti-Account SupportType Classification
Total Trades
47
Capital Deployed
$423K
Dividends
$3,841
Fees Paid
$127
Date Type Ticker Shares Price Total
Mar 28 BUY AAPL 15 $192.50 $2,887.50
Mar 25 DIV JPM 40 $0.95 $38.00
Mar 22 SELL GOOGL 5 $179.20 $896.00
Mar 18 CONTRIB $5,000.00
Mar 15 BUY NVDA 8 $891.30 $7,130.40
Mar 10 DIV V 35 $1.54 $53.90
🧾
Tax Strategy Agent — Harvest & Wash Sale Tracking
Monitors unrealized gains/losses and identifies tax-loss harvesting opportunities. Skills compute cost basis, classify holding periods, track 30-day wash sale windows, and rank candidates by actual tax savings. Frequency increases in Q4 when every dollar counts.
Cost Basis CalculatorWash Sale TrackerHarvest RankerSnapTrade Positions
Unrealized Gains
+$63,441
Short-Term
$18,200
Long-Term
$45,241
Harvest Opportunities
3
Loss Harvesting Candidates
Ticker Unrealized Loss Holding Period Est. Tax Savings Wash Sale
GOOGL -$2,840 Long-term $568 Clear
UNH -$1,920 Short-term $461 Clear
AMZN -$1,250 Short-term $300 ⚠️ 12-day window
🧠
Synthesizer Agent — Cross-Agent Intelligence
This is where it all comes together. The Synthesizer reads outputs from all other agents — risk metrics, news sentiment, congressional signals, calendar events, tax implications — and produces prioritized recommendations with confidence scores. Every recommendation explains why, not just what.
Cross-Agent SynthesisConfidence ScoringTax-Aware TimingAgent Outputs (BigQuery)
Buy
AMZN
Strong earnings momentum + institutional accumulation, low correlation to existing tech holdings
Confidence:
82%
Hold
NVDA
High concentration risk offset by sector momentum, watch for earnings volatility
Confidence:
71%
Review
GOOGL
Negative sentiment trend across multiple signals, monitor regulatory developments closely
Confidence:
64%
🔎
Stock Finder — Two-Tier Screening + AI Search + Stock Scout Agent
A two-tier screening system: Tier 1 uses FMP's screener with 13 filters including cascading industry dropdowns, market cap range, volume, beta, and exchange. Tier 2 auto-enriches top results with deep fundamental metrics — P/E, ROE, Piotroski F-Score, Altman Z-Score, RSI, and more — with 14 client-side advanced filters. Plus AI natural language search and the Stock Scout agent for allocation gap detection.
AI Search (Claude)Tier 1 Screener (13 filters)Tier 2 Deep Metrics (14 filters)Gap DetectionFMP API
AI Search Strategy
Looking for mid-cap healthcare companies with strong dividends. Applying screener filters for $2B–$10B market cap, Healthcare sector, and 3%+ dividend yield. Also searching for thematic matches.
healthcare dividend medical REIT pharma income
Sector: Healthcare
Industry: Medical REITs
Market Cap: $2B – $10B
Min Dividend: 3%+
Min Volume: 500K+
Piotroski: 6+
🤖 Stock Scout Agent
Your portfolio is underweight Healthcare by 6.4%. These results align with your allocation gap — adding a healthcare dividend position would improve both diversification and income yield.
TickerNameMkt CapPriceYieldP/EROEScore
OHIOmega Healthcare Investors$8.2B$31.477.8%28.49.2%7/9
ABBVAbbVie Inc$9.1B$168.523.8%15.262.1%8/9
VTRVentas Inc$4.7B$48.933.4%42.13.1%5/9
SBRASabra Health Care REIT$3.8B$16.246.2%19.87.4%6/9
🧠
Agent Control Plane — Config-Driven Orchestration
A visual control center for the entire multi-agent pipeline. See how agents connect in an SVG pipeline graph, toggle skills on/off per agent, tune skill parameters (correlation thresholds, risk windows, tax brackets) without touching Python code, and compare config versions with built-in A/B comparison. Every config change is immutably versioned.
Pipeline GraphSkill RegistryParameter EditorVersion HistoryA/B Compare
1
Analyst
2
Smart $
3
Macro
4
Security
5
Calendar
6
Tax
7
Scout
8
Synth
📈 Portfolio Analyst
v3 · Apr 10
correlation risk_metrics concentration_risk allocation_drift
high_correlation0.70
history_days90
🔎 Stock Scout
v1 · Apr 10
allocation_gaps security_screener fundamentals_lookup
min_gap_pct2.0
enrich_top_n5
🧾 Tax Strategy
v2 · Apr 8
holding_period wash_sales harvest_candidates capital_gains
wash_sale_window30 days
loss_deduction_limit$3,000
⚙️
System Configuration — APIs, Agents & Data Store
All the wiring that keeps the system running. API connection status, agent on/off controls, and the DataStore backend indicator showing whether we're running against BigQuery (production) or SQLite (local dev). Secrets stay in macOS Keychain — never in config files.
BigQuery (GCP)macOS KeychainJWT Auth
API Status
Finnhub Connected
SnapTrade Connected
NewsAPI Connected
Alpha Vantage Connected
Financial Modeling Prep Connected
ElevenLabs Connected
Agent Controls
Portfolio Analyst
Risk Monitor
News Scanner
Smart Money Tracker
Macro Scanner
Data Store
Backend: BigQuery (GCP) Production

Nine agents, each with a real job

Every agent has a specific role, a backstory that shapes its reasoning, configurable skills with tunable parameters, and structured output formats. LangGraph orchestrates them in a tiered pipeline — Tier 1 scouts the landscape, an LLM-powered context router builds targeted briefings for each downstream consumer, Tier 2 does holdings-level analysis, Tier 3 goes deep on fundamentals and new securities, and the Synthesizer pulls it all together. Each agent reads upstream intelligence tailored to its needs, not the raw firehose.

📈
Portfolio Analyst
Agent 1 · Performance, Risk & Correlation

Runs five tools across every holding: Sharpe ratio and volatility, concentration risk (HHI, sector limits), drift vs. my target allocations, performer ranking with percentiles, and pairwise correlation analysis — because three tech ETFs might look diversified until you see they move in lockstep.

Finnhub Prices Risk Metrics Drift Alerts Correlation Matrix
View Agent Profile
Goal

Analyze current portfolio holdings, calculate key metrics, identify strongest and weakest positions, and provide a clear summary of portfolio health and performance.

Backstory

Seasoned financial analyst specializing in ETF portfolios, focused on practical insights and clear communication without jargon.

Skills
⚙️Risk Metrics(4)⚙️Concentration(5)⚙️Allocation Drift(2)⚙️Performer Ranking⚙️Correlation(3)
Expected Output

Comprehensive portfolio analysis report with risk metrics (Sharpe, volatility, drawdown), concentration warnings, allocation drift, performer rankings, and correlation insights.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🏛️
Smart Money
Agent 2 · Congressional Trading & 13F Ownership

Pulls congressional stock trades from STOCK Act disclosures, cross-references them against my holdings, and layers in Form 13F institutional ownership data. Which members are buying or selling, which institutions hold multiple positions in my portfolio — the kind of signals that institutional investors pay attention to.

Finnhub Congressional Trade Patterns Overlap Alerts 13F Institutional
View Agent Profile
Goal

Analyze congressional stock trading disclosures and 13F institutional ownership data, identify patterns relevant to the user's portfolio.

Backstory

Financial intelligence analyst specializing in insider and institutional trading patterns. Monitors STOCK Act congressional disclosures and quarterly 13F filings.

Skills
⚙️Congressional Trades⚙️Smart Money Overlap⚙️13F Institutional Ownership
Expected Output

Congressional activity brief, institutional ownership summary, cross-holder analysis identifying institutions with positions across multiple portfolio holdings.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🌍
Macro Scanner
Agent 3 · World & US News

Scans broad news for macro events — Fed moves, GDP, employment data, geopolitical shifts, trade policy — and runs each story through three sentiment scoring systems plus the CNN Fear & Greed Index. The interesting part: when the signals disagree (alarming headline, reassuring details), that's flagged as the story worth reading first.

NewsAPI Finnhub News VADER NLP Alpha Vantage AI Fear & Greed
View Agent Profile
Goal

Interpret pre-scored macro news briefing and write portfolio-relevant analysis with multi-signal sentiment scoring.

Backstory

Macroeconomic analyst who receives pre-analyzed news data and translates it into actionable portfolio insights. Concise, connects findings to specific holdings.

Skills
⚙️Macro News Scanner⚙️Multi-Source Feed⚙️Sentiment Scoring
Expected Output

Market context with Fear & Greed reading, key headlines with severity scoring, multi-signal sentiment analysis, and portfolio impact assessment.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🔍
Security Scanner
Agent 4 · Holdings-Specific Intelligence

Same multi-signal scoring as the Macro Scanner, but zoomed in on each individual holding. Per-ticker sentiment (60% VADER NLP, 40% keyword rules), Alpha Vantage AI relevance scores, and material event detection — earnings surprises, splits, regulatory actions. If something's happening with a stock I own, this agent catches it.

Finnhub Company News Multi-Signal Scoring Signal Disagreements Material Events
View Agent Profile
Goal

Interpret pre-scored per-ticker security data, flag anything that could change the investment thesis for each holding.

Backstory

Securities analyst covering the portfolio. Receives pre-scored news sentiment, material event flags, and analyst/insider signals per ticker. Data-driven, focuses on thesis changes.

Skills
⚙️Security News Scanner⚙️Multi-Signal Analysis⚙️Material Event Detection
Expected Output

Per-ticker sentiment with multi-signal indicators, material event flags, signal disagreement callouts, and thesis change warnings.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
📅
Earnings & Events Calendar
Agent 5 · Forward-Looking Timeline

Combines market events (earnings dates, ex-dividends, Fed meetings) with personal financial events (big expenses, bonus timing, tax deadlines). The goal: answer the question "what's coming up in the next few weeks that I should be thinking about?" — because a great trade idea doesn't help if rent is due.

Finnhub Calendar Personal Events Upcoming Timeline Cash Flow Impact
View Agent Profile
Goal

Interpret pre-built event timeline and highlight anything that should affect portfolio timing or decisions.

Backstory

Financial planner's assistant who maintains the master calendar. Great at spotting timing conflicts and planning considerations across market and personal events.

Skills
⚙️Calendar Event Scanner⚙️Timing Detection⚙️Conflict Analysis
Expected Output

Weekly timeline organized by urgency, timing conflicts and event clustering, trade timing implications, and cash flow considerations.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🧾
Tax Strategy
Agent 6 · Tax-Loss Harvesting & Optimization

Watches unrealized gains and losses for tax-loss harvesting opportunities — cost basis math, short-term vs. long-term classification, 30-day wash sale tracking, and harvest candidates ranked by actual tax savings. Runs weekly, but cranks up the frequency in Q4 when every dollar of tax savings counts.

Cost Basis Data Wash Sale Windows Harvest Candidates Capital Gains
View Agent Profile
Goal

Analyze the portfolio for tax optimization opportunities including tax-loss harvesting candidates, holding period strategy, wash sale risks, and estimated capital gains liability.

Backstory

Tax-aware investment analyst specializing in ETF portfolio tax optimization. Focuses on practical tax-loss harvesting, holding period management, and wash sale avoidance.

Skills
⚙️Cost Basis Calc⚙️Holding Periods(2)⚙️Wash Sale Detector(1)⚙️Harvest Finder(2)⚙️Cap Gains Est(4)
Expected Output

Cost basis analysis, holding period classifications (short-term vs long-term), wash sale warnings, harvest candidates ranked by tax savings, and capital gains tax liability estimates.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🔎
Stock Scout
Agent 7 · Allocation Gaps & New Securities

Looks at where the portfolio is underweight vs. targets and goes hunting for securities to fill the gap. Three tools: allocation gap detection, a server-side stock screener powered by Financial Modeling Prep, and a fundamentals deep-dive that pulls ratios and key metrics. If I'm light on international exposure, Stock Scout finds the ETFs worth considering — not just any ETF, but ones that fit my risk profile.

FMP Screener Gap Analysis Security Recs Fundamentals
View Agent Profile
Goal

Analyze portfolio allocation gaps and recommend new securities (stocks, ETFs, or funds) that would improve diversification and fill underweight positions.

Backstory

Experienced investment research analyst specializing in security selection and portfolio construction. Understands factor investing, sector rotation, and matching securities to allocation targets.

Skills
⚙️Gap Detector(1)⚙️Security Screener(1)⚙️Fundamentals Lookup(1)
Expected Output

5-10 recommended securities each with ticker, security type, which allocation gap it fills, key metrics (P/E, dividend yield, expense ratio), confidence level, and risks.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
📊
Fundamentals Analyst
Agent 8 · Financial Statement Deep-Dive

Reads financial statements the way a CFA reads game film. Pulls income statements, balance sheets, cash flows, and owner earnings for every holding, then computes derived metrics — gross/operating/net margins, revenue growth YoY, debt-to-assets, current ratio, and EV/revenue. Flags concentration risk from revenue segmentation and grades financial health using Piotroski and Altman Z-scores.

FMP Financials Health Scores Margin Trends Revenue Segments
View Agent Profile
Goal

Perform CFA-level fundamental analysis on all portfolio holdings using financial statements, derived metrics, and health scoring models.

Backstory

CFA-level fundamental analyst who reads financial statements the way a coach reads game film — looking for trends, red flags, and competitive advantages that surface-level metrics miss.

Skills
⚙️Fundamentals Scanner(12 data sources)
Expected Output

Per-holding financial health report with margin analysis, growth metrics, debt assessment, Piotroski F-Score interpretation, Altman Z-Score, revenue concentration risk, and comparative rankings.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection
🧠
Synthesizer + Audio
Agent 9 · Cross-Reference & Recommendations

Takes everything the other eight agents found and connects the dots. Receives LIVE upstream context from the current pipeline run — not stale reports — so every recommendation reflects the latest data. Factors tax implications into timing, weighs calendar events against trade ideas, folds in fundamentals and Stock Scout recommendations, and produces prioritized readouts with confidence scores. Also generates podcast-style audio briefings so I can listen to my portfolio update while walking the dog.

Trade Readouts Stock Stories Audio Briefing Tax-Aware Timing
View Agent Profile
Goal

Read LIVE outputs from all eight upstream agents in the current pipeline run and produce unified, prioritized recommendations with confidence levels and cross-agent reasoning.

Backstory

Senior portfolio strategist who synthesizes intelligence from multiple specialist analysts into a coherent action plan. Receives the full upstream context — macro conditions, portfolio health, security signals, smart money activity, tax considerations, fundamentals, and new security recommendations — all from the current run, not stale reports.

Skills
⚙️Agent Report Fetcher⚙️Portfolio Context⚙️Audio Generation
Expected Output

Unified portfolio assessment with 3-7 prioritized recommendations, each with action (BUY/SELL/TRIM/HOLD/HARVEST), confidence level, time horizon, multi-agent reasoning, and tax impact.

🔒
Agent instructions, prompt architecture, and tunable parameters hidden for IP protection

How agents work together

Two LangGraph pipelines handle different questions. The Analysis Pipeline answers "how is my portfolio doing?" — nine agents in three waves analyze holdings, market conditions, and opportunities. The Allocation Builder answers "what should I buy?" — seven agents take a target model and produce a concrete buy list. Both use Haiku-powered context routers between tiers, like mart tables in a data warehouse — each downstream agent gets exactly the upstream intelligence relevant to its job.

Analysis Pipeline — 9 Agents

WAVE 1 WAVE 2 WAVE 3 🌍MacroScanner 📈PortfolioAnalyst 🧾TaxStrategy ContextRouter ContextRouter 🔍SecurityScanner 🏛️SmartMoney 📅Calendar 🔎StockScout 📊FundamentalsAnalyst 🧠SynthesizerAgent 9 PrioritizedRecommendations+ Audio Briefing 3 Waves · 9 Agents · Parallel Within Each Wave · Context Flows Forward · Synthesizer Reads All
💡
Why this architecture matters

Most agent designs dump raw data into the LLM and hope for the best — expensive, slow, and token-hungry. This pipeline runs nine agents in three waves, each wave executing in parallel. LLM-powered context routers sit between each wave, distilling upstream intelligence into targeted briefings — like building mart tables in a data warehouse, each downstream consumer gets exactly the context relevant to its job. The Synthesizer at the end reads all nine upstream reports live, producing unified recommendations backed by multi-agent reasoning without redundant processing.

Allocation Builder

A second LangGraph pipeline for the other side of portfolio management — greenfield construction. Feed it a target allocation model and investment amount, and seven agents go shopping: finding candidates, vetting fundamentals, comparing ETF efficiency, optimizing for tax, and producing a concrete buy list. Run the same model with different parameters and compare scenarios side-by-side.

SET THE TABLE GO SHOPPING VET & CONSTRUCT 📐GapAnalyst 🌍MacroStrategist ContextRouter 🔎StockScout 📊FundamentalsAnalyst 📦ETFStrategist ContextRouter 🧾TaxOptimizer 🏗️PortfolioConstructor 🧠SynthesizerScenario Report Buy List+ ComparisonScenario A vs B 3 Tiers · 7 Agents · Greenfield Construction · Scenario Comparison · No Existing Holdings Required
🔀
Two pipelines, one system

The Analysis Pipeline answers "how is my portfolio doing?" — monthly check-ins, drift detection, rebalancing suggestions. The Allocation Builder answers "what should I buy?" — greenfield construction for new accounts or strategy changes. They share the same agent config infrastructure, skill registry, and DataStore abstraction, but run independently with their own state schemas. Feed the Builder different allocation models and compare the resulting buy lists side-by-side — like A/B testing investment strategy before committing capital.

What it actually does

The whole point is to give me everything I need to make a decision without logging into five different apps. It's read-only by design — it analyzes and recommends, but never touches the brokerage account.

🗺️
Portfolio Heatmap

Treemap visualization sized by allocation, colored by performance. One glance shows where the portfolio is thriving or bleeding.

💥
Scenario Stress Testing

Replay historical crises (2008, COVID, dot-com) against current holdings to estimate portfolio vulnerability under extreme conditions.

⚖️
Drift Detection

Define target allocations, get alerted when market movements push the portfolio off-target, with specific rebalancing suggestions.

🧠
AI Allocation Builder

Describe your investor profile in plain English — "growth-focused, tech-heavy, some international" — and Claude generates a 6-dimension allocation model across sector, risk, geography, market cap, asset class, and income style. Fine-tune with sliders after.

🧾
Tax-Loss Harvesting

Scan unrealized losses against realized gains and suggest tax-aware trades. Especially valuable near year-end.

📖
Stock Stories

AI-generated per-holding narratives covering performance, catalysts, sentiment, and portfolio context — not just raw data tables.

🔮
What-If Simulator

Model adding or removing positions without executing trades. See how hypothetical changes affect allocation, risk, and goals.

🎯
Goal Tracking

Set financial targets with projected trajectories based on current growth rate. Visual progress bars show if you're ahead or behind schedule.

📈
Historical Valuation Charts

Two charting modes: EOD historical with 6-month backfill showing equity and cash value layers (1W/1M/3M/6M/All toggles), and intraday 5-minute candles showing real-time portfolio value fluctuations. Star schema storage (daily holdings fact + daily summary aggregate), FMP → Finnhub → yfinance fallback chain, plus a 30-day sparkline widget on the Dashboard.

🎙️
Podcast Briefings + In-App Player

Morning and evening audio briefings generated by ElevenLabs with two AI host voices. A mobile-first audio player built into the app with play/pause, skip controls, seekable progress bar, collapsible transcript, and scrollable briefing history. Authenticated streaming via blob URLs so audio works with JWT auth. Designed for listening on walks with the dog.

📋
Trade Readouts

Clear, actionable trade recommendations — ticker, action, quantity, rationale — formatted for quick manual entry in Fidelity. You decide what to act on.

📅
Personal Events Calendar

Combine market events with personal financial milestones — tuition payments, bonus timing, property taxes — so recommendations factor in your real cash flow, not just the market.

🔎
Stock Finder + Deep Metrics

A two-tier screening system. Tier 1: FMP-powered screener with 13 filters — sector, industry (cascading dropdown), market cap range, price range, volume, beta, dividend, exchange, and country. Tier 2: automatic deep metric enrichment for top results — P/E, PEG, Price/Book, EV/EBITDA, ROE, ROA, margins, debt-to-equity, Piotroski F-Score, Altman Z-Score, and RSI — with client-side filtering across 14 fundamental and technical dimensions. Plus AI natural language search and the Stock Scout agent for allocation gap detection.

🎛️
Agent Control Plane

Interactive 3-tier pipeline visualization showing all 9 agents, Haiku context routers, and the Synthesizer. A Run Full Pipeline button executes all tiers with real-time status dots on every node. Skill toggles, parameter tuning, immutable versioning, A/B config comparison — all from the UI. Plus a Siri integration status card and context routing display.

🗣️
Siri Voice Integration

An Apple Shortcut wired to the Portfolio Intelligence API. Say "Hey Siri, Portfolio Check" followed by any question — "how's tech doing?" or "any tax harvesting opportunities?" — and Siri speaks back a concise, conversational answer powered by Claude. The shortcut hits a Railway-hosted endpoint authenticated with an API key, and Claude crafts responses optimized for spoken delivery — no markdown, no jargon, under 150 words.

🏗️
Allocation Builder Pipeline

A separate LangGraph pipeline purpose-built for greenfield portfolio construction. Feed it a target allocation model and investment amount, and 7 agents go to work: a Gap Analyst maps what to fill, Stock Scout and an ETF Strategist hunt for candidates, Fundamentals vets them, a Tax Optimizer picks the right vehicle per slot, and a Portfolio Constructor produces a concrete buy list. Run multiple scenarios with different allocation models and compare results side-by-side — A/B testing investment strategy before committing capital.

🔐
macOS Keychain Security

All API keys and secrets stored in macOS Keychain, encrypted by the OS and protected by your login password or Touch ID. No plaintext .env files — even a compromised dependency can't read your credentials.

📊
Correlation Analysis

Pairwise correlation matrix across all holdings reveals hidden concentration risk. Three tech ETFs might look diversified by name but move in lockstep — this tool catches that.

🔄
Transaction History

Full trade history from Fidelity via SnapTrade — buys, sells, dividends, contributions, withdrawals, fees. Summary cards, date/type/ticker filters, sortable table with type-colored badges.

🏦
Multi-Account Selector

Global account switcher scopes all pages to a specific brokerage account. React Context architecture means every dashboard view becomes account-aware without per-page refactoring.

🧪
Multi-Signal Sentiment

Four independent sentiment signals — keyword rules, VADER NLP, Alpha Vantage AI, CNN Fear & Greed — scored before the LLM sees any data. Signal disagreements are flagged as the most interesting insights.

How it all fits together

Built in phases, each one adding a new layer. Click through to see how the architecture grows from a simple data fetch to a full system with eight AI agents, BigQuery on GCP, and a DataStore abstraction that lets me swap backends without touching a line of application code.

Presentation Layer
React + Vite Frontend
Recharts · Lightweight Charts (TradingView) · Tailwind CSS · JWT Auth
Native Mac App
Pywebview wrapper · Dock icon · System notifications
Valuation + Audio Pages
EOD/intraday charts · Sparkline widget · Mobile-first audio player · Blob URL streaming
↓ ↓ ↓
API Layer
FastAPI Backend
REST endpoints · JWT auth · Rate limiting · Security headers · DataStore abstraction · Railway deploy
↓ ↓ ↓
Orchestration Layer
CrewAI Orchestrator
Schedules agents, manages task flow, passes context between agents
↓ ↓ ↓ ↓
Agent Layer
Portfolio Analyst
5 skill tools · Risk metrics · Correlation · Drift · Ranking
Smart Money
Congressional trades · STOCK Act · Insider patterns
Macro Scanner
NewsAPI · Finnhub News · Impact classification
Security Scanner
Company news · Sentiment · Material events
Events Calendar
Earnings dates · Ex-dividends · Personal events
Tax Strategy
Harvest candidates · Wash sales · Cost basis
Stock Scout
Allocation gaps · FMP screener · Fundamentals
Synthesizer
Cross-reference · Tax-aware timing · Trade readouts
↓ ↓ ↓
Data Sources
Finnhub
Quotes · Fundamentals · News · Congressional · Earnings
yfinance
Fallback · Dividends · Institutional holders
SnapTrade
Brokerage API · Holdings · Balances · Transactions · Orders · Performance
NewsAPI
150K+ sources · World & US news
Alpha Vantage
AI sentiment API · Per-ticker relevance scoring
VADER NLP
7,500-word lexicon · Negation & intensifier aware
CNN Fear & Greed
Market-wide sentiment · 0–100 index · Trend tracking
ElevenLabs
Two-voice TTS · Podcast generation
Financial Modeling Prep
Stock screener · Profiles · Ratios · Key metrics · ETF data · Piotroski/Altman scores · RSI/SMA technicals · Historical EOD prices · Intraday 5-min candles
Data Abstraction Layer
DataStore Interface
Strategy pattern · Backend-agnostic API · Factory routing via env config
Valuation Service
Star schema · Daily holdings + summary fact tables · FMP→Finnhub→yfinance fallback · APScheduler capture
Storage Layer
Google BigQuery
GCP serverless warehouse · Agent outputs · Portfolio snapshots · UUID-based IDs · Production backend
SQLite
Local development backend · App settings · Encrypted secrets via Fernet

The tech stack

🤖
CrewAI
Agent Orchestration

Coordinates multiple agents, manages task flow, passes context between them. Each agent gets tools that handle the math so Claude can focus on the reasoning.

🧠
Claude (Anthropic)
LLM Reasoning Engine

The brain behind each agent. Claude Sonnet handles the analysis, classification, and narrative writing through the Anthropic Python SDK.

FastAPI + Uvicorn
Backend API

Async REST API handling all the agent triggers, data retrieval, and auth. JWT tokens, rate limiting, security headers. Deployed on Railway.

⚛️
React 18 + Vite
Frontend

The frontend I can pull up on my phone or laptop. React Router, Tailwind, Recharts for portfolio charts, and TradingView's Lightweight Charts for candlesticks. Lives on Vercel.

📈
Finnhub + SnapTrade + FMP
Market Data + Brokerage + Screener

Finnhub for live quotes, fundamentals, news, and congressional trades. SnapTrade for read-only Fidelity access. Financial Modeling Prep for the two-tier Stock Finder (screener + deep metric enrichment with Piotroski, Altman Z, RSI, SMA), historical EOD prices, and intraday 5-minute candles. FMP→Finnhub→yfinance fallback chain for complete ticker coverage. TTL caching across all sources.

⚖️
Multi-Signal Sentiment
NLP + AI Scoring

Four independent reads on every article before Claude even sees it: VADER NLP (7,500-word lexicon), Alpha Vantage AI (per-ticker relevance), CNN Fear & Greed Index, and 54 custom keyword rules. When the signals disagree, that's where it gets interesting.

🗄️
Google BigQuery + GCP
Cloud Data Warehouse

Production data lives in BigQuery on GCP. I built a DataStore abstraction layer (Strategy pattern with factory routing) so I can swap between BigQuery and SQLite with an environment variable — no code changes needed.

🔐
Security Stack
Auth, Encryption & Audit

JWT auth, macOS Keychain for secrets (no plaintext .env files), Fernet encryption at rest, audit logging, rate limiting, and security headers. Because a portfolio tool without proper security isn't a tool — it's a liability.

🎙️
ElevenLabs
Podcast Audio Generation

Two-voice text-to-speech API that converts agent analysis into morning and evening podcast-style audio briefings. Two AI hosts discuss portfolio moves, market context, and trade recommendations in a conversational format. Played through a mobile-first in-app audio player with authenticated blob URL streaming, seekable progress, collapsible transcripts, and full briefing history.