# luisnoronha/gen-ai-course architecture

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

- Interactive diagram: https://gitdiagram.com/luisnoronha/gen-ai-course
- Repository: https://github.com/luisnoronha/gen-ai-course

## Overview

This is a hands-on Generative AI course repository, not one deployed product. Its central Course 2 workflow is to start from an incident scenario, run an agent against a simulated exchange through tools, and inspect/evaluate the response in labs. Course 1 separately teaches LLM, retrieval, RAG, evaluation, and API workflows. The graph preserves these major branches; links are limited to calls visible in excerpts or references in the source index, and README-described capabilities are represented without assuming unshown wiring.

Main entry points: [`meridian/simulator.py`](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/simulator.py) (Exchange Simulator), [`meridian/agent_runtime.py`](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/agent_runtime.py) (Agent Runner), [`meridian/tools.py`](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/tools.py) (Agent Tools), [`meridian/lab/ui.py`](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/lab/ui.py) (Shared Lab UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Course Material"]
  node_course1["Fundamentals Sessions"]
  node_rag_support["RAG Support"]
  node_agent_api["RAG Agent API<br/>[agent_service.py]"]
end

subgraph group_simulation["Meridian Simulation"]
  node_scenarios["Incident Scenarios<br/>[scenarios.py]"]
  node_simulator["Exchange Simulator<br/>[simulator.py]"]
  node_state[("Exchange State<br/>[model.py]")]
  node_signals["Metrics and Signals<br/>[signals.py]"]
  node_rules["Simulation Rules<br/>[rules.py]"]
  node_actions["Exchange Actions<br/>[actions.py]"]
  node_faults["Fault Injection<br/>[faults.py]"]
end

subgraph group_runtime["Agent Runtime"]
  node_tools["Agent Tools<br/>[tools.py]"]
  node_agent_runtime["Agent Runner<br/>[agent_runtime.py]"]
  node_memory[("Agent Memory<br/>[memory.py]")]
end

subgraph group_integrations["External Interfaces"]
  node_mcp_servers["MCP Servers"]
end

subgraph group_labs["Course 2 Labs"]
  node_lab_ui["Shared Lab UI<br/>[ui.py]"]
  node_security_lab["Security Exercises"]
  node_evaluation_lab["Agent Evaluation"]
  node_multiagent_lab["Multi-Agent Lab"]
  node_board["Incident Board<br/>[board.py]"]
end

node_learner(("Learner"))

node_learner -->|"works through"| node_course1
node_learner -.->|"runs incidents"| node_agent_runtime
node_course1 -->|"uses shared RAG"| node_rag_support
node_agent_api -->|"reuses RAG"| node_rag_support
node_agent_runtime -->|"loads"| node_scenarios
node_agent_runtime -->|"initializes"| node_simulator
node_agent_runtime -->|"creates"| node_tools
node_agent_runtime -->|"opens optional"| node_memory
node_simulator -->|"reads"| node_scenarios
node_simulator -->|"updates"| node_state
node_simulator -->|"generates"| node_signals
node_simulator -->|"applies"| node_rules
node_simulator -->|"applies"| node_actions
node_simulator -->|"injects"| node_faults
node_tools -->|"operates"| node_simulator
node_tools -->|"invokes"| node_actions
node_signals -->|"derives from"| node_state
node_security_lab -->|"runs agents"| node_agent_runtime
node_evaluation_lab -->|"evaluates agents"| node_agent_runtime
node_multiagent_lab -->|"updates display"| node_board
node_multiagent_lab -->|"uses shared UI"| node_lab_ui
node_security_lab -->|"uses shared UI"| node_lab_ui
node_evaluation_lab -->|"uses shared UI"| node_lab_ui
node_agent_runtime -.->|"supports optional"| node_mcp_servers

click node_course1 "https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-01-ai-fundamentals"
click node_rag_support "https://github.com/luisnoronha/gen-ai-course/blob/main/sessions/course-01-ai-fundamentals/rag_course_support.py"
click node_agent_api "https://github.com/luisnoronha/gen-ai-course/blob/main/sessions/course-01-ai-fundamentals/07-agent-api/agent_service.py"
click node_scenarios "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/scenarios.py"
click node_simulator "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/simulator.py"
click node_state "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/model.py"
click node_signals "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/signals.py"
click node_rules "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/rules.py"
click node_actions "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/actions.py"
click node_faults "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/faults.py"
click node_tools "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/tools.py"
click node_agent_runtime "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/agent_runtime.py"
click node_memory "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/memory.py"
click node_mcp_servers "https://github.com/luisnoronha/gen-ai-course/tree/main/meridian/mcp_servers"
click node_lab_ui "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/lab/ui.py"
click node_security_lab "https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/05-security/lab"
click node_evaluation_lab "https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/06-evaluation/lab"
click node_multiagent_lab "https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/07-multi-agent/lab"
click node_board "https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/lab/board.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_course1,node_rag_support,node_agent_api toneBlue
class node_scenarios,node_simulator,node_state,node_signals,node_rules,node_actions,node_faults toneAmber
class node_tools,node_agent_runtime,node_memory toneMint
class node_mcp_servers toneRose
class node_lab_ui,node_security_lab,node_evaluation_lab,node_multiagent_lab,node_board,node_learner toneIndigo
```

## Components

### Course Material

- [Fundamentals Sessions](https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-01-ai-fundamentals): `sessions/course-01-ai-fundamentals`
- [RAG Support](https://github.com/luisnoronha/gen-ai-course/blob/main/sessions/course-01-ai-fundamentals/rag_course_support.py): `sessions/course-01-ai-fundamentals/rag_course_support.py`
- [RAG Agent API](https://github.com/luisnoronha/gen-ai-course/blob/main/sessions/course-01-ai-fundamentals/07-agent-api/agent_service.py): `sessions/course-01-ai-fundamentals/07-agent-api/agent_service.py`

### Meridian Simulation

- [Incident Scenarios](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/scenarios.py): `meridian/scenarios.py`
- [Exchange Simulator](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/simulator.py): `meridian/simulator.py`
- [Exchange State](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/model.py): `meridian/model.py`
- [Metrics and Signals](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/signals.py): `meridian/signals.py`
- [Simulation Rules](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/rules.py): `meridian/rules.py`
- [Exchange Actions](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/actions.py): `meridian/actions.py`
- [Fault Injection](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/faults.py): `meridian/faults.py`

### Agent Runtime

- [Agent Tools](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/tools.py): `meridian/tools.py`
- [Agent Runner](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/agent_runtime.py): `meridian/agent_runtime.py`
- [Agent Memory](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/memory.py): `meridian/memory.py`

### External Interfaces

- [MCP Servers](https://github.com/luisnoronha/gen-ai-course/tree/main/meridian/mcp_servers): `meridian/mcp_servers`

### Course 2 Labs

- [Shared Lab UI](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/lab/ui.py): `meridian/lab/ui.py`
- [Security Exercises](https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/05-security/lab): `sessions/course-02-agentic-ai/05-security/lab`
- [Agent Evaluation](https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/06-evaluation/lab): `sessions/course-02-agentic-ai/06-evaluation/lab`
- [Multi-Agent Lab](https://github.com/luisnoronha/gen-ai-course/tree/main/sessions/course-02-agentic-ai/07-multi-agent/lab): `sessions/course-02-agentic-ai/07-multi-agent/lab`
- [Incident Board](https://github.com/luisnoronha/gen-ai-course/blob/main/meridian/lab/board.py): `meridian/lab/board.py`

### Other components

- **Learner**

## Connections

- Learner → Fundamentals Sessions: works through (evidence: `README.md`)
- Learner → Agent Runner: runs incidents
- Fundamentals Sessions → RAG Support: uses shared RAG (evidence: `sessions/course-01-ai-fundamentals/04-rag-pipeline/starter/01_rag_baseline.py`)
- RAG Agent API → RAG Support: reuses RAG (evidence: `sessions/course-01-ai-fundamentals/07-agent-api/agent_service.py`)
- Agent Runner → Incident Scenarios: loads (evidence: `meridian/agent_runtime.py`)
- Agent Runner → Exchange Simulator: initializes (evidence: `meridian/agent_runtime.py`)
- Agent Runner → Agent Tools: creates (evidence: `meridian/agent_runtime.py`)
- Agent Runner → Agent Memory: opens optional (evidence: `meridian/agent_runtime.py`)
- Exchange Simulator → Incident Scenarios: reads (evidence: `meridian/simulator.py`)
- Exchange Simulator → Exchange State: updates (evidence: `meridian/simulator.py`)
- Exchange Simulator → Metrics and Signals: generates (evidence: `meridian/simulator.py`)
- Exchange Simulator → Simulation Rules: applies (evidence: `meridian/simulator.py`)
- Exchange Simulator → Exchange Actions: applies (evidence: `meridian/simulator.py`)
- Exchange Simulator → Fault Injection: injects (evidence: `meridian/simulator.py`)
- Agent Tools → Exchange Simulator: operates (evidence: `meridian/tools.py`)
- Agent Tools → Exchange Actions: invokes (evidence: `meridian/tools.py`)
- Metrics and Signals → Exchange State: derives from (evidence: `meridian/signals.py`)
- Security Exercises → Agent Runner: runs agents (evidence: `sessions/course-02-agentic-ai/05-security/lab/agent.py`)
- Agent Evaluation → Agent Runner: evaluates agents (evidence: `sessions/course-02-agentic-ai/06-evaluation/lab/agents.py`)
- Multi-Agent Lab → Incident Board: updates display (evidence: `sessions/course-02-agentic-ai/07-multi-agent/lab/app.py`)
- Multi-Agent Lab → Shared Lab UI: uses shared UI (evidence: `sessions/course-02-agentic-ai/07-multi-agent/lab/app.py`)
- Security Exercises → Shared Lab UI: uses shared UI (evidence: `sessions/course-02-agentic-ai/05-security/lab/app.py`)
- Agent Evaluation → Shared Lab UI: uses shared UI (evidence: `sessions/course-02-agentic-ai/06-evaluation/lab/app.py`)
- Agent Runner → MCP Servers: supports optional
