Evidence-first supply-chain investment research.
CapexGraph turns an investment theme or market anchor into an auditable research run: a grounded supply-chain graph, candidate verdicts, invalidation conditions, and forward tracking.
证据优先的供应链投资研究系统:从主题或热门个股出发,构建可审计的产业链图谱,寻找值得继续验证的瓶颈环节和相邻标的,并持续记录判断是否兑现。
Most financial agent projects start with a ticker and end with a buy/sell opinion. CapexGraph starts one level earlier:
- Where is capital expenditure flowing?
- Which supply-chain relationships are actually evidenced?
- Which nodes are hard to substitute?
- What has the market already priced in?
- What would prove the thesis wrong?
The project is independent from serenity-bottleneck-hunter. That skill remains a self-contained,
low-friction project; CapexGraph is a separate professional research system.
CapexGraph 0.2.0 is an alpha research workspace with:
- seven-stage Theme and Anchor Scan agent workflows;
- typed, schema-validated outputs and code-enforced integrity checks;
- curated no-key semiconductor-wafer and 兆易创新 golden cases;
- an optional OpenAI Responses API provider;
- resumable foreground or background execution with SQLite checkpoints;
- SSRF-safe HTML/PDF evidence capture, hashing, and explicit review;
- deterministic ticker identity, no-key market snapshots, and financial imports;
- a React/Vite Cockpit with run history, polling, dynamic graphs, and evidence review;
- candidate/benchmark tracking, alpha scorecards, triggers, and stage boards;
- self-contained HTML research reports;
- tests, multi-version CI, Windows bootstrap, and container setup.
It produces research priorities for human review. It does not produce autonomous investment recommendations or execute trades.
.\scripts\bootstrap.ps1
.\.venv\Scripts\python.exe -m capexgraph.cli info
.\.venv\Scripts\python.exe -m capexgraph.cli demo
.\.venv\Scripts\python.exe -m capexgraph.cli demo-anchor
.\.venv\Scripts\python.exe -m capexgraph.cli serveAPI documentation is available at http://127.0.0.1:8000/docs.
The two demo commands need no API key. They execute frozen, public-source evidence packs and are reproducible product demos, not current investment reports.
.\.venv\Scripts\python.exe -m pip install -e ".[dev,openai]"
$env:OPENAI_API_KEY = "..."
$env:CAPEXGRAPH_MODEL = "your-structured-output-capable-model"
.\.venv\Scripts\python.exe -m capexgraph.cli theme "AI数据中心电力" --provider openai --executeModel-proposed sources remain low confidence until the source is captured, hash-verified, and
explicitly reviewed. The model cannot promote an unreviewed claim by wording it confidently.
.\scripts\dev.ps1Open http://127.0.0.1:5173. The Cockpit creates Theme or Anchor runs, executes them in the
background, polls progress, resumes failures, renders the real graph, reviews captured evidence,
and manages forward tracking.
Every run is stored under runs/<run-id>/:
manifest.json input, versions, providers, timestamps
state.json resumable workflow state
graph.json nodes, grounded edges, confidence
evidence.json source ledger
financials.json source-linked comparison for Anchor Scan
candidates.json verdicts, risks, invalidation, triggers
decision.json final structured decision
report.html self-contained portable research report
checkpoints/ one durable artifact per completed/failed step
SQLite at runs/capexgraph.db is the local system of record. JSON artifacts remain human-readable
and portable. Set CAPEXGRAPH_STATE_DB to move the database.
# Research
capexgraph theme "A股半导体硅片" --provider fixture --execute
capexgraph anchor "603986" --provider fixture --execute
capexgraph run <run-id> --provider openai --until graph
capexgraph resume <run-id>
# Live evidence and market data
capexgraph ticker resolve 兆易创新
capexgraph evidence collect <run-id> <url> --id filing-1 --title "Filing"
capexgraph evidence review <run-id> filing-1
capexgraph market snapshot <run-id> 603986
# Forward tracking and reports
capexgraph tracking add <run-id> <node-id>
capexgraph tracking snapshot <tracked-id> --live
capexgraph tracking list
capexgraph report render <run-id>CapexGraph records candidate and benchmark prices on a common market date, then reports since-call return, benchmark return, and arithmetic alpha. It does not backfill an imaginary call price from later data.
POST /api/v1/runs/theme
POST /api/v1/runs/anchor
GET /api/v1/runs
GET /api/v1/runs/{id}
POST /api/v1/runs/{id}/execute
POST /api/v1/runs/{id}/resume
GET /api/v1/runs/{id}/checkpoints
GET /api/v1/runs/{id}/artifacts/{filename}
POST /api/v1/runs/{id}/tracking
GET /api/v1/tracking
POST /api/v1/tracking/{id}/snapshots
GET /api/v1/runs/{id}/report
Theme Scan stages are intake → census → graph → audit → score → debate → decision. Anchor Scan
stages are intake → cause → graph → audit → compare → debate → decision. Every stage is resumable
and writes a durable checkpoint.
docker compose up --buildThis starts the API on http://127.0.0.1:8000 and persists the SQLite workspace in a named volume.
- Agents judge; code verifies. Prices, tickers, dates, calculations, and schema checks stay deterministic.
- No relationship without provenance. Medium/high-confidence graph edges require evidence IDs.
- Runs are inspectable assets. Intermediate outputs are preserved, not hidden behind a final report.
- Research, not execution. Live brokerage integration is intentionally outside the MVP.
- Progressive setup. Golden cases need no key; live model and premium data providers remain optional.
New contributors and coding agents should start with AGENTS.md, current status, and the roadmap.
See project context, accepted decisions, Theme Scan, Anchor Scan, live research tools, forward tracking, MVP plan, and architecture.
CapexGraph is for research and education only. It is not financial, investment, legal, or tax advice.