EDGAR·AGENT
Architecture

How Edgar Agent works

A LangGraph state machine orchestrates five specialized agents. Each filing flows through extract → analyze → propose → critique → save, with a rerun loop if the critic rejects the proposal.

Pipeline

  1. 01Extractorextract_node

    Downloads SEC filings via EDGAR MCP, cleans HTML, chunks into 1k-token windows, embeds with Gemini, stores in pgvector.

  2. 02Analystanalyze_node

    Runs four retrieval-augmented lenses (risk, growth, history, financials) and synthesizes an overall signal + confidence.

  3. 03Proposerpropose_node

    Drafts a 1–2 paragraph investment note grounded in the retrieved chunks.

  4. 04Criticcritique_node

    Scores the proposal 0-1. Below threshold triggers a re-run with feedback; above threshold is saved.

  5. 05Persistsave_node

    Run metadata, lens signals, and the final proposal are persisted to Postgres for the dashboard and backtest.

Stack

Agents
  • LangGraph
  • LangChain
  • Gemini
  • Groq
Data
  • PostgreSQL 16
  • pgvector
  • SQLAlchemy async
  • asyncpg
API
  • FastAPI
  • Uvicorn
  • Pydantic
Frontend
  • Next.js
  • React
  • Tailwind CSS
Observability
  • LangSmith
  • MLflow
  • Sentry
  • Datadog
Infra
  • DigitalOcean
  • Doppler
  • nginx
  • GitHub Actions

Links

  • GitHub repopublic soon
  • LangSmith tracespublic link TBD
  • MLflow dashboardmlflow.edgar.soniharshit.me
This is a portfolio project. Signals are not investment advice and are generated by a language model against public SEC filings.