# authentic-research-partners/research-mentor architecture

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

- Interactive diagram: https://gitdiagram.com/authentic-research-partners/research-mentor
- Repository: https://github.com/authentic-research-partners/research-mentor

## Overview

Personal Research Mentor is a local, browser-accessible AI research mentor. A student starts a conversation or selects a Question Workshop approach; the server routes mentoring through an adaptive agent or workshop requests through question-generation pipelines, then presents guidance and research questions. The product also supports guided research sharing, project memory and progress assessment, artifact and data analysis, and academic-resource discovery. SQLite provides local persistence, while selectable LLM backends and external research services supply inference and search. The graph follows README capability descriptions and shown import references; unsampled subsystem wiring is not asserted.

Main entry points: [`src/research_mentor/server.py`](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/server.py) (Local API and UI), [`src/research_mentor/llm.py`](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/llm.py) (LLM backends), [`src/research_mentor/agent/graph.py`](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/agent/graph.py) (Adaptive mentoring), [`src/research_mentor/question_workshop/orchestrator.py`](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/orchestrator.py) (Question Workshop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Mentoring experience"]
  node_office["Adaptive mentoring<br/>[graph.py]"]
  node_memory["Project memory<br/>[embeddings.py]"]
  node_assessment["Progress assessment<br/>[assessment.py]"]
  node_sharing["Guided sharing<br/>[graph.py]"]
  node_artifact["Artifact processing<br/>[artifacts.py]"]
  node_analysis["Data analysis<br/>[data_analysis.py]"]
end

subgraph group_workshops["Question development"]
  node_workshop["Question Workshop<br/>[orchestrator.py]"]
  node_hypothesis["Hypothesis chat<br/>[graph.py]"]
  node_pipeline["Question pipelines"]
  node_question_select["Question selection"]
end

subgraph group_resources["Research resources"]
  node_academic["Academic search<br/>[academic_search.py]"]
  node_discovery["Researcher discovery"]
  node_retractions["Retraction search"]
  node_web["Web search<br/>[web_search.py]"]
end

subgraph group_runtime["Local runtime"]
  node_server["Local API and UI<br/>[server.py]"]
  node_llm["LLM backends<br/>[llm.py]"]
  node_database[("SQLite persistence<br/>[connection.py]")]
  node_config["Runtime configuration<br/>[config.py]"]
  node_claude["Claude CLI<br/>[chat_claude_cli.py]"]
  node_vllm["Local vLLM<br/>[vllm_manager.py]"]
end

node_student(("Student"))
node_remote["OpenAI-compatible API"]
node_academic_services["Academic databases"]
node_external_search["Web search providers"]

node_student -->|"uses locally"| node_server
node_server -->|"routes sessions"| node_office
node_server -->|"routes workshop"| node_workshop
node_workshop -->|"offers approaches"| node_pipeline
node_workshop -->|"offers chat"| node_hypothesis
node_pipeline -->|"filters questions"| node_question_select
node_server -->|"offers sharing"| node_sharing
node_server -->|"tracks progress"| node_assessment
node_office -->|"uses semantic memory"| node_memory
node_server -->|"offers uploads"| node_artifact
node_artifact -->|"analyzes data"| node_analysis
node_office -.->|"requests inference"| node_llm
node_workshop -.->|"requests inference"| node_llm
node_llm -->|"supports backend"| node_claude
node_llm -->|"supports backend"| node_vllm
node_llm -->|"supports backend"| node_remote
node_server -->|"reads settings"| node_config
node_server -->|"checks schema"| node_database
node_office -.->|"persists sessions"| node_database
node_academic -->|"searches literature"| node_academic_services
node_discovery -->|"finds researchers"| node_academic_services
node_retractions -.->|"checks retractions"| node_academic_services
node_web -->|"searches web"| node_external_search

click node_server "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/server.py"
click node_office "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/agent/graph.py"
click node_memory "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/embeddings.py"
click node_assessment "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/assessment.py"
click node_sharing "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/sharing/graph.py"
click node_workshop "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/orchestrator.py"
click node_hypothesis "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/hypothesis/graph.py"
click node_pipeline "https://github.com/authentic-research-partners/research-mentor/tree/main/src/research_mentor/question_workshop"
click node_question_select "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/question_selector.py"
click node_artifact "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/api/artifacts.py"
click node_analysis "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/data_analysis.py"
click node_academic "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/academic_search.py"
click node_discovery "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/researcher_search.py"
click node_retractions "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/retraction_watch.py"
click node_web "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/web_search.py"
click node_llm "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/llm.py"
click node_database "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/db/connection.py"
click node_config "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/config.py"
click node_claude "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/chat_claude_cli.py"
click node_vllm "https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/vllm_manager.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_office,node_memory,node_assessment,node_sharing,node_artifact,node_analysis toneBlue
class node_workshop,node_hypothesis,node_pipeline,node_question_select,node_academic_services toneAmber
class node_academic,node_discovery,node_retractions,node_web,node_remote toneMint
class node_server,node_llm,node_database,node_config,node_claude,node_vllm toneRose
class node_student,node_external_search toneIndigo
```

## Components

### Mentoring experience

- [Adaptive mentoring](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/agent/graph.py): `src/research_mentor/agent/graph.py`
- [Project memory](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/embeddings.py): `src/research_mentor/embeddings.py`
- [Progress assessment](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/assessment.py): `src/research_mentor/assessment.py`
- [Guided sharing](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/sharing/graph.py): `src/research_mentor/sharing/graph.py`
- [Artifact processing](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/api/artifacts.py): `src/research_mentor/api/artifacts.py`
- [Data analysis](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/data_analysis.py): `src/research_mentor/data_analysis.py`

### Question development

- [Question Workshop](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/orchestrator.py): `src/research_mentor/question_workshop/orchestrator.py`
- [Hypothesis chat](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/hypothesis/graph.py): `src/research_mentor/question_workshop/hypothesis/graph.py`
- [Question pipelines](https://github.com/authentic-research-partners/research-mentor/tree/main/src/research_mentor/question_workshop): `src/research_mentor/question_workshop`
- [Question selection](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/question_workshop/question_selector.py): `src/research_mentor/question_workshop/question_selector.py`

### Research resources

- [Academic search](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/academic_search.py): `src/research_mentor/tools/academic_search.py`
- [Researcher discovery](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/researcher_search.py): `src/research_mentor/tools/researcher_search.py`
- [Retraction search](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/retraction_watch.py): `src/research_mentor/tools/retraction_watch.py`
- [Web search](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/tools/web_search.py): `src/research_mentor/tools/web_search.py`

### Local runtime

- [Local API and UI](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/server.py): `src/research_mentor/server.py`
- [LLM backends](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/llm.py): `src/research_mentor/llm.py`
- [SQLite persistence](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/db/connection.py): `src/research_mentor/db/connection.py`
- [Runtime configuration](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/config.py): `src/research_mentor/config.py`
- [Claude CLI](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/chat_claude_cli.py): `src/research_mentor/chat_claude_cli.py`
- [Local vLLM](https://github.com/authentic-research-partners/research-mentor/blob/main/src/research_mentor/vllm_manager.py): `src/research_mentor/vllm_manager.py`

### Other components

- **Student**
- **OpenAI-compatible API**
- **Academic databases**
- **Web search providers**

## Connections

- Student → Local API and UI: uses locally
- Local API and UI → Adaptive mentoring: routes sessions (evidence: `src/research_mentor/server.py`)
- Local API and UI → Question Workshop: routes workshop (evidence: `src/research_mentor/server.py`)
- Question Workshop → Question pipelines: offers approaches
- Question Workshop → Hypothesis chat: offers chat
- Question pipelines → Question selection: filters questions (evidence: `src/research_mentor/question_workshop/question_selector.py`)
- Local API and UI → Guided sharing: offers sharing
- Local API and UI → Progress assessment: tracks progress (evidence: `src/research_mentor/server.py`)
- Adaptive mentoring → Project memory: uses semantic memory
- Local API and UI → Artifact processing: offers uploads (evidence: `src/research_mentor/server.py`)
- Artifact processing → Data analysis: analyzes data
- Adaptive mentoring → LLM backends: requests inference
- Question Workshop → LLM backends: requests inference
- LLM backends → Claude CLI: supports backend (evidence: `src/research_mentor/llm.py`)
- LLM backends → Local vLLM: supports backend
- LLM backends → OpenAI-compatible API: supports backend
- Local API and UI → Runtime configuration: reads settings (evidence: `src/research_mentor/server.py`)
- Local API and UI → SQLite persistence: checks schema (evidence: `src/research_mentor/server.py`)
- Adaptive mentoring → SQLite persistence: persists sessions
- Academic search → Academic databases: searches literature
- Researcher discovery → Academic databases: finds researchers
- Retraction search → Academic databases: checks retractions
- Web search → Web search providers: searches web
