# nov05/gcp-adk-challenge-lab architecture

> Architecture diagram of the GitHub repository nov05/gcp-adk-challenge-lab, 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/nov05/gcp-adk-challenge-lab
- Repository: https://github.com/nov05/gcp-adk-challenge-lab

## Overview

Paint Agent is a conversational painting-project planner. The user enters through Chainlit; the deployed agent discovers products, stores the selection, gathers room/color choices, calculates wall area, and explains paint quantity and cost. The graph preserves the documented search, visual-product, session-state, room-planning, coverage, and pricing capabilities. Source excerpts show the agent/tool registrations and UI streaming; deployment internals and the search index contents are not shown.

Main entry points: [`paint_agent/agent.py`](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/agent.py) (Product selector), [`chainlit_ui/app.py`](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/chainlit_ui/app.py) (Chat interface), [`paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py`](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py) (Coverage and pricing), [`paint_agent/sub_agents/search_agent/agent.py`](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/search_agent/agent.py) (Paint search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_chainlit["Chat interface<br/>[app.py]"]
  node_image_render["Image rendering<br/>[app.py]"]
end

subgraph group_agents["Agent workflow"]
  node_root["Product selector<br/>[agent.py]"]
  node_product_search["Paint search<br/>[agent.py]"]
  node_room_planner["Room and color planning<br/>[agent.py]"]
  node_coverage_agent["Coverage and pricing<br/>[agent.py]"]
  node_coverage_math["Wall area calculator<br/>[tools.py]"]
end

subgraph group_state["Session and logging"]
  node_session_tool["Session values<br/>[tools.py]"]
  node_callbacks["Model callbacks"]
end

subgraph group_integrations["External services"]
  node_agent_engine["Agent Engine"]
  node_vertex_search["Vertex AI Search"]
  node_cloud_logging["Cloud Logging"]
end

node_user(("Paint shopper"))

node_user -->|"sends messages"| node_chainlit
node_chainlit -->|"streams queries"| node_agent_engine
node_agent_engine -.->|"runs agent"| node_root
node_root -->|"searches products"| node_product_search
node_product_search -->|"retrieves paint data"| node_vertex_search
node_root -->|"stores selection"| node_session_tool
node_root -->|"transfers control"| node_room_planner
node_room_planner -->|"transfers for calculation"| node_coverage_agent
node_coverage_agent -->|"calculates wall area"| node_coverage_math
node_chainlit -->|"converts image tags"| node_image_render
node_root -->|"registers callbacks"| node_callbacks
node_coverage_agent -->|"registers callbacks"| node_callbacks
node_root -->|"configures logging"| node_cloud_logging

click node_chainlit "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/chainlit_ui/app.py"
click node_image_render "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/chainlit_ui/app.py"
click node_root "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/agent.py"
click node_product_search "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/search_agent/agent.py"
click node_session_tool "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/tools.py"
click node_room_planner "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/agent.py"
click node_coverage_agent "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py"
click node_coverage_math "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/tools.py"
click node_callbacks "https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/callback_logging.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_chainlit,node_image_render toneBlue
class node_root,node_product_search,node_room_planner,node_coverage_agent,node_coverage_math toneAmber
class node_session_tool,node_callbacks toneMint
class node_agent_engine,node_vertex_search,node_cloud_logging toneRose
class node_user toneIndigo
```

## Components

### User interface

- [Chat interface](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/chainlit_ui/app.py): `chainlit_ui/app.py`
- [Image rendering](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/chainlit_ui/app.py): `chainlit_ui/app.py`

### Agent workflow

- [Product selector](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/agent.py): `paint_agent/agent.py`
- [Paint search](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/search_agent/agent.py): `paint_agent/sub_agents/search_agent/agent.py`
- [Room and color planning](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/agent.py): `paint_agent/sub_agents/room_planner/agent.py`
- [Coverage and pricing](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py): `paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py`
- [Wall area calculator](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/tools.py): `paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/tools.py`

### Session and logging

- [Session values](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/tools.py): `paint_agent/tools.py`
- [Model callbacks](https://github.com/nov05/gcp-adk-challenge-lab/blob/main/paint_agent/callback_logging.py): `paint_agent/callback_logging.py`

### External services

- **Agent Engine**
- **Vertex AI Search**
- **Cloud Logging**

### Other components

- **Paint shopper**

## Connections

- Paint shopper → Chat interface: sends messages (evidence: `chainlit_ui/app.py`)
- Chat interface → Agent Engine: streams queries (evidence: `chainlit_ui/app.py`)
- Agent Engine → Product selector: runs agent (evidence: `README.md`)
- Product selector → Paint search: searches products (evidence: `paint_agent/agent.py`)
- Paint search → Vertex AI Search: retrieves paint data (evidence: `paint_agent/sub_agents/search_agent/agent.py`)
- Product selector → Session values: stores selection (evidence: `paint_agent/agent.py`)
- Product selector → Room and color planning: transfers control (evidence: `paint_agent/agent.py`)
- Room and color planning → Coverage and pricing: transfers for calculation (evidence: `paint_agent/sub_agents/room_planner/agent.py`)
- Coverage and pricing → Wall area calculator: calculates wall area (evidence: `paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py`)
- Chat interface → Image rendering: converts image tags (evidence: `chainlit_ui/app.py`)
- Product selector → Model callbacks: registers callbacks (evidence: `paint_agent/agent.py`)
- Coverage and pricing → Model callbacks: registers callbacks (evidence: `paint_agent/sub_agents/room_planner/sub_agents/coverage_calculator/agent.py`)
- Product selector → Cloud Logging: configures logging (evidence: `paint_agent/agent.py`)
