# tahaelkhaili/ia-agentic architecture

> Architecture diagram of the GitHub repository tahaelkhaili/ia-agentic, 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/tahaelkhaili/ia-agentic
- Repository: https://github.com/tahaelkhaili/ia-agentic

## Overview

This repository is a collection of Agentic AI course labs and projects, not one unified runtime. Its central end-user workflow is the Evaluation_Final chat: a user submits a question, a LangGraph agent consults its LLM, optionally dispatches retrieval tools, and returns an answer. The README also documents separate learning branches for prompt engineering, agents, RAG, MCP, LangGraph, state, and human approval. Internal edges below follow excerpts or README statements; unsampled modules are shown as capabilities without inferred call paths.

Main entry points: [`Evaluation_Final/src/graph/nodes.py`](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/nodes.py) (LLM and tool nodes), [`Evaluation_Final/main.py`](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/main.py) (Chat entry), [`Evaluation_Final/src/graph/graph.py`](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/graph.py) (Agent graph), [`Evaluation_Final/src/model/llm.py`](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/model/llm.py) (Ollama model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_final["Final RAG Agent"]
  node_final_chat["Chat entry<br/>[main.py]"]
  node_agent_graph["Agent graph<br/>[graph.py]"]
  node_agent_nodes["LLM and tool nodes<br/>[nodes.py]"]
  node_agent_state["Conversation state<br/>[state.py]"]
  node_llm["Ollama model<br/>[llm.py]"]
  node_prompt["System prompt<br/>[systemPrompt.py]"]
  node_tools["Retrieval tools<br/>[tools.py]"]
  node_retriever["Document retriever<br/>[retriever.py]"]
  node_vector_store[("Vector store<br/>[vectorStore.py]")]
  node_embeddings["Embedding model<br/>[embeddings.py]"]
  node_loader["Document loading<br/>[loader.py]"]
  node_splitter["Text splitting<br/>[splitter.py]"]
  node_config["Runtime settings<br/>[config.py]"]
end

subgraph group_chef["Personal Chef Projects"]
  node_chef_langchain["LangChain chef agent"]
  node_chef_app["Chef chat app<br/>[main.py]"]
  node_chef_agent["Chef agent<br/>[Agent.py]"]
  node_chef_rag[("Recipe RAG<br/>[RAG.py]")]
  node_chef_tools["Chef tools<br/>[Tools_Setup.py]"]
end

subgraph group_agents["Agent Patterns"]
  node_agent_lab["LangChain agents"]
  node_studio_lab["Multi-agent Studio"]
  node_context_lab["Context and state"]
  node_hitl_lab["Human approval"]
  node_langgraph_agent["LangGraph agent<br/>[TP_Agent.py]"]
end

subgraph group_foundations["AI Foundations"]
  node_prompt_lab["Prompt engineering"]
  node_rag_lab["PDF and SQL RAG"]
  node_mcp_lab["MCP integrations"]
end

subgraph group_workflows["Graph Workflows"]
  node_workflow_lab["LangGraph workflows"]
  node_hitl_workflow["Agent HITL workflow<br/>[HITL_Workflow.py]"]
end

node_user(("User"))

node_user -->|"asks question"| node_final_chat
node_final_chat -->|"invokes graph"| node_agent_graph
node_agent_graph -->|"routes execution"| node_agent_nodes
node_agent_nodes -->|"calls model"| node_llm
node_agent_nodes -->|"adds prompt"| node_prompt
node_agent_nodes -->|"dispatches tools"| node_tools
node_tools -->|"searches documents"| node_retriever
node_retriever -->|"uses store"| node_vector_store
node_embeddings -->|"loads model setting"| node_config
node_llm -->|"loads model settings"| node_config
node_user -->|"chats with chef"| node_chef_app
node_chef_app -->|"invokes agent"| node_chef_agent
node_chef_agent -->|"uses tools"| node_chef_tools
node_chef_tools -->|"retrieves recipes"| node_chef_rag
node_user -->|"studies prompting"| node_prompt_lab
node_user -->|"studies agents"| node_agent_lab
node_user -->|"studies RAG"| node_rag_lab
node_user -->|"studies MCP"| node_mcp_lab
node_user -->|"studies multi-agent graphs"| node_studio_lab
node_user -->|"studies state"| node_context_lab
node_user -->|"studies approval"| node_hitl_lab
node_user -->|"studies workflows"| node_workflow_lab
node_user -->|"studies LangGraph agent"| node_langgraph_agent
node_user -->|"studies agent HITL"| node_hitl_workflow
node_user -->|"studies chef project"| node_chef_langchain

click node_final_chat "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/main.py"
click node_agent_graph "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/graph.py"
click node_agent_nodes "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/nodes.py"
click node_agent_state "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/state.py"
click node_llm "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/model/llm.py"
click node_prompt "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/model/systemPrompt.py"
click node_tools "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/tools/tools.py"
click node_retriever "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/retriever.py"
click node_vector_store "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/vectorStore.py"
click node_embeddings "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/embeddings.py"
click node_loader "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/loader.py"
click node_splitter "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/splitter.py"
click node_config "https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/config/config.py"
click node_chef_langchain "https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab2-AgentsLangchain/TP_Agent_Personal_Chef.py"
click node_chef_app "https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/main.py"
click node_chef_agent "https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/Agent.py"
click node_chef_rag "https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/RAG.py"
click node_chef_tools "https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/Tools_Setup.py"
click node_prompt_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab1-PromptIngineering"
click node_rag_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab3-RAG"
click node_mcp_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab4-MCP"
click node_agent_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab2-AgentsLangchain"
click node_studio_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab5-LangraphStudio"
click node_context_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab6-ContexteEtEtat"
click node_hitl_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab7-HumanInTheLoop"
click node_langgraph_agent "https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab9-AgentLangGraph/TP_Agent.py"
click node_workflow_lab "https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab8-WorkflowLangGraph"
click node_hitl_workflow "https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab9-AgentLangGraph/HITL_Workflow.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_final_chat,node_agent_graph,node_agent_nodes,node_agent_state,node_llm,node_prompt,node_tools,node_retriever,node_vector_store,node_embeddings,node_loader,node_splitter,node_config,node_user toneBlue
class node_chef_langchain,node_chef_app,node_chef_agent,node_chef_rag,node_chef_tools toneAmber
class node_agent_lab,node_studio_lab,node_context_lab,node_hitl_lab,node_langgraph_agent toneMint
class node_prompt_lab,node_rag_lab,node_mcp_lab toneRose
class node_workflow_lab,node_hitl_workflow toneIndigo
```

## Components

### Final RAG Agent

- [Chat entry](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/main.py): `Evaluation_Final/main.py`
- [Agent graph](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/graph.py): `Evaluation_Final/src/graph/graph.py`
- [LLM and tool nodes](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/nodes.py): `Evaluation_Final/src/graph/nodes.py`
- [Conversation state](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/graph/state.py): `Evaluation_Final/src/graph/state.py`
- [Ollama model](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/model/llm.py): `Evaluation_Final/src/model/llm.py`
- [System prompt](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/model/systemPrompt.py): `Evaluation_Final/src/model/systemPrompt.py`
- [Retrieval tools](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/tools/tools.py): `Evaluation_Final/src/tools/tools.py`
- [Document retriever](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/retriever.py): `Evaluation_Final/src/RAG/retriever.py`
- [Vector store](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/vectorStore.py): `Evaluation_Final/src/RAG/vectorStore.py`
- [Embedding model](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/embeddings.py): `Evaluation_Final/src/RAG/embeddings.py`
- [Document loading](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/loader.py): `Evaluation_Final/src/RAG/loader.py`
- [Text splitting](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/src/RAG/splitter.py): `Evaluation_Final/src/RAG/splitter.py`
- [Runtime settings](https://github.com/tahaelkhaili/ia-agentic/blob/main/Evaluation_Final/config/config.py): `Evaluation_Final/config/config.py`

### Personal Chef Projects

- [LangChain chef agent](https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab2-AgentsLangchain/TP_Agent_Personal_Chef.py): `Lab2-AgentsLangchain/TP_Agent_Personal_Chef.py`
- [Chef chat app](https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/main.py): `TP-ChefPersonnel/main.py`
- [Chef agent](https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/Agent.py): `TP-ChefPersonnel/src/Agent.py`
- [Recipe RAG](https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/RAG.py): `TP-ChefPersonnel/src/RAG.py`
- [Chef tools](https://github.com/tahaelkhaili/ia-agentic/blob/main/TP-ChefPersonnel/src/Tools_Setup.py): `TP-ChefPersonnel/src/Tools_Setup.py`

### Agent Patterns

- [LangChain agents](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab2-AgentsLangchain): `Lab2-AgentsLangchain`
- [Multi-agent Studio](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab5-LangraphStudio): `Lab5-LangraphStudio`
- [Context and state](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab6-ContexteEtEtat): `Lab6-ContexteEtEtat`
- [Human approval](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab7-HumanInTheLoop): `Lab7-HumanInTheLoop`
- [LangGraph agent](https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab9-AgentLangGraph/TP_Agent.py): `Lab9-AgentLangGraph/TP_Agent.py`

### AI Foundations

- [Prompt engineering](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab1-PromptIngineering): `Lab1-PromptIngineering`
- [PDF and SQL RAG](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab3-RAG): `Lab3-RAG`
- [MCP integrations](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab4-MCP): `Lab4-MCP`

### Graph Workflows

- [LangGraph workflows](https://github.com/tahaelkhaili/ia-agentic/tree/main/Lab8-WorkflowLangGraph): `Lab8-WorkflowLangGraph`
- [Agent HITL workflow](https://github.com/tahaelkhaili/ia-agentic/blob/main/Lab9-AgentLangGraph/HITL_Workflow.py): `Lab9-AgentLangGraph/HITL_Workflow.py`

### Other components

- **User**

## Connections

- User → Chat entry: asks question (evidence: `Evaluation_Final/main.py`)
- Chat entry → Agent graph: invokes graph (evidence: `Evaluation_Final/main.py`)
- Agent graph → LLM and tool nodes: routes execution (evidence: `Evaluation_Final/src/graph/graph.py`)
- LLM and tool nodes → Ollama model: calls model (evidence: `Evaluation_Final/src/graph/nodes.py`)
- LLM and tool nodes → System prompt: adds prompt (evidence: `Evaluation_Final/src/graph/nodes.py`)
- LLM and tool nodes → Retrieval tools: dispatches tools (evidence: `Evaluation_Final/src/graph/nodes.py`)
- Retrieval tools → Document retriever: searches documents (evidence: `Evaluation_Final/src/tools/tools.py`)
- Document retriever → Vector store: uses store (evidence: `Evaluation_Final/src/RAG/retriever.py`)
- Embedding model → Runtime settings: loads model setting (evidence: `Evaluation_Final/src/RAG/embeddings.py`)
- Ollama model → Runtime settings: loads model settings (evidence: `Evaluation_Final/src/model/llm.py`)
- User → Chef chat app: chats with chef (evidence: `TP-ChefPersonnel/main.py`)
- Chef chat app → Chef agent: invokes agent (evidence: `TP-ChefPersonnel/main.py`)
- Chef agent → Chef tools: uses tools (evidence: `TP-ChefPersonnel/src/Agent.py`)
- Chef tools → Recipe RAG: retrieves recipes (evidence: `TP-ChefPersonnel/src/Tools_Setup.py`)
- User → Prompt engineering: studies prompting
- User → LangChain agents: studies agents
- User → PDF and SQL RAG: studies RAG
- User → MCP integrations: studies MCP
- User → Multi-agent Studio: studies multi-agent graphs
- User → Context and state: studies state
- User → Human approval: studies approval
- User → LangGraph workflows: studies workflows
- User → LangGraph agent: studies LangGraph agent
- User → Agent HITL workflow: studies agent HITL
- User → LangChain chef agent: studies chef project
