# jogirohithkumar/research-intelligence-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/jogirohithkumar/research-intelligence-assistant
- Repository: https://github.com/jogirohithkumar/research-intelligence-assistant

## Overview

This is a full-stack research workspace: a researcher submits a query, the API authenticates and queues it, a stateful research graph gathers and validates evidence, analyzes papers, and produces a grounded, citation-checked report; job progress and results return to the workspace. The graph preserves the documented domain stages and supporting intelligence capabilities. Several subsystem links are based on README architecture statements or indexed imports; unsampled implementations and optional provider wiring are not inferred beyond that evidence.

Main entry points: [`app/graph/research_graph.py`](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/graph/research_graph.py) (Research graph), [`frontend/src/App.jsx`](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/frontend/src/App.jsx) (React workspace), [`app/jobs/manager.py`](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/jobs/manager.py) (Job manager), [`app/api/routes.py`](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/api/routes.py) (Research API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Research workspace"]
  node_web_workspace["React workspace<br/>[App.jsx]"]
end

subgraph group_access["API and access"]
  node_auth_routes["Authentication routes<br/>[routes.py]"]
  node_api_routes["Research API<br/>[routes.py]"]
  node_job_manager["Job manager<br/>[manager.py]"]
  node_sse["SSE job stream<br/>[stream.py]"]
end

subgraph group_workflow["Research orchestration"]
  node_research_graph["Research graph<br/>[research_graph.py]"]
  node_controlled_loop["Bounded research loop<br/>[loop_controller.py]"]
end

subgraph group_evidence["Retrieval and evidence"]
  node_search_agent["Search agent<br/>[search_agent.py]"]
  node_search_engine["Search engine<br/>[engine.py]"]
  node_scholarly_sources["Scholarly providers"]
  node_evidence_retrieval["Evidence retrieval"]
  node_vector_store[("Vector store<br/>[vector_store.py]")]
  node_claim_verification["Claim verification"]
end

subgraph group_insight["Intelligence and reporting"]
  node_research_intelligence["Research intelligence<br/>[engine.py]"]
  node_grounded_synthesis["Grounded synthesis"]
  node_citation_validation["Citation validation<br/>[citation_agent.py]"]
  node_report_agent["Report generation<br/>[report_agent.py]"]
end

subgraph group_state["Persistence and runtime"]
  node_postgres[("PostgreSQL state<br/>[models.py]")]
  node_checkpoints[("Graph checkpoints<br/>[checkpoint.py]")]
  node_llm["LLM service<br/>[llm_service.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"uses"| node_web_workspace
node_web_workspace -->|"authenticates"| node_auth_routes
node_web_workspace -->|"submits query"| node_api_routes
node_api_routes -->|"queues job"| node_job_manager
node_job_manager -->|"executes"| node_research_graph
node_research_graph -->|"dispatches"| node_search_agent
node_search_agent -->|"uses"| node_search_engine
node_search_engine -->|"retrieves papers"| node_scholarly_sources
node_research_graph -->|"processes evidence"| node_evidence_retrieval
node_evidence_retrieval -->|"retrieves chunks"| node_vector_store
node_research_graph -->|"validates claims"| node_claim_verification
node_research_graph -->|"analyzes papers"| node_research_intelligence
node_research_graph -->|"bounds research"| node_controlled_loop
node_controlled_loop -.->|"requests more"| node_search_agent
node_research_graph -->|"synthesizes findings"| node_grounded_synthesis
node_research_graph -->|"validates citations"| node_citation_validation
node_research_graph -->|"generates report"| node_report_agent
node_job_manager -->|"persists results"| node_postgres
node_research_graph -->|"checkpoints state"| node_checkpoints
node_research_graph -->|"reports progress"| node_sse
node_sse -->|"streams updates"| node_web_workspace
node_web_workspace -->|"loads session"| node_api_routes
node_research_graph -.->|"uses model service"| node_llm

click node_web_workspace "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/frontend/src/App.jsx"
click node_auth_routes "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/auth/routes.py"
click node_api_routes "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/api/routes.py"
click node_job_manager "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/jobs/manager.py"
click node_research_graph "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/graph/research_graph.py"
click node_search_agent "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/search_agent.py"
click node_search_engine "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/search/engine.py"
click node_scholarly_sources "https://github.com/jogirohithkumar/research-intelligence-assistant/tree/main/app/search"
click node_evidence_retrieval "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/evidence_retriever.py"
click node_vector_store "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/vector_store.py"
click node_claim_verification "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/claim_support_verifier.py"
click node_research_intelligence "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/intelligence/engine.py"
click node_controlled_loop "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/loop/loop_controller.py"
click node_grounded_synthesis "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/grounded_synthesis_agent.py"
click node_citation_validation "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/citation_agent.py"
click node_report_agent "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/report_agent.py"
click node_postgres "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/db/models.py"
click node_checkpoints "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/db/checkpoint.py"
click node_sse "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/api/stream.py"
click node_llm "https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/services/llm_service.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_workspace toneBlue
class node_auth_routes,node_api_routes,node_job_manager,node_sse toneAmber
class node_research_graph,node_controlled_loop toneMint
class node_search_agent,node_search_engine,node_scholarly_sources,node_evidence_retrieval,node_vector_store,node_claim_verification toneRose
class node_research_intelligence,node_grounded_synthesis,node_citation_validation,node_report_agent,node_researcher toneIndigo
class node_postgres,node_checkpoints,node_llm toneTeal
```

## Components

### Research workspace

- [React workspace](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### API and access

- [Authentication routes](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/auth/routes.py): `app/auth/routes.py`
- [Research API](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/api/routes.py): `app/api/routes.py`
- [Job manager](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/jobs/manager.py): `app/jobs/manager.py`
- [SSE job stream](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/api/stream.py): `app/api/stream.py`

### Research orchestration

- [Research graph](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/graph/research_graph.py): `app/graph/research_graph.py`
- [Bounded research loop](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/loop/loop_controller.py): `app/loop/loop_controller.py`

### Retrieval and evidence

- [Search agent](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/search_agent.py): `app/agents/search_agent.py`
- [Search engine](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/search/engine.py): `app/search/engine.py`
- [Scholarly providers](https://github.com/jogirohithkumar/research-intelligence-assistant/tree/main/app/search): `app/search`
- [Evidence retrieval](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/evidence_retriever.py): `app/rag/evidence_retriever.py`
- [Vector store](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/vector_store.py): `app/rag/vector_store.py`
- [Claim verification](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/rag/claim_support_verifier.py): `app/rag/claim_support_verifier.py`

### Intelligence and reporting

- [Research intelligence](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/intelligence/engine.py): `app/intelligence/engine.py`
- [Grounded synthesis](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/grounded_synthesis_agent.py): `app/agents/grounded_synthesis_agent.py`
- [Citation validation](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/citation_agent.py): `app/agents/citation_agent.py`
- [Report generation](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/agents/report_agent.py): `app/agents/report_agent.py`

### Persistence and runtime

- [PostgreSQL state](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/db/models.py): `app/db/models.py`
- [Graph checkpoints](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/db/checkpoint.py): `app/db/checkpoint.py`
- [LLM service](https://github.com/jogirohithkumar/research-intelligence-assistant/blob/main/app/services/llm_service.py): `app/services/llm_service.py`

### Other components

- **Researcher**

## Connections

- Researcher → React workspace: uses
- React workspace → Authentication routes: authenticates
- React workspace → Research API: submits query (evidence: `frontend/src/App.jsx`)
- Research API → Job manager: queues job (evidence: `app/api/routes.py`)
- Job manager → Research graph: executes (evidence: `app/jobs/manager.py`)
- Research graph → Search agent: dispatches (evidence: `app/graph/research_graph.py`)
- Search agent → Search engine: uses (evidence: `app/agents/search_agent.py`)
- Search engine → Scholarly providers: retrieves papers (evidence: `app/search/engine.py`)
- Research graph → Evidence retrieval: processes evidence (evidence: `app/graph/research_graph.py`)
- Evidence retrieval → Vector store: retrieves chunks (evidence: `app/rag/evidence_retriever.py`)
- Research graph → Claim verification: validates claims
- Research graph → Research intelligence: analyzes papers
- Research graph → Bounded research loop: bounds research
- Bounded research loop → Search agent: requests more
- Research graph → Grounded synthesis: synthesizes findings (evidence: `app/graph/research_graph.py`)
- Research graph → Citation validation: validates citations (evidence: `app/graph/research_graph.py`)
- Research graph → Report generation: generates report (evidence: `app/graph/research_graph.py`)
- Job manager → PostgreSQL state: persists results (evidence: `app/jobs/manager.py`)
- Research graph → Graph checkpoints: checkpoints state (evidence: `app/graph/research_graph.py`)
- Research graph → SSE job stream: reports progress
- SSE job stream → React workspace: streams updates
- React workspace → Research API: loads session (evidence: `frontend/src/App.jsx`)
- Research graph → LLM service: uses model service
