analyst·agent
Portfolio Project

How it works

Analyst Agent is an AI-powered SEC filing analysis platform. Enter any public company ticker and ask natural language questions — the agent fetches SEC filings, runs LLM analysis, and streams results back in real time.

The Story

This project was born from the challenge of parsing SEC N-PX filings to understand institutional investor voting patterns.

What started as a data extraction problem evolved into a comprehensive AI-powered financial analysis platform.

The architecture evolved from a simple ReAct agent to an intelligent planning system that routes queries based on complexity — using dynamic tool selection for simple questions and structured multi-step execution for complex financial analysis. Independent analysis steps run in parallel to minimize response time.

Most recently, the platform expanded beyond chat-only interaction with a Company Dashboard that proactively surfaces SEC filing analysis, technicals, and company metadata the moment a user selects a ticker — no prompt required.

Graph Architecture

START
  └─▶ [ROUTER]
       ├─▶ "simple"  ──▶ [REACT AGENT] ──▶ END
       └─▶ "complex" ──▶ [PLANNER]
                               └─▶ [STEP EXECUTOR] ⟵──┐
                                         └─▶ (loop)  ──┘
                                         └─▶ [SYNTHESIZER] ──▶ END

The agent uses query complexity classification to determine the optimal execution path. Simple queries are handled by a ReAct agent with dynamic tool selection. Complex queries are decomposed into structured execution plans where independent steps run concurrently, and the synthesizer assembles the final response.

3-Tier Caching

1edgartools Company object· Per process lifetime
2LLM analysis (Pydantic models)· Per accession number (SQLite)
3Tavily web search results· Per query hash (in-memory)

Capabilities

SEC Filing Analysis
15 tools

Powered by edgartools. Raw and AI-analyzed 10-K/10-Q sections — risk factors, MD&A, balance sheets, full 10-K text, business overview, cybersecurity disclosure, legal proceedings, and a concurrent all-summaries tool. 8-K support with earnings release analysis (beats/misses, guidance) and material event analysis. Supports 20-F for foreign filers.

Market Data & Technicals
7 tools

Via Yahoo Finance. Price history, stock info (P/E, market cap, beta), financial metrics (revenue/income growth, debt ratios), core technicals (RSI, MACD, Bollinger Bands, 5/10/20/50/200-day MAs), advanced technicals (ADX, ATR, Stochastic, Volume Profile, Fibonacci), chart pattern detection, and multi-timeframe analysis with conflict detection.

Market Overview
2 tools

Current levels and daily changes for S&P 500, Nasdaq, Dow Jones, and VIX. Macro indicators including 10-Year and 5-Year Treasury yields, VIX, and US Dollar Index with 1-month changes.

Web Research
5 tools

Optional tools via Tavily. General web search, deep research (async polling), company news, competitor analysis, and industry trend forecasting. Requires a Tavily API key.

Briefing History
2 tools

Retrieve recent briefing analyses for a ticker (outlook trends, technical signals, news summaries) or the latest full morning briefing (market regime, positioning, alerts).

Company Dashboard

Instant Overview

Selecting a ticker loads a metrics grid, technical snapshot, chart patterns, and market regime badge instantly — no LLM call, no prompt. Backed by a 5-minute server-side cache.

LLM-Analyzed Filings

The Filings tab streams AI analysis of the latest 10-K (or 20-F), 10-Q, and 8-K earnings release via SSE. All analyses run concurrently and render incrementally as they complete. Cached in SQLite by accession number — auto-invalidates when a new filing appears on EDGAR.

Integrated Chart + Chat

The third tab embeds the full interactive chart (TradingView Lightweight Charts with RSI, MACD, Bollinger Bands) alongside the conversational agent — 31 tools available when Tavily is configured.

API Key Architecture

Keys are never stored on the server. They're saved in your browser's localStorage and injected per-request as HTTP headers or WebSocket auth messages. The backend falls back to server-side environment variables if no client key is provided — useful for local development.