# sosom714/agentic_ai architecture

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

- Interactive diagram: https://gitdiagram.com/sosom714/agentic_ai
- Repository: https://github.com/sosom714/agentic_ai

## Overview

This repository is a course lab: standalone Python lessons that progressively demonstrate an LLM call, tool use, agent loops, memory, reasoning patterns, and a guarded personal assistant. The README documents that learning progression, but the scripts are not one integrated runtime; source-level edges show only relationships visible in sampled code. Several later capabilities are documented but not excerpted, so their internal connections are left unverified.

Main entry points: [`04_Agent_Memory/07_agent_memory.py`](https://github.com/sosom714/agentic_ai/blob/main/04_Agent_Memory/07_agent_memory.py) (Sliding-Window Memory), [`06_Personal_Assistant_Project/13_agent.py`](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/13_agent.py) (Multi-Turn Assistant), [`06_Personal_Assistant_Project/14_persistent_agent.py`](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/14_persistent_agent.py) (Persistent Assistant), [`01_LLM_Basics/01_hello_llm.py`](https://github.com/sosom714/agentic_ai/blob/main/01_LLM_Basics/01_hello_llm.py) (First LLM Call)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basics["LLM and Tools"]
  node_hello["First LLM Call<br/>[01_hello_llm.py]"]
  node_temperature["Temperature Demo"]
  node_tool_demo["Tool Calling Demo<br/>[03_tools_app.py]"]
end

subgraph group_patterns["Agent Patterns"]
  node_loop["Conversation Loop<br/>[04_agent_loop.py]"]
  node_components["Tool Agent Loop"]
  node_safe["Safe Agent Loop<br/>[06_safe_agent.py]"]
  node_memory_agent["Sliding-Window Memory<br/>[07_agent_memory.py]"]
  node_memory_tools["Calendar Tool<br/>[tools.py]"]
  node_react["ReAct Agent<br/>[08_react_agent.py]"]
  node_patterns_demo["Reasoning Guardrails"]
end

subgraph group_assistant["Personal Assistant"]
  node_heartbeat["Heartbeat Notes"]
  node_starter_tools["Assistant Tool Starter"]
  node_starter_agent["Assistant Agent Starter"]
  node_assistant_agent["Multi-Turn Assistant<br/>[13_agent.py]"]
  node_assistant_tools["Assistant Tools<br/>[tools.py]"]
  node_persistent["Persistent Assistant"]
  node_preference_store[("Preference JSON Store")]
  node_monitored["Monitored Assistant"]
  node_secure["Secure Assistant<br/>[16_secure_agent.py]"]
end

node_learner(("Learner"))
node_llm(("LLM Service"))

node_learner -->|"starts with"| node_hello
node_hello -->|"continues to"| node_temperature
node_temperature -->|"continues to"| node_tool_demo
node_tool_demo -->|"continues to"| node_loop
node_loop -->|"adds tool execution"| node_components
node_components -->|"adds safeguards"| node_safe
node_safe -->|"adds memory"| node_memory_agent
node_memory_agent -->|"imports and executes"| node_memory_tools
node_memory_agent -->|"continues to"| node_react
node_react -->|"continues to"| node_patterns_demo
node_patterns_demo -->|"continues to"| node_heartbeat
node_heartbeat -->|"continues to"| node_starter_tools
node_starter_tools -->|"continues to"| node_starter_agent
node_starter_agent -->|"continues to"| node_assistant_agent
node_assistant_agent -->|"imports and calls"| node_assistant_tools
node_assistant_agent -->|"continues to"| node_persistent
node_persistent -->|"reads and writes"| node_preference_store
node_persistent -->|"continues to"| node_monitored
node_monitored -->|"continues to"| node_secure
node_hello -->|"requests completion"| node_llm
node_temperature -->|"requests completions"| node_llm
node_tool_demo -->|"requests completion"| node_llm
node_loop -->|"requests completion"| node_llm
node_components -->|"requests completion"| node_llm
node_safe -->|"requests completion"| node_llm
node_memory_agent -->|"requests completion"| node_llm
node_react -->|"requests completion"| node_llm
node_assistant_agent -->|"requests completion"| node_llm
node_persistent -->|"requests completion"| node_llm
node_monitored -->|"requests completion"| node_llm

click node_hello "https://github.com/sosom714/agentic_ai/blob/main/01_LLM_Basics/01_hello_llm.py"
click node_temperature "https://github.com/sosom714/agentic_ai/blob/main/01_LLM_Basics/02_hello_llm_temperature.py"
click node_tool_demo "https://github.com/sosom714/agentic_ai/blob/main/02_Tool_Calling/03_tools_app.py"
click node_loop "https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/04_agent_loop.py"
click node_components "https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/05_agent_components.py"
click node_safe "https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/06_safe_agent.py"
click node_memory_agent "https://github.com/sosom714/agentic_ai/blob/main/04_Agent_Memory/07_agent_memory.py"
click node_memory_tools "https://github.com/sosom714/agentic_ai/blob/main/04_Agent_Memory/tools.py"
click node_react "https://github.com/sosom714/agentic_ai/blob/main/05_Reasoning_and_Patterns/08_react_agent.py"
click node_patterns_demo "https://github.com/sosom714/agentic_ai/blob/main/05_Reasoning_and_Patterns/09_pattern_agents.py"
click node_heartbeat "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/10_heartbeat_loop_notes.py"
click node_starter_tools "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/11_tools_starter.py"
click node_starter_agent "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/12_agent_starter.py"
click node_assistant_agent "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/13_agent.py"
click node_assistant_tools "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/tools.py"
click node_persistent "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/14_persistent_agent.py"
click node_preference_store "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/14_persistent_agent.py"
click node_monitored "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/15_monitored_agent.py"
click node_secure "https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/16_secure_agent.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_hello,node_temperature,node_tool_demo toneBlue
class node_loop,node_components,node_safe,node_memory_agent,node_memory_tools,node_react,node_patterns_demo toneAmber
class node_heartbeat,node_starter_tools,node_starter_agent,node_assistant_agent,node_assistant_tools,node_persistent,node_preference_store,node_monitored,node_secure toneMint
class node_learner,node_llm toneIndigo
```

## Components

### LLM and Tools

- [First LLM Call](https://github.com/sosom714/agentic_ai/blob/main/01_LLM_Basics/01_hello_llm.py): `01_LLM_Basics/01_hello_llm.py`
- [Temperature Demo](https://github.com/sosom714/agentic_ai/blob/main/01_LLM_Basics/02_hello_llm_temperature.py): `01_LLM_Basics/02_hello_llm_temperature.py`
- [Tool Calling Demo](https://github.com/sosom714/agentic_ai/blob/main/02_Tool_Calling/03_tools_app.py): `02_Tool_Calling/03_tools_app.py`

### Agent Patterns

- [Conversation Loop](https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/04_agent_loop.py): `03_Agent_Loop/04_agent_loop.py`
- [Tool Agent Loop](https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/05_agent_components.py): `03_Agent_Loop/05_agent_components.py`
- [Safe Agent Loop](https://github.com/sosom714/agentic_ai/blob/main/03_Agent_Loop/06_safe_agent.py): `03_Agent_Loop/06_safe_agent.py`
- [Sliding-Window Memory](https://github.com/sosom714/agentic_ai/blob/main/04_Agent_Memory/07_agent_memory.py): `04_Agent_Memory/07_agent_memory.py`
- [Calendar Tool](https://github.com/sosom714/agentic_ai/blob/main/04_Agent_Memory/tools.py): `04_Agent_Memory/tools.py`
- [ReAct Agent](https://github.com/sosom714/agentic_ai/blob/main/05_Reasoning_and_Patterns/08_react_agent.py): `05_Reasoning_and_Patterns/08_react_agent.py`
- [Reasoning Guardrails](https://github.com/sosom714/agentic_ai/blob/main/05_Reasoning_and_Patterns/09_pattern_agents.py): `05_Reasoning_and_Patterns/09_pattern_agents.py`

### Personal Assistant

- [Heartbeat Notes](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/10_heartbeat_loop_notes.py): `06_Personal_Assistant_Project/10_heartbeat_loop_notes.py`
- [Assistant Tool Starter](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/11_tools_starter.py): `06_Personal_Assistant_Project/11_tools_starter.py`
- [Assistant Agent Starter](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/12_agent_starter.py): `06_Personal_Assistant_Project/12_agent_starter.py`
- [Multi-Turn Assistant](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/13_agent.py): `06_Personal_Assistant_Project/13_agent.py`
- [Assistant Tools](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/tools.py): `06_Personal_Assistant_Project/tools.py`
- [Persistent Assistant](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/14_persistent_agent.py): `06_Personal_Assistant_Project/14_persistent_agent.py`
- [Preference JSON Store](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/14_persistent_agent.py): `06_Personal_Assistant_Project/14_persistent_agent.py`
- [Monitored Assistant](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/15_monitored_agent.py): `06_Personal_Assistant_Project/15_monitored_agent.py`
- [Secure Assistant](https://github.com/sosom714/agentic_ai/blob/main/06_Personal_Assistant_Project/16_secure_agent.py): `06_Personal_Assistant_Project/16_secure_agent.py`

### Other components

- **Learner**
- **LLM Service**

## Connections

- Learner → First LLM Call: starts with (evidence: `README.md`)
- First LLM Call → Temperature Demo: continues to (evidence: `README.md`)
- Temperature Demo → Tool Calling Demo: continues to (evidence: `README.md`)
- Tool Calling Demo → Conversation Loop: continues to (evidence: `README.md`)
- Conversation Loop → Tool Agent Loop: adds tool execution (evidence: `README.md`)
- Tool Agent Loop → Safe Agent Loop: adds safeguards (evidence: `README.md`)
- Safe Agent Loop → Sliding-Window Memory: adds memory (evidence: `README.md`)
- Sliding-Window Memory → Calendar Tool: imports and executes (evidence: `04_Agent_Memory/07_agent_memory.py`)
- Sliding-Window Memory → ReAct Agent: continues to (evidence: `README.md`)
- ReAct Agent → Reasoning Guardrails: continues to (evidence: `README.md`)
- Reasoning Guardrails → Heartbeat Notes: continues to (evidence: `README.md`)
- Heartbeat Notes → Assistant Tool Starter: continues to (evidence: `README.md`)
- Assistant Tool Starter → Assistant Agent Starter: continues to (evidence: `README.md`)
- Assistant Agent Starter → Multi-Turn Assistant: continues to (evidence: `README.md`)
- Multi-Turn Assistant → Assistant Tools: imports and calls (evidence: `06_Personal_Assistant_Project/13_agent.py`)
- Multi-Turn Assistant → Persistent Assistant: continues to (evidence: `README.md`)
- Persistent Assistant → Preference JSON Store: reads and writes (evidence: `06_Personal_Assistant_Project/14_persistent_agent.py`)
- Persistent Assistant → Monitored Assistant: continues to (evidence: `README.md`)
- Monitored Assistant → Secure Assistant: continues to (evidence: `README.md`)
- First LLM Call → LLM Service: requests completion (evidence: `01_LLM_Basics/01_hello_llm.py`)
- Temperature Demo → LLM Service: requests completions (evidence: `01_LLM_Basics/02_hello_llm_temperature.py`)
- Tool Calling Demo → LLM Service: requests completion (evidence: `02_Tool_Calling/03_tools_app.py`)
- Conversation Loop → LLM Service: requests completion (evidence: `README.md`)
- Tool Agent Loop → LLM Service: requests completion (evidence: `README.md`)
- Safe Agent Loop → LLM Service: requests completion (evidence: `03_Agent_Loop/06_safe_agent.py`)
- Sliding-Window Memory → LLM Service: requests completion (evidence: `04_Agent_Memory/07_agent_memory.py`)
- ReAct Agent → LLM Service: requests completion (evidence: `05_Reasoning_and_Patterns/08_react_agent.py`)
- Multi-Turn Assistant → LLM Service: requests completion (evidence: `06_Personal_Assistant_Project/13_agent.py`)
- Persistent Assistant → LLM Service: requests completion (evidence: `06_Personal_Assistant_Project/14_persistent_agent.py`)
- Monitored Assistant → LLM Service: requests completion (evidence: `06_Personal_Assistant_Project/15_monitored_agent.py`)
