# syedjaferk/40_day_of_agentic_ai architecture

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

- Interactive diagram: https://gitdiagram.com/syedjaferk/40_day_of_agentic_ai
- Repository: https://github.com/syedjaferk/40_day_of_agentic_ai

## Overview

This repository is a collection of standalone Python learning demos, not one integrated application. A representative workflow is the prompt-engineering CLI selecting a technique, which builds a prompt and uses the shared Groq client to return an answer. Other independent branches demonstrate agent tools, memory, RAG, asynchronous programming, and validation. Source excerpts confirm several prompt, tool, and memory relationships; for unsampled demos, the graph preserves their capabilities without guessing their internal call paths.

Main entry points: [`4.prompt_engineering/run_examples.py`](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/run_examples.py) (Example Runner), [`4.prompt_engineering/groq_client.py`](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/groq_client.py) (Groq Client), [`11.tools-custom/4_database_tools.py`](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/4_database_tools.py) (SQL Agent Tools), [`11.tools-custom/mcp_client.py`](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/mcp_client.py) (MCP Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prompting["Prompt Engineering"]
  node_prompt_cli["Example Runner<br/>[run_examples.py]"]
  node_tech_zero["Zero Shot<br/>[zero_shot.py]"]
  node_tech_few["Few Shot<br/>[few_shot.py]"]
  node_tech_cot["Chain Of Thought"]
  node_tech_role["Role Based<br/>[role_based.py]"]
  node_tech_instruction["Structured Instructions"]
  node_tech_context["Contextual Prompting"]
  node_tech_consistency["Self Consistency"]
  node_tech_tree["Tree Of Thought<br/>[tree_of_thought.py]"]
  node_tech_react["ReAct<br/>[react.py]"]
  node_groq_client["Groq Client<br/>[groq_client.py]"]
end

subgraph group_agents["Tools And Agents"]
  node_tool_demos["Custom Tool Demos<br/>[11.tools-custom]"]
  node_agent_model["ChatGroq Model<br/>[model.py]"]
  node_database_tools["SQL Agent Tools"]
  node_shop_db[("Shop SQLite")]
  node_mcp_client["MCP Client<br/>[mcp_client.py]"]
  node_mcp_server["MCP Server<br/>[mcp_server.py]"]
  node_tool_calling["Tool Calling Demo<br/>[tool_calling.py]"]
end

subgraph group_memory["Agent Memory"]
  node_memory_buffer["Buffer Memory<br/>[1.buffer_memory.py]"]
  node_memory_window["Window Memory<br/>[2.window_memory.py]"]
  node_memory_token["Token Memory<br/>[3.token_memory.py]"]
  node_memory_summary["Summary Memory"]
  node_memory_long["Long Term Memory<br/>[5.long_term.py]"]
  node_memory_semantic["Semantic Memory"]
  node_memory_store[("Memory Store<br/>[5.long_term.py]")]
end

subgraph group_retrieval["Retrieval And Validation"]
  node_rag_demo["Simple RAG<br/>[simple_rag.py]"]
  node_validation_demos["Data Validation Demos<br/>[9.data_validation]"]
end

subgraph group_examples["Other Demos"]
  node_async_demos["Async Coding Demos<br/>[8.aysnc_coding]"]
  node_guessing_game["Number Guessing Game<br/>[game.py]"]
end

node_user(("Learner"))
node_groq_service{{"Groq API"}}

node_user -->|"selects demo"| node_prompt_cli
node_prompt_cli -->|"runs technique"| node_tech_zero
node_prompt_cli -->|"runs technique"| node_tech_few
node_prompt_cli -->|"runs technique"| node_tech_cot
node_prompt_cli -->|"runs technique"| node_tech_role
node_prompt_cli -->|"runs technique"| node_tech_instruction
node_prompt_cli -->|"runs technique"| node_tech_context
node_prompt_cli -->|"runs technique"| node_tech_consistency
node_prompt_cli -->|"runs technique"| node_tech_tree
node_prompt_cli -->|"runs technique"| node_tech_react
node_tech_zero -->|"calls client"| node_groq_client
node_tech_few -->|"calls client"| node_groq_client
node_tech_cot -->|"calls client"| node_groq_client
node_tech_role -->|"calls client"| node_groq_client
node_tech_instruction -->|"calls client"| node_groq_client
node_tech_context -->|"calls client"| node_groq_client
node_tech_consistency -->|"calls client"| node_groq_client
node_tech_tree -->|"calls client"| node_groq_client
node_tech_react -->|"calls client"| node_groq_client
node_groq_client -->|"sends requests"| node_groq_service
node_database_tools -->|"configures agent"| node_agent_model
node_database_tools -->|"queries read-only"| node_shop_db
node_mcp_client -->|"configures agent"| node_agent_model
node_mcp_client -->|"discovers tools"| node_mcp_server
node_memory_long -->|"reads and writes"| node_memory_store
node_memory_semantic -->|"searches memories"| node_memory_store

click node_prompt_cli "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/run_examples.py"
click node_tech_zero "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/zero_shot.py"
click node_tech_few "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/few_shot.py"
click node_tech_cot "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/chain_of_thought.py"
click node_tech_role "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/role_based.py"
click node_tech_instruction "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/instruction_based.py"
click node_tech_context "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/contextual_prompting.py"
click node_tech_consistency "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/self_consistency.py"
click node_tech_tree "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/tree_of_thought.py"
click node_tech_react "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/react.py"
click node_groq_client "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/groq_client.py"
click node_tool_demos "https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/11.tools-custom"
click node_agent_model "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/model.py"
click node_database_tools "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/4_database_tools.py"
click node_shop_db "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/4_database_tools.py"
click node_mcp_client "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/mcp_client.py"
click node_mcp_server "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/mcp_server.py"
click node_memory_buffer "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/1.buffer_memory.py"
click node_memory_window "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/2.window_memory.py"
click node_memory_token "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/3.token_memory.py"
click node_memory_summary "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/4.summary_memory.py"
click node_memory_long "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/5.long_term.py"
click node_memory_semantic "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/6.semantic_memory.py"
click node_memory_store "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/5.long_term.py"
click node_rag_demo "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/7.simple_rag/simple_rag.py"
click node_validation_demos "https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/9.data_validation"
click node_tool_calling "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/5.tool_calling/tool_calling.py"
click node_async_demos "https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/8.aysnc_coding"
click node_guessing_game "https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/2.number_guessing_game/game.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_prompt_cli,node_tech_zero,node_tech_few,node_tech_cot,node_tech_role,node_tech_instruction,node_tech_context,node_tech_consistency,node_tech_tree,node_tech_react,node_groq_client toneBlue
class node_tool_demos,node_agent_model,node_database_tools,node_shop_db,node_mcp_client,node_mcp_server,node_tool_calling toneAmber
class node_memory_buffer,node_memory_window,node_memory_token,node_memory_summary,node_memory_long,node_memory_semantic,node_memory_store,node_groq_service toneMint
class node_rag_demo,node_validation_demos toneRose
class node_async_demos,node_guessing_game,node_user toneIndigo
```

## Components

### Prompt Engineering

- [Example Runner](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/run_examples.py): `4.prompt_engineering/run_examples.py`
- [Zero Shot](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/zero_shot.py): `4.prompt_engineering/techniques/zero_shot.py`
- [Few Shot](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/few_shot.py): `4.prompt_engineering/techniques/few_shot.py`
- [Chain Of Thought](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/chain_of_thought.py): `4.prompt_engineering/techniques/chain_of_thought.py`
- [Role Based](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/role_based.py): `4.prompt_engineering/techniques/role_based.py`
- [Structured Instructions](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/instruction_based.py): `4.prompt_engineering/techniques/instruction_based.py`
- [Contextual Prompting](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/contextual_prompting.py): `4.prompt_engineering/techniques/contextual_prompting.py`
- [Self Consistency](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/self_consistency.py): `4.prompt_engineering/techniques/self_consistency.py`
- [Tree Of Thought](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/tree_of_thought.py): `4.prompt_engineering/techniques/tree_of_thought.py`
- [ReAct](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/techniques/react.py): `4.prompt_engineering/techniques/react.py`
- [Groq Client](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/4.prompt_engineering/groq_client.py): `4.prompt_engineering/groq_client.py`

### Tools And Agents

- [Custom Tool Demos](https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/11.tools-custom): `11.tools-custom`
- [ChatGroq Model](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/model.py): `11.tools-custom/model.py`
- [SQL Agent Tools](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/4_database_tools.py): `11.tools-custom/4_database_tools.py`
- [Shop SQLite](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/4_database_tools.py): `11.tools-custom/4_database_tools.py`
- [MCP Client](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/mcp_client.py): `11.tools-custom/mcp_client.py`
- [MCP Server](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/11.tools-custom/mcp_server.py): `11.tools-custom/mcp_server.py`
- [Tool Calling Demo](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/5.tool_calling/tool_calling.py): `5.tool_calling/tool_calling.py`

### Agent Memory

- [Buffer Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/1.buffer_memory.py): `10.memory_management/1.buffer_memory.py`
- [Window Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/2.window_memory.py): `10.memory_management/2.window_memory.py`
- [Token Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/3.token_memory.py): `10.memory_management/3.token_memory.py`
- [Summary Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/4.summary_memory.py): `10.memory_management/4.summary_memory.py`
- [Long Term Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/5.long_term.py): `10.memory_management/5.long_term.py`
- [Semantic Memory](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/6.semantic_memory.py): `10.memory_management/6.semantic_memory.py`
- [Memory Store](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/10.memory_management/5.long_term.py): `10.memory_management/5.long_term.py`

### Retrieval And Validation

- [Simple RAG](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/7.simple_rag/simple_rag.py): `7.simple_rag/simple_rag.py`
- [Data Validation Demos](https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/9.data_validation): `9.data_validation`

### Other Demos

- [Async Coding Demos](https://github.com/syedjaferk/40_day_of_agentic_ai/tree/main/8.aysnc_coding): `8.aysnc_coding`
- [Number Guessing Game](https://github.com/syedjaferk/40_day_of_agentic_ai/blob/main/2.number_guessing_game/game.py): `2.number_guessing_game/game.py`

### Other components

- **Learner**
- **Groq API**

## Connections

- Learner → Example Runner: selects demo (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Zero Shot: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Few Shot: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Chain Of Thought: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Role Based: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Structured Instructions: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Contextual Prompting: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Self Consistency: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → Tree Of Thought: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Example Runner → ReAct: runs technique (evidence: `4.prompt_engineering/run_examples.py`)
- Zero Shot → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/zero_shot.py`)
- Few Shot → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/few_shot.py`)
- Chain Of Thought → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/chain_of_thought.py`)
- Role Based → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/role_based.py`)
- Structured Instructions → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/instruction_based.py`)
- Contextual Prompting → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/contextual_prompting.py`)
- Self Consistency → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/self_consistency.py`)
- Tree Of Thought → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/tree_of_thought.py`)
- ReAct → Groq Client: calls client (evidence: `4.prompt_engineering/techniques/react.py`)
- Groq Client → Groq API: sends requests (evidence: `4.prompt_engineering/groq_client.py`)
- SQL Agent Tools → ChatGroq Model: configures agent (evidence: `11.tools-custom/4_database_tools.py`)
- SQL Agent Tools → Shop SQLite: queries read-only (evidence: `11.tools-custom/4_database_tools.py`)
- MCP Client → ChatGroq Model: configures agent (evidence: `11.tools-custom/mcp_client.py`)
- MCP Client → MCP Server: discovers tools (evidence: `11.tools-custom/mcp_client.py`)
- Long Term Memory → Memory Store: reads and writes (evidence: `10.memory_management/5.long_term.py`)
- Semantic Memory → Memory Store: searches memories (evidence: `10.memory_management/6.semantic_memory.py`)
