# youssefamdouni/genai-agent-starter architecture

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

- Interactive diagram: https://gitdiagram.com/youssefamdouni/genai-agent-starter
- Repository: https://github.com/youssefamdouni/genai-agent-starter

## Overview

This is a hands-on collection of LangChain and LangGraph learning examples, not one integrated application. Its workflows demonstrate prompt/model/parser and memory use, chained and retrieval-based Q&A, tool-using conversations, and increasingly capable graph agents—including persistence, human approval, data analysis, product recommendations, and multi-agent document drafting. Each script is a separate runnable example. Edges reflect only relationships visible in the excerpts or README; some specialized behavior is represented at the script level because its implementation was not fully sampled.

Main entry points: [`02-Agents-LangGraph/L6_Multi_Agents.py`](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L6_Multi_Agents.py) (Research and drafting), [`01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py) (Document Q&A), [`02-Agents-LangGraph/L5_Recommnedation_Agent.py`](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L5_Recommnedation_Agent.py) (Product recommender), [`02-Agents-LangGraph/L1_building_simple_agent.py`](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L1_building_simple_agent.py) (Simple graph agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_langchain["LangChain examples"]
  node_models_prompts["Models and memory"]
  node_chains["Prompt chains<br/>[L2-Chains.py]"]
  node_basic_agents["Tool agents<br/>[L4-Agents.py]"]
end

subgraph group_retrieval["Retrieval and conversation"]
  node_document_qa["Document Q&amp;A"]
  node_clothing_csv["Clothing catalog"]
  node_conversation_agent["Conversational agent"]
end

subgraph group_graph_agents["LangGraph agents"]
  node_simple_agent["Simple graph agent"]
  node_memory_agent["Persistent-memory agent<br/>[L2_sync_memory.py]"]
  node_human_review["Human-reviewed agent"]
end

subgraph group_specialized["Specialized workflows"]
  node_analyst_agent["Data analyst agent"]
  node_recommendation_agent["Product recommender"]
  node_product_data["Product dataset"]
  node_multi_agent_writer["Research and drafting<br/>[L6_Multi_Agents.py]"]
  node_design_output["Design document<br/>[design_document.md]"]
end

node_user(("Learner"))
node_llm_service{{"LLM service"}}
node_web_search{{"Web search"}}
node_vector_store[("Vector index")]
node_sqlite_memory[("SQLite checkpoint")]
node_pinecone[("Pinecone index")]

node_user -->|"runs examples"| node_models_prompts
node_user -->|"runs examples"| node_chains
node_user -->|"asks questions"| node_document_qa
node_clothing_csv -->|"loads rows"| node_document_qa
node_document_qa -->|"indexes documents"| node_vector_store
node_document_qa -->|"queries model"| node_llm_service
node_user -->|"chats with"| node_conversation_agent
node_clothing_csv -->|"builds catalog index"| node_conversation_agent
node_conversation_agent -->|"calls model"| node_llm_service
node_user -->|"submits query"| node_basic_agents
node_basic_agents -->|"invokes agent"| node_llm_service
node_user -->|"submits query"| node_simple_agent
node_simple_agent -->|"invokes tool"| node_web_search
node_simple_agent -->|"invokes model"| node_llm_service
node_user -->|"submits query"| node_memory_agent
node_memory_agent -->|"checkpoints state"| node_sqlite_memory
node_memory_agent -->|"invokes tool"| node_web_search
node_user -->|"submits query"| node_human_review
node_human_review -->|"invokes model"| node_llm_service
node_user -->|"asks analysis"| node_analyst_agent
node_analyst_agent -->|"invokes model"| node_llm_service
node_user -->|"requests products"| node_recommendation_agent
node_recommendation_agent -->|"searches products"| node_pinecone
node_product_data -.->|"loads product data"| node_recommendation_agent
node_recommendation_agent -.->|"uses model"| node_llm_service
node_user -->|"requests document"| node_multi_agent_writer
node_multi_agent_writer -->|"searches research"| node_web_search
node_multi_agent_writer -->|"generates and critiques"| node_llm_service
node_multi_agent_writer -->|"saves draft"| node_design_output

click node_models_prompts "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L1-Model_prompt_parser_memory.py"
click node_chains "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L2-Chains.py"
click node_basic_agents "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L4-Agents.py"
click node_document_qa "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py"
click node_clothing_csv "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/ClothingCatalog.csv"
click node_conversation_agent "https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py"
click node_simple_agent "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L1_building_simple_agent.py"
click node_memory_agent "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L2_sync_memory.py"
click node_human_review "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L3_human_in_the_loop.py"
click node_analyst_agent "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L4_Data_Analyst_Agent.py"
click node_recommendation_agent "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L5_Recommnedation_Agent.py"
click node_product_data "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/amazon-products.pkl"
click node_multi_agent_writer "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L6_Multi_Agents.py"
click node_design_output "https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/AIGenerated/design_document.md"

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_models_prompts,node_chains,node_basic_agents toneBlue
class node_document_qa,node_clothing_csv,node_conversation_agent,node_vector_store,node_sqlite_memory,node_pinecone toneAmber
class node_simple_agent,node_memory_agent,node_human_review toneMint
class node_analyst_agent,node_recommendation_agent,node_product_data,node_multi_agent_writer,node_design_output toneRose
class node_user,node_llm_service,node_web_search toneIndigo
```

## Components

### LangChain examples

- [Models and memory](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L1-Model_prompt_parser_memory.py): `01-LangChain-for-LLM-Application-Development-main/L1-Model_prompt_parser_memory.py`
- [Prompt chains](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L2-Chains.py): `01-LangChain-for-LLM-Application-Development-main/L2-Chains.py`
- [Tool agents](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L4-Agents.py): `01-LangChain-for-LLM-Application-Development-main/L4-Agents.py`

### Retrieval and conversation

- [Document Q&A](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py): `01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`
- [Clothing catalog](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/ClothingCatalog.csv): `01-LangChain-for-LLM-Application-Development-main/ClothingCatalog.csv`
- [Conversational agent](https://github.com/youssefamdouni/genai-agent-starter/blob/main/01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py): `01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py`

### LangGraph agents

- [Simple graph agent](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L1_building_simple_agent.py): `02-Agents-LangGraph/L1_building_simple_agent.py`
- [Persistent-memory agent](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L2_sync_memory.py): `02-Agents-LangGraph/L2_sync_memory.py`
- [Human-reviewed agent](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L3_human_in_the_loop.py): `02-Agents-LangGraph/L3_human_in_the_loop.py`

### Specialized workflows

- [Data analyst agent](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L4_Data_Analyst_Agent.py): `02-Agents-LangGraph/L4_Data_Analyst_Agent.py`
- [Product recommender](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L5_Recommnedation_Agent.py): `02-Agents-LangGraph/L5_Recommnedation_Agent.py`
- [Product dataset](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/amazon-products.pkl): `02-Agents-LangGraph/amazon-products.pkl`
- [Research and drafting](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/L6_Multi_Agents.py): `02-Agents-LangGraph/L6_Multi_Agents.py`
- [Design document](https://github.com/youssefamdouni/genai-agent-starter/blob/main/02-Agents-LangGraph/AIGenerated/design_document.md): `02-Agents-LangGraph/AIGenerated/design_document.md`

### Other components

- **Learner**
- **LLM service**
- **Web search**
- **Vector index**
- **SQLite checkpoint**
- **Pinecone index**

## Connections

- Learner → Models and memory: runs examples (evidence: `README.md`)
- Learner → Prompt chains: runs examples (evidence: `README.md`)
- Learner → Document Q&A: asks questions (evidence: `01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`)
- Clothing catalog → Document Q&A: loads rows (evidence: `01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`)
- Document Q&A → Vector index: indexes documents (evidence: `01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`)
- Document Q&A → LLM service: queries model (evidence: `01-LangChain-for-LLM-Application-Development-main/L3-QnA-over-docs.py`)
- Learner → Conversational agent: chats with (evidence: `01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py`)
- Clothing catalog → Conversational agent: builds catalog index (evidence: `01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py`)
- Conversational agent → LLM service: calls model (evidence: `01-LangChain-for-LLM-Application-Development-main/L5_Conversational_Agent.py`)
- Learner → Tool agents: submits query (evidence: `01-LangChain-for-LLM-Application-Development-main/L4-Agents.py`)
- Tool agents → LLM service: invokes agent (evidence: `01-LangChain-for-LLM-Application-Development-main/L4-Agents.py`)
- Learner → Simple graph agent: submits query (evidence: `02-Agents-LangGraph/L1_building_simple_agent.py`)
- Simple graph agent → Web search: invokes tool (evidence: `02-Agents-LangGraph/L1_building_simple_agent.py`)
- Simple graph agent → LLM service: invokes model (evidence: `02-Agents-LangGraph/L1_building_simple_agent.py`)
- Learner → Persistent-memory agent: submits query (evidence: `02-Agents-LangGraph/L2_sync_memory.py`)
- Persistent-memory agent → SQLite checkpoint: checkpoints state (evidence: `02-Agents-LangGraph/L2_sync_memory.py`)
- Persistent-memory agent → Web search: invokes tool (evidence: `02-Agents-LangGraph/L2_sync_memory.py`)
- Learner → Human-reviewed agent: submits query (evidence: `02-Agents-LangGraph/L3_human_in_the_loop.py`)
- Human-reviewed agent → LLM service: invokes model (evidence: `02-Agents-LangGraph/L3_human_in_the_loop.py`)
- Learner → Data analyst agent: asks analysis (evidence: `02-Agents-LangGraph/L4_Data_Analyst_Agent.py`)
- Data analyst agent → LLM service: invokes model (evidence: `02-Agents-LangGraph/L4_Data_Analyst_Agent.py`)
- Learner → Product recommender: requests products (evidence: `02-Agents-LangGraph/L5_Recommnedation_Agent.py`)
- Product recommender → Pinecone index: searches products (evidence: `02-Agents-LangGraph/L5_Recommnedation_Agent.py`)
- Product dataset → Product recommender: loads product data
- Product recommender → LLM service: uses model
- Learner → Research and drafting: requests document (evidence: `02-Agents-LangGraph/L6_Multi_Agents.py`)
- Research and drafting → Web search: searches research (evidence: `02-Agents-LangGraph/L6_Multi_Agents.py`)
- Research and drafting → LLM service: generates and critiques (evidence: `02-Agents-LangGraph/L6_Multi_Agents.py`)
- Research and drafting → Design document: saves draft (evidence: `02-Agents-LangGraph/L6_Multi_Agents.py`)
