# banerjeearjun/investment-research-agent architecture

> Architecture diagram of the GitHub repository banerjeearjun/investment-research-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/banerjeearjun/investment-research-agent
- Repository: https://github.com/banerjeearjun/investment-research-agent

## Overview

IRA is an investment-research assistant for Indian-listed companies. Users submit a company for sequential research, technical analysis, and fundamental thesis generation; the orchestrator records the result and updates an in-memory watchlist, which users can later query. The web UI also advertises demo/live modes and execution tracing. The graph follows the documented workflow and sampled calls; unsampled UI and agent internals limit certainty about some wiring.

Main entry points: [`src/agents/orchestrator.py`](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/orchestrator.py) (Orchestrator), [`app.py`](https://github.com/banerjeearjun/investment-research-agent/blob/main/app.py) (Streamlit UI), [`src/runner.py`](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/runner.py) (CLI), [`src/agents/research_agent.py`](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/research_agent.py) (Company research)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web_ui["Streamlit UI<br/>[app.py]"]
  node_cli["CLI<br/>[runner.py]"]
end

subgraph group_workflow["Research workflow"]
  node_orchestrator["Orchestrator<br/>[orchestrator.py]"]
  node_research["Company research<br/>[research_agent.py]"]
  node_technical["Technical analysis<br/>[technical_agent.py]"]
  node_fundamental["Fundamental thesis<br/>[analysis_agent.py]"]
end

subgraph group_analysis["Analysis tools"]
  node_price_fetcher["Price fetcher<br/>[price_fetcher.py]"]
  node_technical_tools["Technical indicators<br/>[technical_tools.py]"]
  node_financial_tools["Financial metrics<br/>[financial_tools.py]"]
end

subgraph group_state_trace["Memory and tracing"]
  node_memory[("Theses and watchlist<br/>[orchestrator.py]")]
  node_observability["Execution tracing<br/>[observability.py]"]
end

node_user(("Investor"))
node_google_search["Google Search"]
node_screener["Screener.in"]

node_user -->|"submits query"| node_web_ui
node_user -->|"enters command"| node_cli
node_web_ui -->|"requests analysis"| node_orchestrator
node_cli -->|"dispatches command"| node_orchestrator
node_orchestrator -->|"requests research"| node_research
node_research -->|"searches web"| node_google_search
node_orchestrator -->|"fetches price"| node_price_fetcher
node_price_fetcher -.->|"requests price"| node_screener
node_orchestrator -->|"requests analysis"| node_technical
node_technical -->|"calculates indicators"| node_technical_tools
node_orchestrator -->|"requests thesis"| node_fundamental
node_fundamental -->|"calculates metrics"| node_financial_tools
node_orchestrator -->|"stores and recalls"| node_memory
node_orchestrator -->|"records events"| node_observability
node_web_ui -->|"reads trace"| node_observability

click node_web_ui "https://github.com/banerjeearjun/investment-research-agent/blob/main/app.py"
click node_cli "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/runner.py"
click node_orchestrator "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/orchestrator.py"
click node_research "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/research_agent.py"
click node_technical "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/technical_agent.py"
click node_fundamental "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/analysis_agent.py"
click node_price_fetcher "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/price_fetcher.py"
click node_technical_tools "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/technical_tools.py"
click node_financial_tools "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/financial_tools.py"
click node_memory "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/orchestrator.py"
click node_observability "https://github.com/banerjeearjun/investment-research-agent/blob/main/src/observability.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_web_ui,node_cli,node_screener toneBlue
class node_orchestrator,node_research,node_technical,node_fundamental toneAmber
class node_price_fetcher,node_technical_tools,node_financial_tools toneMint
class node_memory,node_observability toneRose
class node_user,node_google_search toneIndigo
```

## Components

### User interfaces

- [Streamlit UI](https://github.com/banerjeearjun/investment-research-agent/blob/main/app.py): `app.py`
- [CLI](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/runner.py): `src/runner.py`

### Research workflow

- [Orchestrator](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/orchestrator.py): `src/agents/orchestrator.py`
- [Company research](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/research_agent.py): `src/agents/research_agent.py`
- [Technical analysis](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/technical_agent.py): `src/agents/technical_agent.py`
- [Fundamental thesis](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/analysis_agent.py): `src/agents/analysis_agent.py`

### Analysis tools

- [Price fetcher](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/price_fetcher.py): `src/tools/price_fetcher.py`
- [Technical indicators](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/technical_tools.py): `src/tools/technical_tools.py`
- [Financial metrics](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/tools/financial_tools.py): `src/tools/financial_tools.py`

### Memory and tracing

- [Theses and watchlist](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/agents/orchestrator.py): `src/agents/orchestrator.py`
- [Execution tracing](https://github.com/banerjeearjun/investment-research-agent/blob/main/src/observability.py): `src/observability.py`

### Other components

- **Investor**
- **Google Search**
- **Screener.in**

## Connections

- Investor → Streamlit UI: submits query
- Investor → CLI: enters command
- Streamlit UI → Orchestrator: requests analysis
- CLI → Orchestrator: dispatches command
- Orchestrator → Company research: requests research
- Company research → Google Search: searches web
- Orchestrator → Price fetcher: fetches price
- Price fetcher → Screener.in: requests price
- Orchestrator → Technical analysis: requests analysis
- Technical analysis → Technical indicators: calculates indicators
- Orchestrator → Fundamental thesis: requests thesis
- Fundamental thesis → Financial metrics: calculates metrics
- Orchestrator → Theses and watchlist: stores and recalls
- Orchestrator → Execution tracing: records events
- Streamlit UI → Execution tracing: reads trace
