# 050903/vertex-ai-reasoning-agent-demo architecture

> Architecture diagram of the GitHub repository 050903/vertex-ai-reasoning-agent-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/050903/vertex-ai-reasoning-agent-demo
- Repository: https://github.com/050903/vertex-ai-reasoning-agent-demo

## Overview

##### Project type and purpose
- This is a small demo application that combines a desktop GUI (built with PyQt6) and a cloud-based AI agent (deployed on Google Vertex AI Reasoning Engines).
- The purpose is to show how to deploy a custom “addition agent” to Vertex AI and interact with it via a local PyQt6 interface.

##### File structure
- Top-level files only, no subdirectories:
- addition_agent.py – Python script to define and deploy the add-two-numbers agent.
- reasoning_ui.py – PyQt6 GUI application that prompts the user for input and queries the deployed agent.
- cli.txt – Sample command to launch the GUI.
- requirements.txt – Lists Python dependencies (PyQt6, google-cloud-aiplatform, etc.).
- GEMINI.md, LICENSE, README.md – documentation and license.

##### README for additional insights
- Core workflow:
a) Run addition_agent.py → uses google-cloud-aiplatform client library → deploys an agent to Vertex AI.
b) Run reasoning_ui.py → displays a window where the user enters “x y” → sends a query to the deployed Vertex AI agent → displays the result.
- Hard-coded project/region/engine IDs in addition_agent.py demonstrate a single-engine deployment.

##### Elements
- “PyQt6 GUI (reasoning_ui.py)”
- “Addition Agent Deployer (addition_agent.py)”
- “Vertex AI Reasoning Engine (AdditionAgent)”
- “Google Cloud IAM / Auth”
- “Deploy Agent API Call”
- “Query: add x y”
- “Response: sum”
- Technologies next to each component

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User"]:::actor

    subgraph "Local Client"
        GUI["PyQt6 GUI\n(reasoning_ui.py)"]:::local
        Deployer["Addition Agent Deployer\n(addition_agent.py)"]:::local
        CLI["Sample CLI Command\n(cli.txt)"]:::local
        SDK["Python Dependencies\n(requirements.txt)"]:::local
    end

    subgraph "Google Cloud"
        IAM["Google Cloud IAM / Auth"]:::auth
        Vertex["Vertex AI Reasoning Engine\n(AdditionAgent)"]:::cloud
    end

    CLI -->|"Launch GUI"| GUI
    Deployer --> IAM
    Deployer -->|"Deploy Agent API Call"| Vertex
    GUI --> IAM
    GUI -->|"Query: add x y"| Vertex
    Vertex -->|"Response: sum"| GUI
    GUI -->|"Display result"| User

    click GUI "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/reasoning_ui.py"
    click Deployer "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/addition_agent.py"
    click CLI "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/cli.txt"
    click SDK "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/requirements.txt"
    click README "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/README.md"
    click GEMINI "https://github.com/050903/vertex-ai-reasoning-agent-demo/blob/main/GEMINI.md"
    click LICENSE "https://github.com/050903/vertex-ai-reasoning-agent-demo/tree/main/LICENSE"

    classDef local fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef cloud fill:#FFA500,stroke:#000,stroke-width:1px
    classDef auth fill:#f9f9f9,stroke:#000,stroke-dasharray:5 5
    classDef actor fill:#98FB98,stroke:#000,stroke-width:1px
```
