# ai4finance-foundation/finrobot architecture

> Architecture diagram of the GitHub repository ai4finance-foundation/finrobot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ai4finance-foundation/finrobot
- Repository: https://github.com/ai4finance-foundation/finrobot

## Overview

FinRobot is a financial decision-intelligence platform with three generations: the production V2 desktop research system, a V1 web report generator, and an educational V0 AutoGen framework. The main V2 workflow takes a ticker or research request through data retrieval, agent-led analysis and deterministic valuation, then presents traceable research artifacts and reports. Coverage management, chat, audit/provenance, and backtesting are related capabilities. The graph emphasizes V2; older-generation connections are limited to README descriptions because their full runtime wiring was not sampled.

Main entry points: [`finrobot_desktop/finrobot/engine/orchestrator.py`](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/orchestrator.py) (Lead agent), [`finrobot_desktop/finrobot/coverage/service.py`](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/coverage/service.py) (Coverage desk), [`finrobot_desktop/desktop/src/pages/ResearchPage.tsx`](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/pages/ResearchPage.tsx) (Desktop cockpit), [`finrobot_desktop/finrobot/engine/data/layer.py`](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/data/layer.py) (Market data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop research"]
  node_desktop_ui["Desktop cockpit<br/>[ResearchPage.tsx]"]
  node_api_client["API client<br/>[client.ts]"]
  node_report_view["Report viewer"]
  node_chat_stream["AI chat<br/>[useChatStream.ts]"]
end

subgraph group_research["Research engine"]
  node_backend["FastAPI backend<br/>[server.py]"]
  node_lead_agent["Lead agent<br/>[orchestrator.py]"]
  node_pipelines["Research pipelines"]
  node_skills["Methodology skills"]
  node_coverage_api["Coverage routes<br/>[coverage.py]"]
  node_coverage_service["Coverage desk<br/>[service.py]"]
end

subgraph group_data["Data and compute"]
  node_data_layer["Market data<br/>[layer.py]"]
  node_providers["Data providers"]
  node_compute["Valuation compute"]
  node_backtest["Backtesting<br/>[engine.py]"]
end

subgraph group_state["Research state"]
  node_artifact_store[("Research artifacts<br/>[store.py]")]
  node_coverage_store[("Coverage store<br/>[sqlite_store.py]")]
end

subgraph group_legacy["Earlier generations"]
  node_v1_web["V1 report app<br/>[main.py]"]
  node_v1_agents["V1 research agents<br/>[agent_manager.py]"]
  node_v1_valuation["V1 valuation"]
  node_v0_agents["V0 AutoGen agents<br/>[workflow.py]"]
  node_v0_rag["V0 financial RAG<br/>[ragquery.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"starts research"| node_desktop_ui
node_desktop_ui -.->|"requests data"| node_api_client
node_api_client -.->|"calls API"| node_backend
node_backend -.->|"orchestrates"| node_lead_agent
node_lead_agent -->|"dispatches pipeline"| node_pipelines
node_pipelines -.->|"uses methodology"| node_skills
node_lead_agent -.->|"retrieves data"| node_data_layer
node_data_layer -.->|"fetches from"| node_providers
node_lead_agent -->|"invokes calculations"| node_compute
node_lead_agent -.->|"stores outputs"| node_artifact_store
node_artifact_store -.->|"supplies reports"| node_report_view
node_desktop_ui -.->|"opens chat"| node_chat_stream
node_coverage_api -->|"builds overview"| node_coverage_service
node_coverage_service -->|"reads coverage"| node_coverage_store
node_coverage_service -->|"reads market data"| node_data_layer
node_coverage_service -->|"reads research"| node_artifact_store
node_lead_agent -->|"runs backtests"| node_backtest
node_analyst -->|"requests report"| node_v1_web
node_v1_web -.->|"coordinates agents"| node_v1_agents
node_v1_agents -.->|"uses valuation"| node_v1_valuation
node_analyst -->|"studies workflows"| node_v0_agents
node_v0_agents -.->|"queries financial sources"| node_v0_rag

click node_desktop_ui "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/pages/ResearchPage.tsx"
click node_api_client "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/api/client.ts"
click node_backend "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/server.py"
click node_lead_agent "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/orchestrator.py"
click node_pipelines "https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/pipelines"
click node_skills "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/skills/pipeline_methodology.py"
click node_data_layer "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/data/layer.py"
click node_providers "https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/data/providers"
click node_compute "https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/compute/operators"
click node_backtest "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/backtest/engine.py"
click node_coverage_api "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/routes/coverage.py"
click node_coverage_service "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/coverage/service.py"
click node_artifact_store "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/artifact/store.py"
click node_coverage_store "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/coverage/sqlite_store.py"
click node_report_view "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/pages/ArtifactDetailPage.tsx"
click node_chat_stream "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/layout/RightChatPanel/chat/useChatStream.ts"
click node_v1_web "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/web_app/main.py"
click node_v1_agents "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/core/src/modules/equity_agents/agent_manager.py"
click node_v1_valuation "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/core/src/modules/valuation_engine.py"
click node_v0_agents "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_autogen/finrobot/agents/workflow.py"
click node_v0_rag "https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_autogen/finrobot/functional/ragquery.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop_ui,node_api_client,node_report_view,node_chat_stream toneBlue
class node_backend,node_lead_agent,node_pipelines,node_skills,node_coverage_api,node_coverage_service toneAmber
class node_data_layer,node_providers,node_compute,node_backtest toneMint
class node_artifact_store,node_coverage_store toneRose
class node_v1_web,node_v1_agents,node_v1_valuation,node_v0_agents,node_v0_rag,node_analyst toneIndigo
```

## Components

### Desktop research

- [Desktop cockpit](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/pages/ResearchPage.tsx): `finrobot_desktop/desktop/src/pages/ResearchPage.tsx`
- [API client](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/api/client.ts): `finrobot_desktop/desktop/src/api/client.ts`
- [Report viewer](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/pages/ArtifactDetailPage.tsx): `finrobot_desktop/desktop/src/pages/ArtifactDetailPage.tsx`
- [AI chat](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/desktop/src/layout/RightChatPanel/chat/useChatStream.ts): `finrobot_desktop/desktop/src/layout/RightChatPanel/chat/useChatStream.ts`

### Research engine

- [FastAPI backend](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/server.py): `finrobot_desktop/finrobot/server.py`
- [Lead agent](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/orchestrator.py): `finrobot_desktop/finrobot/engine/orchestrator.py`
- [Research pipelines](https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/pipelines): `finrobot_desktop/finrobot/engine/pipelines`
- [Methodology skills](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/skills/pipeline_methodology.py): `finrobot_desktop/finrobot/engine/skills/pipeline_methodology.py`
- [Coverage routes](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/routes/coverage.py): `finrobot_desktop/finrobot/routes/coverage.py`
- [Coverage desk](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/coverage/service.py): `finrobot_desktop/finrobot/coverage/service.py`

### Data and compute

- [Market data](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/data/layer.py): `finrobot_desktop/finrobot/engine/data/layer.py`
- [Data providers](https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/data/providers): `finrobot_desktop/finrobot/engine/data/providers`
- [Valuation compute](https://github.com/ai4finance-foundation/finrobot/tree/master/finrobot_desktop/finrobot/engine/compute/operators): `finrobot_desktop/finrobot/engine/compute/operators`
- [Backtesting](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/engine/backtest/engine.py): `finrobot_desktop/finrobot/engine/backtest/engine.py`

### Research state

- [Research artifacts](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/artifact/store.py): `finrobot_desktop/finrobot/artifact/store.py`
- [Coverage store](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_desktop/finrobot/coverage/sqlite_store.py): `finrobot_desktop/finrobot/coverage/sqlite_store.py`

### Earlier generations

- [V1 report app](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/web_app/main.py): `finrobot_equity/web_app/main.py`
- [V1 research agents](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/core/src/modules/equity_agents/agent_manager.py): `finrobot_equity/core/src/modules/equity_agents/agent_manager.py`
- [V1 valuation](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_equity/core/src/modules/valuation_engine.py): `finrobot_equity/core/src/modules/valuation_engine.py`
- [V0 AutoGen agents](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_autogen/finrobot/agents/workflow.py): `finrobot_autogen/finrobot/agents/workflow.py`
- [V0 financial RAG](https://github.com/ai4finance-foundation/finrobot/blob/master/finrobot_autogen/finrobot/functional/ragquery.py): `finrobot_autogen/finrobot/functional/ragquery.py`

### Other components

- **Analyst**

## Connections

- Analyst → Desktop cockpit: starts research (evidence: `README.md`)
- Desktop cockpit → API client: requests data
- API client → FastAPI backend: calls API
- FastAPI backend → Lead agent: orchestrates (evidence: `finrobot_desktop/finrobot/server.py`)
- Lead agent → Research pipelines: dispatches pipeline (evidence: `README.md`)
- Research pipelines → Methodology skills: uses methodology
- Lead agent → Market data: retrieves data
- Market data → Data providers: fetches from (evidence: `finrobot_desktop/finrobot/engine/data/layer.py`)
- Lead agent → Valuation compute: invokes calculations (evidence: `README.md`)
- Lead agent → Research artifacts: stores outputs
- Research artifacts → Report viewer: supplies reports
- Desktop cockpit → AI chat: opens chat
- Coverage routes → Coverage desk: builds overview (evidence: `finrobot_desktop/finrobot/routes/coverage.py`)
- Coverage desk → Coverage store: reads coverage (evidence: `finrobot_desktop/finrobot/coverage/service.py`)
- Coverage desk → Market data: reads market data (evidence: `finrobot_desktop/finrobot/coverage/service.py`)
- Coverage desk → Research artifacts: reads research (evidence: `finrobot_desktop/finrobot/coverage/service.py`)
- Lead agent → Backtesting: runs backtests (evidence: `finrobot_desktop/finrobot/engine/orchestrator.py`)
- Analyst → V1 report app: requests report (evidence: `README.md`)
- V1 report app → V1 research agents: coordinates agents
- V1 research agents → V1 valuation: uses valuation
- Analyst → V0 AutoGen agents: studies workflows (evidence: `README.md`)
- V0 AutoGen agents → V0 financial RAG: queries financial sources
