# projnanda/5-day-course architecture

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

- Interactive diagram: https://gitdiagram.com/projnanda/5-day-course
- Repository: https://github.com/projnanda/5-day-course

## Overview

This repository is a five-day AI-agent course, with runnable Python examples that progress from a personal CrewAI agent to memory, tools, REST deployment, and agent-to-agent communication. The principal workflow is a learner querying an agent; later examples expose that agent over HTTP and support peer routing. The optional chat interface lets students register and chat with deployed agents. The README also describes a Day 5 coordination and battle challenge, but no Day 5 implementation appears in the supplied tree. Edges are limited to README statements and shown source excerpts.

Main entry points: [`interface/server.js`](https://github.com/projnanda/5-day-course/blob/main/interface/server.js) (Agent registry), [`day-4/main.py`](https://github.com/projnanda/5-day-course/blob/main/day-4/main.py) (A2A personal agent), [`day-2/main.py`](https://github.com/projnanda/5-day-course/blob/main/day-2/main.py) (Memory agent), [`agent_1/main.py`](https://github.com/projnanda/5-day-course/blob/main/agent_1/main.py) (Weather agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent_basics["Agent foundations"]
  node_day1_agent["Agent loop<br/>[main.py]"]
  node_day1_interactive["Interactive runner<br/>[interactive.py]"]
end

subgraph group_agent_runtime["Memory and tools"]
  node_day2_agent["Memory agent<br/>[main.py]"]
  node_memory_inspector["Memory inspector<br/>[inspect_memory.py]"]
end

subgraph group_agent_network["Deployment and A2A"]
  node_day3_api["Agent REST API<br/>[main.py]"]
  node_weather_agent["Weather agent<br/>[main.py]"]
  node_robot_agent["Robot expert<br/>[main.py]"]
  node_a2a_agent["A2A personal agent<br/>[main.py]"]
  node_google_a2a["A2A demo workflow<br/>[google_a2a.py]"]
  node_registry[("Agent registry<br/>[server.js]")]
end

subgraph group_chat_product["Chat interface"]
  node_agent_list["Agent listing UI<br/>[page.tsx]"]
  node_chat_ui["Agent chat UI<br/>[page.tsx]"]
end

node_learner(("Learner"))
node_external_agent(("Deployed peer agent"))
node_external_services{{"LLM and tools"}}

node_learner -->|"asks questions"| node_day1_agent
node_learner -->|"asks questions"| node_day2_agent
node_day1_interactive -->|"runs agent"| node_day1_agent
node_learner -->|"queries over HTTP"| node_day3_api
node_day3_api -->|"uses agent tools"| node_external_services
node_day2_agent -->|"uses tools"| node_external_services
node_memory_inspector -->|"inspects stored memory"| node_day2_agent
node_learner -->|"sends A2A requests"| node_a2a_agent
node_a2a_agent -->|"fetches agents"| node_registry
node_a2a_agent -->|"routes messages"| node_external_agent
node_weather_agent -->|"fetches agents"| node_registry
node_weather_agent -.->|"routes A2A messages"| node_external_agent
node_robot_agent -->|"fetches agents"| node_registry
node_robot_agent -.->|"routes A2A messages"| node_external_agent
node_google_a2a -->|"runs agent tasks"| node_external_services
node_learner -.->|"browses agents"| node_agent_list
node_agent_list -.->|"lists agents"| node_registry
node_learner -.->|"chats with agents"| node_chat_ui
node_chat_ui -.->|"sends messages"| node_external_agent

click node_day1_agent "https://github.com/projnanda/5-day-course/blob/main/day-1/main.py"
click node_day1_interactive "https://github.com/projnanda/5-day-course/blob/main/day-1/interactive.py"
click node_day2_agent "https://github.com/projnanda/5-day-course/blob/main/day-2/main.py"
click node_memory_inspector "https://github.com/projnanda/5-day-course/blob/main/day-2/inspect_memory.py"
click node_day3_api "https://github.com/projnanda/5-day-course/blob/main/day-3/main.py"
click node_weather_agent "https://github.com/projnanda/5-day-course/blob/main/agent_1/main.py"
click node_robot_agent "https://github.com/projnanda/5-day-course/blob/main/agent_2/main.py"
click node_a2a_agent "https://github.com/projnanda/5-day-course/blob/main/day-4/main.py"
click node_google_a2a "https://github.com/projnanda/5-day-course/blob/main/day-4/google_a2a.py"
click node_registry "https://github.com/projnanda/5-day-course/blob/main/interface/server.js"
click node_agent_list "https://github.com/projnanda/5-day-course/blob/main/interface/app/page.tsx"
click node_chat_ui "https://github.com/projnanda/5-day-course/blob/main/interface/app/page.tsx"

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_day1_agent,node_day1_interactive toneBlue
class node_day2_agent,node_memory_inspector toneAmber
class node_day3_api,node_weather_agent,node_robot_agent,node_a2a_agent,node_google_a2a,node_registry toneMint
class node_agent_list,node_chat_ui toneRose
class node_learner,node_external_agent,node_external_services toneIndigo
```

## Components

### Agent foundations

- [Agent loop](https://github.com/projnanda/5-day-course/blob/main/day-1/main.py): `day-1/main.py`
- [Interactive runner](https://github.com/projnanda/5-day-course/blob/main/day-1/interactive.py): `day-1/interactive.py`

### Memory and tools

- [Memory agent](https://github.com/projnanda/5-day-course/blob/main/day-2/main.py): `day-2/main.py`
- [Memory inspector](https://github.com/projnanda/5-day-course/blob/main/day-2/inspect_memory.py): `day-2/inspect_memory.py`

### Deployment and A2A

- [Agent REST API](https://github.com/projnanda/5-day-course/blob/main/day-3/main.py): `day-3/main.py`
- [Weather agent](https://github.com/projnanda/5-day-course/blob/main/agent_1/main.py): `agent_1/main.py`
- [Robot expert](https://github.com/projnanda/5-day-course/blob/main/agent_2/main.py): `agent_2/main.py`
- [A2A personal agent](https://github.com/projnanda/5-day-course/blob/main/day-4/main.py): `day-4/main.py`
- [A2A demo workflow](https://github.com/projnanda/5-day-course/blob/main/day-4/google_a2a.py): `day-4/google_a2a.py`
- [Agent registry](https://github.com/projnanda/5-day-course/blob/main/interface/server.js): `interface/server.js`

### Chat interface

- [Agent listing UI](https://github.com/projnanda/5-day-course/blob/main/interface/app/page.tsx): `interface/app/page.tsx`
- [Agent chat UI](https://github.com/projnanda/5-day-course/blob/main/interface/app/page.tsx): `interface/app/page.tsx`

### Other components

- **Learner**
- **Deployed peer agent**
- **LLM and tools**

## Connections

- Learner → Agent loop: asks questions (evidence: `README.md`)
- Learner → Memory agent: asks questions (evidence: `README.md`)
- Interactive runner → Agent loop: runs agent (evidence: `day-1/interactive.py`)
- Learner → Agent REST API: queries over HTTP (evidence: `README.md`)
- Agent REST API → LLM and tools: uses agent tools (evidence: `day-3/main.py`)
- Memory agent → LLM and tools: uses tools (evidence: `day-2/main.py`)
- Memory inspector → Memory agent: inspects stored memory (evidence: `day-2/inspect_memory.py`)
- Learner → A2A personal agent: sends A2A requests (evidence: `README.md`)
- A2A personal agent → Agent registry: fetches agents (evidence: `day-4/main.py`)
- A2A personal agent → Deployed peer agent: routes messages (evidence: `day-4/main.py`)
- Weather agent → Agent registry: fetches agents (evidence: `agent_1/main.py`)
- Weather agent → Deployed peer agent: routes A2A messages
- Robot expert → Agent registry: fetches agents (evidence: `agent_2/main.py`)
- Robot expert → Deployed peer agent: routes A2A messages
- A2A demo workflow → LLM and tools: runs agent tasks (evidence: `day-4/google_a2a.py`)
- Learner → Agent listing UI: browses agents
- Agent listing UI → Agent registry: lists agents
- Learner → Agent chat UI: chats with agents
- Agent chat UI → Deployed peer agent: sends messages
