# mgalen007/atlas architecture

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

- Interactive diagram: https://gitdiagram.com/mgalen007/atlas
- Repository: https://github.com/mgalen007/atlas

## Overview

Atlas is a FastAPI service that accepts a research topic and returns a structured summary. Its pipeline gathers findings, validates them, then summarizes the validated findings; the service orchestrates each stage. The README also documents a health-check endpoint. Source excerpts support the API routing, orchestration and agent/model configuration shown here; the Gemini provider’s internal behavior is not sampled.

Main entry points: [`server/features/agents/service.py`](https://github.com/mgalen007/atlas/blob/main/server/features/agents/service.py) (Pipeline service), [`server/features/agents/research_agent.py`](https://github.com/mgalen007/atlas/blob/main/server/features/agents/research_agent.py) (Research agent), [`server/features/agents/critic_agent.py`](https://github.com/mgalen007/atlas/blob/main/server/features/agents/critic_agent.py) (Critic agent), [`server/features/agents/summarizer_agent.py`](https://github.com/mgalen007/atlas/blob/main/server/features/agents/summarizer_agent.py) (Summarizer agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_app["FastAPI app<br/>[main.py]"]
  node_research_api["Research endpoint<br/>[router.py]"]
end

subgraph group_pipeline["Research pipeline"]
  node_pipeline_service["Pipeline service<br/>[service.py]"]
  node_research_agent["Research agent<br/>[research_agent.py]"]
  node_critic_agent["Critic agent<br/>[critic_agent.py]"]
  node_summarizer_agent["Summarizer agent"]
end

subgraph group_models["Agents and model"]
  node_model_config["Gemini model config<br/>[models.py]"]
end

node_caller(("API caller"))
node_gemini["Google Gemini"]

node_caller -->|"HTTP requests"| node_app
node_app -->|"mounts router"| node_research_api
node_research_api -->|"runs pipeline"| node_pipeline_service
node_pipeline_service -->|"invokes research"| node_research_agent
node_pipeline_service -->|"invokes validation"| node_critic_agent
node_pipeline_service -->|"invokes summary"| node_summarizer_agent
node_research_agent -->|"uses model"| node_model_config
node_critic_agent -->|"uses model"| node_model_config
node_summarizer_agent -->|"uses model"| node_model_config
node_research_agent -.->|"generates findings"| node_gemini
node_critic_agent -.->|"validates findings"| node_gemini
node_summarizer_agent -.->|"generates summary"| node_gemini

click node_app "https://github.com/mgalen007/atlas/blob/main/server/main.py"
click node_research_api "https://github.com/mgalen007/atlas/blob/main/server/features/research/router.py"
click node_pipeline_service "https://github.com/mgalen007/atlas/blob/main/server/features/agents/service.py"
click node_research_agent "https://github.com/mgalen007/atlas/blob/main/server/features/agents/research_agent.py"
click node_critic_agent "https://github.com/mgalen007/atlas/blob/main/server/features/agents/critic_agent.py"
click node_summarizer_agent "https://github.com/mgalen007/atlas/blob/main/server/features/agents/summarizer_agent.py"
click node_model_config "https://github.com/mgalen007/atlas/blob/main/server/features/agents/config/models.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_app,node_research_api toneBlue
class node_pipeline_service,node_research_agent,node_critic_agent,node_summarizer_agent toneAmber
class node_model_config,node_caller toneMint
class node_gemini toneIndigo
```

## Components

### API

- [FastAPI app](https://github.com/mgalen007/atlas/blob/main/server/main.py): `server/main.py`
- [Research endpoint](https://github.com/mgalen007/atlas/blob/main/server/features/research/router.py): `server/features/research/router.py`

### Research pipeline

- [Pipeline service](https://github.com/mgalen007/atlas/blob/main/server/features/agents/service.py): `server/features/agents/service.py`
- [Research agent](https://github.com/mgalen007/atlas/blob/main/server/features/agents/research_agent.py): `server/features/agents/research_agent.py`
- [Critic agent](https://github.com/mgalen007/atlas/blob/main/server/features/agents/critic_agent.py): `server/features/agents/critic_agent.py`
- [Summarizer agent](https://github.com/mgalen007/atlas/blob/main/server/features/agents/summarizer_agent.py): `server/features/agents/summarizer_agent.py`

### Agents and model

- [Gemini model config](https://github.com/mgalen007/atlas/blob/main/server/features/agents/config/models.py): `server/features/agents/config/models.py`

### Other components

- **API caller**
- **Google Gemini**

## Connections

- API caller → FastAPI app: HTTP requests
- FastAPI app → Research endpoint: mounts router
- Research endpoint → Pipeline service: runs pipeline
- Pipeline service → Research agent: invokes research
- Pipeline service → Critic agent: invokes validation
- Pipeline service → Summarizer agent: invokes summary
- Research agent → Gemini model config: uses model
- Critic agent → Gemini model config: uses model
- Summarizer agent → Gemini model config: uses model
- Research agent → Google Gemini: generates findings
- Critic agent → Google Gemini: validates findings
- Summarizer agent → Google Gemini: generates summary
