How zhenchenglin/qfii works
Qfii is a paper-investing research and deliberation system: users request stock research, an Assessment agent turns cited evidence into a proposal, and a three-member committee debates whether and how to act. It also supports commissioned Risk review, recurring discovery, a bottom-up market-week replay, an MCP data/calculation service, A2A research access, and a live debate UI. The graph follows documented workflows and indexed module references; several relationships in unsampled modules are omitted where their call direction is not established.
Main entry points: runner.py Debate orchestration · agent.py Research agent · portfolio.py Portfolio snapshot · server.py MCP tool server
Components 22
Research workflow
- Stock research
qfii/agents/research/graph.py - Research agent
qfii/agents/research/agent.py - Assessment
qfii/agents/teams/agents.py - Risk validation
qfii/agents/teams/agents.py
Committee & portfolio
- Debate orchestration
qfii/committee/runner.py - Committee debate
qfii/committee/engine.py - Committee members
qfii/committee/members.py - Portfolio snapshot
qfii/portfolio.py - Paper ledger
qfii/investor.py
Tools & records
- MCP tool client
qfii/tools/client.py - MCP tool server
qfii/tools/server.py - Price data
qfii/tools/market.py - SEC filings
qfii/tools/sec.py - SQLite records
qfii/db.py - Research papers
qfii/papers.py - Evidence & events
qfii/store.py
User & agent interfaces
- Debate UI
qfii/web/app.py - A2A research service
qfii/agents/research/a2a.py
Discovery & replay
- Stock discovery
qfii/discovery.py - Week dataset
qfii/week/dataset.py - Week replay
qfii/week/runner.py
Other components
- Investor / operator
Connections 32
- Investor / operator → Research agent: requests research
- Research agent → Stock research: runs workflow
qfii/agents/research/agent.py - Stock research → MCP tool client: requests evidence
qfii/agents/research/graph.py - Research agent → Assessment: supplies packet
qfii/committee/runner.py - Assessment → Debate orchestration: submits proposal
qfii/committee/runner.py - Debate orchestration → Committee debate: starts debate
qfii/committee/runner.py - Committee debate → Committee members: requests ballots
qfii/committee/engine.py - Debate orchestration → Risk validation: commissions review
qfii/committee/runner.py - Debate orchestration → Research agent: requests follow-up
qfii/committee/runner.py - Debate orchestration → Portfolio snapshot: builds snapshot
qfii/committee/runner.py - Debate orchestration → Research papers: saves paper
qfii/committee/runner.py - Debate orchestration → Evidence & events: records debate
qfii/committee/runner.py - Portfolio snapshot → Paper ledger: reads profile
qfii/portfolio.py - Portfolio snapshot → SQLite records: reads holdings
qfii/portfolio.py - Portfolio snapshot → Price data: prices positions
qfii/portfolio.py - MCP tool client → MCP tool server: calls tools
qfii/tools/client.py - MCP tool server → Price data: loads price bars
qfii/tools/server.py - MCP tool server → SEC filings: queries filings
qfii/tools/server.py - Research papers → SQLite records: persists papers
qfii/papers.py - Evidence & events → SQLite records: persists events
qfii/store.py - Investor / operator → Debate UI: starts debate
- Debate UI → Debate orchestration: runs debate
qfii/web/app.py - Investor / operator → A2A research service: asks remotely
- A2A research service → Research agent: dispatches request
qfii/agents/research/a2a.py - Investor / operator → Stock discovery: requests discovery
- Stock discovery → Research agent: runs research
qfii/discovery.py - Investor / operator → Week dataset: builds dataset
- Week dataset → Price data: prepares price data
qfii/week/dataset.py - Week dataset → SEC filings: prepares filings
qfii/week/dataset.py - Investor / operator → Week replay: runs replay
- Week replay → Research agent: runs research
qfii/week/runner.py - Week replay → Debate orchestration: starts debates
qfii/week/runner.py