# youssefhosni/hands-on-langchain architecture

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

- Interactive diagram: https://gitdiagram.com/youssefhosni/hands-on-langchain
- Repository: https://github.com/youssefhosni/hands-on-langchain

## Overview

This repository is a hands-on educational collection, not a single deployed application: the learner runs chapter notebooks to explore LangChain and related tools. The chapters cover model I/O, document-based QA, agents, memory, and tracing, among other topics. The README identifies the chapter capabilities and sample-data usage; the prompt file documents its use by the email and memory chapters. Notebook internals were not excerpted, so the graph shows documented entry points and relationships rather than inferred runtime pipelines.

Main entry points: [`notebooks/prompts.py`](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/prompts.py) (Shared Prompts), [`data`](https://github.com/youssefhosni/hands-on-langchain/tree/main/data) (Sample Data), [`notebooks/17-baseline-email-agent.ipynb`](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/17-baseline-email-agent.ipynb) (Email Agent), [`notebooks/18-semantic-memory.ipynb`](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/18-semantic-memory.ipynb) (Semantic Memory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundations["LLM Foundations"]
  node_model_io["Model I/O"]
  node_chains["Chains<br/>[03-chains.ipynb]"]
  node_basic_memory["Memory<br/>[04-memory.ipynb]"]
end

subgraph group_documents["Document QA"]
  node_documents_load["Document Loading"]
  node_splitting["Document Splitting"]
  node_retrieval["Vector Retrieval"]
  node_qa["Document QA"]
  node_sample_data["Sample Data"]
end

subgraph group_agents["Agents and Memory"]
  node_agents["Building Agents"]
  node_web_search["Agentic Web Search"]
  node_persistence["Persistence and Streaming"]
  node_human_loop["Human in Loop"]
  node_essay["Multi-Agent Essays"]
  node_email["Email Agent"]
  node_semantic["Semantic Memory"]
  node_episodic["Episodic Memory"]
  node_procedural["Procedural Memory"]
  node_prompts["Shared Prompts<br/>[prompts.py]"]
end

subgraph group_tools["Evaluation and Observability"]
  node_evaluation["Evaluation"]
  node_tracing["LangSmith Tracing"]
  node_playground["Playground and Prompts"]
end

node_learner(("Learner"))

node_learner -->|"runs"| node_model_io
node_learner -->|"runs"| node_chains
node_learner -->|"runs"| node_basic_memory
node_learner -->|"runs"| node_documents_load
node_learner -->|"runs"| node_splitting
node_learner -->|"runs"| node_retrieval
node_learner -->|"runs"| node_qa
node_learner -->|"runs"| node_agents
node_learner -->|"runs"| node_web_search
node_learner -->|"runs"| node_persistence
node_learner -->|"runs"| node_human_loop
node_learner -->|"runs"| node_essay
node_learner -->|"runs"| node_email
node_learner -->|"runs"| node_semantic
node_learner -->|"runs"| node_episodic
node_learner -->|"runs"| node_procedural
node_learner -->|"runs"| node_evaluation
node_learner -->|"runs"| node_tracing
node_learner -->|"runs"| node_playground
node_sample_data -->|"provides examples"| node_documents_load
node_sample_data -->|"provides examples"| node_qa
node_email -->|"imports prompts"| node_prompts
node_semantic -->|"imports prompts"| node_prompts
node_episodic -->|"imports prompts"| node_prompts
node_procedural -->|"imports prompts"| node_prompts

click node_model_io "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/02-model-io-prompts-and-parsing.ipynb"
click node_chains "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/03-chains.ipynb"
click node_basic_memory "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/04-memory.ipynb"
click node_documents_load "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/06-document-loading.ipynb"
click node_splitting "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/07-document-splitting.ipynb"
click node_retrieval "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/08-vector-stores-and-retrieval.ipynb"
click node_qa "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/09-question-answering-over-documents.ipynb"
click node_agents "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/11-building-agents.ipynb"
click node_web_search "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/12-agentic-web-search.ipynb"
click node_persistence "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/13-persistence-and-streaming.ipynb"
click node_human_loop "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/14-human-in-the-loop.ipynb"
click node_essay "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/15-multi-agent-essay-writer.ipynb"
click node_email "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/17-baseline-email-agent.ipynb"
click node_semantic "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/18-semantic-memory.ipynb"
click node_episodic "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/19-episodic-memory.ipynb"
click node_procedural "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/20-procedural-memory.ipynb"
click node_prompts "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/prompts.py"
click node_evaluation "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/05-evaluation.ipynb"
click node_tracing "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/22-tracing-with-langsmith.ipynb"
click node_playground "https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/23-playground-and-prompts-hub.ipynb"
click node_sample_data "https://github.com/youssefhosni/hands-on-langchain/tree/main/data"

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_model_io,node_chains,node_basic_memory toneBlue
class node_documents_load,node_splitting,node_retrieval,node_qa,node_sample_data toneAmber
class node_agents,node_web_search,node_persistence,node_human_loop,node_essay,node_email,node_semantic,node_episodic,node_procedural,node_prompts toneMint
class node_evaluation,node_tracing,node_playground toneRose
class node_learner toneIndigo
```

## Components

### LLM Foundations

- [Model I/O](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/02-model-io-prompts-and-parsing.ipynb): `notebooks/02-model-io-prompts-and-parsing.ipynb`
- [Chains](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/03-chains.ipynb): `notebooks/03-chains.ipynb`
- [Memory](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/04-memory.ipynb): `notebooks/04-memory.ipynb`

### Document QA

- [Document Loading](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/06-document-loading.ipynb): `notebooks/06-document-loading.ipynb`
- [Document Splitting](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/07-document-splitting.ipynb): `notebooks/07-document-splitting.ipynb`
- [Vector Retrieval](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/08-vector-stores-and-retrieval.ipynb): `notebooks/08-vector-stores-and-retrieval.ipynb`
- [Document QA](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/09-question-answering-over-documents.ipynb): `notebooks/09-question-answering-over-documents.ipynb`
- [Sample Data](https://github.com/youssefhosni/hands-on-langchain/tree/main/data): `data`

### Agents and Memory

- [Building Agents](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/11-building-agents.ipynb): `notebooks/11-building-agents.ipynb`
- [Agentic Web Search](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/12-agentic-web-search.ipynb): `notebooks/12-agentic-web-search.ipynb`
- [Persistence and Streaming](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/13-persistence-and-streaming.ipynb): `notebooks/13-persistence-and-streaming.ipynb`
- [Human in Loop](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/14-human-in-the-loop.ipynb): `notebooks/14-human-in-the-loop.ipynb`
- [Multi-Agent Essays](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/15-multi-agent-essay-writer.ipynb): `notebooks/15-multi-agent-essay-writer.ipynb`
- [Email Agent](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/17-baseline-email-agent.ipynb): `notebooks/17-baseline-email-agent.ipynb`
- [Semantic Memory](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/18-semantic-memory.ipynb): `notebooks/18-semantic-memory.ipynb`
- [Episodic Memory](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/19-episodic-memory.ipynb): `notebooks/19-episodic-memory.ipynb`
- [Procedural Memory](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/20-procedural-memory.ipynb): `notebooks/20-procedural-memory.ipynb`
- [Shared Prompts](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/prompts.py): `notebooks/prompts.py`

### Evaluation and Observability

- [Evaluation](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/05-evaluation.ipynb): `notebooks/05-evaluation.ipynb`
- [LangSmith Tracing](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/22-tracing-with-langsmith.ipynb): `notebooks/22-tracing-with-langsmith.ipynb`
- [Playground and Prompts](https://github.com/youssefhosni/hands-on-langchain/blob/main/notebooks/23-playground-and-prompts-hub.ipynb): `notebooks/23-playground-and-prompts-hub.ipynb`

### Other components

- **Learner**

## Connections

- Learner → Model I/O: runs (evidence: `README.md`)
- Learner → Chains: runs (evidence: `README.md`)
- Learner → Memory: runs (evidence: `README.md`)
- Learner → Document Loading: runs (evidence: `README.md`)
- Learner → Document Splitting: runs (evidence: `README.md`)
- Learner → Vector Retrieval: runs (evidence: `README.md`)
- Learner → Document QA: runs (evidence: `README.md`)
- Learner → Building Agents: runs (evidence: `README.md`)
- Learner → Agentic Web Search: runs (evidence: `README.md`)
- Learner → Persistence and Streaming: runs (evidence: `README.md`)
- Learner → Human in Loop: runs (evidence: `README.md`)
- Learner → Multi-Agent Essays: runs (evidence: `README.md`)
- Learner → Email Agent: runs (evidence: `README.md`)
- Learner → Semantic Memory: runs (evidence: `README.md`)
- Learner → Episodic Memory: runs (evidence: `README.md`)
- Learner → Procedural Memory: runs (evidence: `README.md`)
- Learner → Evaluation: runs (evidence: `README.md`)
- Learner → LangSmith Tracing: runs (evidence: `README.md`)
- Learner → Playground and Prompts: runs (evidence: `README.md`)
- Sample Data → Document Loading: provides examples (evidence: `README.md`)
- Sample Data → Document QA: provides examples (evidence: `README.md`)
- Email Agent → Shared Prompts: imports prompts (evidence: `notebooks/prompts.py`)
- Semantic Memory → Shared Prompts: imports prompts (evidence: `notebooks/prompts.py`)
- Episodic Memory → Shared Prompts: imports prompts (evidence: `notebooks/prompts.py`)
- Procedural Memory → Shared Prompts: imports prompts (evidence: `notebooks/prompts.py`)
