Agent-powered deep research tool that produces institutional-quality investment research reports on publicly traded companies.
DeepScrap uses a multi-agent architecture with a Synthesis-driven feedback loop to produce comprehensive LaTeX-to-PDF reports — covering forensic due diligence, rigorous valuation, and forward-looking catalyst analysis — all from a single CLI command.
SMCI Report (PDF) — Super Micro Computer deep-dive generated with
--depth medium(3 research rounds)
The report covers 13 sections including executive summary, financial deep dive, valuation analysis, forensic red flag analysis, bull/bear cases, and a confidence assessment with per-section breakdowns.
- Multi-agent research — 6 parallel research agents gather data from SEC filings, financial APIs, web search, and insider trading databases
- Synthesis-driven feedback loop — Opus evaluates coverage gaps and directs follow-up research across multiple rounds
- Adversarial review — GPT independently challenges the analysis for blind spots before finalizing
- 12-section reports — Executive summary, financials, valuation (comps/DCF/SOTP), forensic analysis, bull/bear cases, risk matrix, catalyst timeline, and confidence scoring
- LaTeX PDF output — Professional typeset reports with charts, hyperlinked references, and a numbered bibliography
- Configurable depth — From quick screening (
shallow, 1 round) to full forensic deep-dives (deep, up to 10 rounds) - Resume support — Interrupted runs can be resumed from saved research state
- Budget controls — Set a max spend to cap API costs
Requires Python 3.11+ and a LaTeX distribution (pdflatex on PATH).
pip install -e ".[dev]"Set API keys via environment variables or a .env file in the project root:
ANTHROPIC_API_KEY=sk-ant-... # Required — powers research + synthesis agents
OPENAI_API_KEY=sk-... # Required — powers adversarial reviewer
SERPER_API_KEY=... # Optional — enables web/news search (via serper.dev)deepscrap analyze <TICKER> [OPTIONS]# Quick screening
deepscrap analyze AAPL --depth shallow
# Standard analysis (default)
deepscrap analyze AAPL --depth medium
# Full forensic deep-dive with verbose logging
deepscrap analyze AAPL --depth deep --verbose
# Set a spend limit
deepscrap analyze TSLA --depth deep --budget 5.00
# Resume an interrupted run
deepscrap analyze AAPL --depth medium --resume
# Custom output location
deepscrap analyze NVDA --output ./reports/NVDA/report.pdf| Flag | Default | Description |
|---|---|---|
--depth |
medium |
Research depth: shallow, medium, or deep |
--output |
None |
Output PDF path (default: output/<TICKER>/report/) |
--budget |
None |
Max estimated spend in USD (no limit by default) |
--max-iterations |
None |
Override max research rounds (default: 1/3/10 by depth) |
--resume |
False |
Resume a previously interrupted run from saved store |
--verbose |
False |
Show agent activity and debug logging |
--focus |
None |
Comma-separated focus areas |
| Depth | Max Rounds | Claude Effort | Use Case |
|---|---|---|---|
shallow |
1 | medium | Quick overview, screening |
medium |
3 | high | Standard research report |
deep |
10 | max | Full forensic deep-dive |
CLI (typer)
└─ Orchestrator
├─ Research Agents x6 (Sonnet) ── parallel data gathering
│ └─ Source Registry
│ ├─ Yahoo Finance (financials, price, estimates, company info)
│ ├─ SEC EDGAR (10-K, 10-Q, DEF 14A, insider filings)
│ ├─ Serper.dev (web search, news search)
│ └─ OpenInsider (insider trading activity)
├─ Synthesis Agent (Opus) ── evaluates coverage, directs research, writes analysis
└─ Adversarial Reviewer (GPT) ── challenges findings for blind spots
-
Dispatch — 6 research agents run in parallel with targeted directives: company overview, financials, valuation, executive/insider analysis, forward-looking catalysts, and industry/sentiment.
-
Iterate — The Synthesis agent (Opus) evaluates collected data against a coverage map, identifies gaps, and issues targeted follow-up directives to specific agents. This loop continues until coverage is sufficient or the depth limit is reached.
-
Synthesize — Opus produces a 12-section qualitative-first analysis from all collected research data.
-
Challenge — GPT adversarially reviews the analysis, probing for blind spots and weak arguments. Synthesis revises or rebuts, with up to 2 escalation rounds for unresolved issues.
-
Report — Jinja2 LaTeX templates and matplotlib charts are compiled to a typeset PDF via
pdflatex, with auto-generated bibliography and hyperlinked source references.
- Executive Summary
- Business Analysis
- Financial Deep Dive (accounting quality, red flags)
- Valuation Analysis (comps, DCF, sum-of-parts, pricing verdict)
- Leadership Assessment
- Forensic & Red Flag Analysis (related-party deals, suspicious M&A, SEC inquiries)
- Bull Case
- Bear Case
- Risk Matrix
- Forward-Looking Analysis (earnings preview, catalyst timeline)
- Conclusion
- Confidence Assessment (per-section breakdown, evidence gaps, source quality)
| Role | Model | Purpose |
|---|---|---|
| Research Agents | Claude Sonnet | Data gathering and source queries |
| Synthesis Agent | Claude Opus | Coverage evaluation and final analysis |
| Adversarial Reviewer | GPT (OpenAI) | Independent challenge of findings |
| Orchestrator | Claude Sonnet | Pipeline coordination |
output/<TICKER>/
├── report/
│ ├── <TICKER>_report.pdf # Final typeset report
│ └── <TICKER>_report.tex # LaTeX source
├── references/ # Downloaded SEC filings
└── <TICKER>_store.json # Research data (resumable)
# Run all tests
pytest tests/ -v
# Run a single test
pytest tests/path/test_file.py::TestClass::test_name -vProprietary.