# nssachinnagpal/ai-engineering-from-scratch architecture

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

- Interactive diagram: https://gitdiagram.com/nssachinnagpal/ai-engineering-from-scratch
- Repository: https://github.com/nssachinnagpal/ai-engineering-from-scratch

## Overview

This repository is an open-source AI engineering curriculum delivered through a website and local code: learners follow lessons, run implementations, and take on project challenges. Its major content branches include the phased curriculum, Claude and MCP certifications, protocol manuals, and standalone projects. The sampled Research Report Agent shows one project’s internal plan–search–write–verify–publish flow. README evidence supports the learning and project branches; source excerpts support the report-agent calls. Other API and site wiring is not established by the available excerpts.

Main entry points: [`projects/research-report-agent/solution/report_agent/pipeline.py`](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/pipeline.py) (Report Pipeline), [`projects/research-report-agent/solution/report_agent/writer.py`](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/writer.py) (Cited Writer), [`projects/research-report-agent/solution/report_agent/critic.py`](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/critic.py) (Claim Verifier), [`projects/research-report-agent/solution/report_agent/search.py`](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/search.py) (BM25 Search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Learning Website"]
  node_website["Learning Site<br/>[app.js]"]
  node_api["Site API"]
end

subgraph group_curriculum["Technical Curriculum"]
  node_phases["Phased Lessons"]
  node_lesson_code["Lesson Code"]
end

subgraph group_credentials["Certifications"]
  node_claude_cert["Claude Certification"]
  node_mcpa_cert["MCP Certification"]
end

subgraph group_references["Protocol Manuals"]
  node_a2a_manual["A2A Manual"]
  node_sandbox_manual["Sandbox Manual"]
end

subgraph group_projects["Project Challenges"]
  node_project_set["Project Challenges"]
  node_report_pipeline["Report Pipeline<br/>[pipeline.py]"]
  node_corpus["Corpus Loader<br/>[corpus.py]"]
  node_planner["Research Planner<br/>[planner.py]"]
  node_search["BM25 Search<br/>[search.py]"]
  node_writer["Cited Writer<br/>[writer.py]"]
  node_snippets["Snippet Extractor<br/>[snippets.py]"]
  node_critic["Claim Verifier<br/>[critic.py]"]
  node_citations["Citation Parsing<br/>[citations.py]"]
  node_publisher["Report Publisher<br/>[publish.py]"]
  node_report_result["Report and Trace<br/>[publish.py]"]
end

node_learner(("Learner"))

node_learner -->|"learns on"| node_website
node_learner -->|"follows lessons"| node_phases
node_phases -->|"implements concepts"| node_lesson_code
node_learner -->|"builds projects"| node_project_set
node_learner -->|"studies certification"| node_claude_cert
node_learner -->|"studies certification"| node_mcpa_cert
node_learner -->|"studies protocols"| node_a2a_manual
node_learner -->|"studies topics"| node_sandbox_manual
node_report_pipeline -->|"loads corpus"| node_corpus
node_report_pipeline -->|"plans research"| node_planner
node_report_pipeline -->|"builds index"| node_search
node_report_pipeline -->|"gathers and writes"| node_writer
node_writer -->|"searches index"| node_search
node_writer -->|"extracts snippets"| node_snippets
node_report_pipeline -->|"reviews draft"| node_critic
node_critic -->|"parses citations"| node_citations
node_critic -->|"tokenizes claims"| node_search
node_report_pipeline -->|"renders and writes"| node_publisher
node_publisher -->|"serializes outputs"| node_report_result

click node_website "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/site/app.js"
click node_api "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/api"
click node_phases "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/phases"
click node_lesson_code "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/phases"
click node_claude_cert "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/certifications/claude/lessons"
click node_mcpa_cert "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/certifications/mcpa/lessons"
click node_a2a_manual "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/manuals/a2a-101"
click node_sandbox_manual "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/manuals/docker-sandboxes-101"
click node_project_set "https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/projects"
click node_report_pipeline "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/pipeline.py"
click node_corpus "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/corpus.py"
click node_planner "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/planner.py"
click node_search "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/search.py"
click node_writer "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/writer.py"
click node_snippets "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/snippets.py"
click node_critic "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/critic.py"
click node_citations "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/citations.py"
click node_publisher "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/publish.py"
click node_report_result "https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/publish.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_website,node_api toneBlue
class node_phases,node_lesson_code toneAmber
class node_claude_cert,node_mcpa_cert toneMint
class node_a2a_manual,node_sandbox_manual toneRose
class node_project_set,node_report_pipeline,node_corpus,node_planner,node_search,node_writer,node_snippets,node_critic,node_citations,node_publisher,node_report_result,node_learner toneIndigo
```

## Components

### Learning Website

- [Learning Site](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/site/app.js): `site/app.js`
- [Site API](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/api): `api`

### Technical Curriculum

- [Phased Lessons](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/phases): `phases`
- [Lesson Code](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/phases): `phases`

### Certifications

- [Claude Certification](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/certifications/claude/lessons): `certifications/claude/lessons`
- [MCP Certification](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/certifications/mcpa/lessons): `certifications/mcpa/lessons`

### Protocol Manuals

- [A2A Manual](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/manuals/a2a-101): `manuals/a2a-101`
- [Sandbox Manual](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/manuals/docker-sandboxes-101): `manuals/docker-sandboxes-101`

### Project Challenges

- [Project Challenges](https://github.com/nssachinnagpal/ai-engineering-from-scratch/tree/main/projects): `projects`
- [Report Pipeline](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/pipeline.py): `projects/research-report-agent/solution/report_agent/pipeline.py`
- [Corpus Loader](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/corpus.py): `projects/research-report-agent/solution/report_agent/corpus.py`
- [Research Planner](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/planner.py): `projects/research-report-agent/solution/report_agent/planner.py`
- [BM25 Search](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/search.py): `projects/research-report-agent/solution/report_agent/search.py`
- [Cited Writer](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/writer.py): `projects/research-report-agent/solution/report_agent/writer.py`
- [Snippet Extractor](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/snippets.py): `projects/research-report-agent/solution/report_agent/snippets.py`
- [Claim Verifier](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/critic.py): `projects/research-report-agent/solution/report_agent/critic.py`
- [Citation Parsing](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/citations.py): `projects/research-report-agent/solution/report_agent/citations.py`
- [Report Publisher](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/publish.py): `projects/research-report-agent/solution/report_agent/publish.py`
- [Report and Trace](https://github.com/nssachinnagpal/ai-engineering-from-scratch/blob/main/projects/research-report-agent/solution/report_agent/publish.py): `projects/research-report-agent/solution/report_agent/publish.py`

### Other components

- **Learner**

## Connections

- Learner → Learning Site: learns on (evidence: `README.md`)
- Learner → Phased Lessons: follows lessons (evidence: `README.md`)
- Phased Lessons → Lesson Code: implements concepts (evidence: `README.md`)
- Learner → Project Challenges: builds projects (evidence: `README.md`)
- Learner → Claude Certification: studies certification (evidence: `README.md`)
- Learner → MCP Certification: studies certification (evidence: `README.md`)
- Learner → A2A Manual: studies protocols (evidence: `README.md`)
- Learner → Sandbox Manual: studies topics (evidence: `README.md`)
- Report Pipeline → Corpus Loader: loads corpus (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Report Pipeline → Research Planner: plans research (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Report Pipeline → BM25 Search: builds index (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Report Pipeline → Cited Writer: gathers and writes (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Cited Writer → BM25 Search: searches index (evidence: `projects/research-report-agent/solution/report_agent/writer.py`)
- Cited Writer → Snippet Extractor: extracts snippets (evidence: `projects/research-report-agent/solution/report_agent/writer.py`)
- Report Pipeline → Claim Verifier: reviews draft (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Claim Verifier → Citation Parsing: parses citations (evidence: `projects/research-report-agent/solution/report_agent/critic.py`)
- Claim Verifier → BM25 Search: tokenizes claims (evidence: `projects/research-report-agent/solution/report_agent/critic.py`)
- Report Pipeline → Report Publisher: renders and writes (evidence: `projects/research-report-agent/solution/report_agent/pipeline.py`)
- Report Publisher → Report and Trace: serializes outputs (evidence: `projects/research-report-agent/solution/report_agent/publish.py`)
