# lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant architecture

> Architecture diagram of the GitHub repository lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant
- Repository: https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant

## Overview

DataOps Agent is a conversational incident-diagnosis assistant for data-platform engineers. The primary workflow is browser chat through a same-origin FastAPI proxy and A2A to the agent, which inspects pipeline status and run history, compares failed and successful schemas, grounds guidance in runbooks, and can produce a visual incident diagram and interactive response. The README also documents cross-session memory and isolated Python analysis. External integrations and capability branches are shown; some tool wiring is documented but not visible in the sampled agent excerpt.

Main entry points: [`app/agent.py`](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/agent.py) (DataOps agent), [`app/fast_api_app.py`](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/fast_api_app.py) (FastAPI app), [`frontend/main.py`](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/frontend/main.py) (Chat proxy), [`app/app_utils/reasoning_engine_adapter.py`](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/reasoning_engine_adapter.py) (Reasoning adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_frontend["Chat proxy<br/>[main.py]"]
  node_a2ui["A2UI rendering<br/>[a2ui_utils.py]"]
end

subgraph group_serving["Agent serving"]
  node_agent_platform["Agent Platform"]
  node_a2a_routes["A2A routes<br/>[a2a.py]"]
  node_fastapi["FastAPI app<br/>[fast_api_app.py]"]
  node_services["Shared services<br/>[services.py]"]
  node_reasoning_adapter["Reasoning adapter"]
end

subgraph group_diagnosis["Incident diagnosis"]
  node_agent["DataOps agent<br/>[agent.py]"]
end

subgraph group_integrations["Cloud capabilities"]
  node_firestore[("Pipeline store")]
  node_rag["Runbook retrieval"]
  node_sandbox["Python sandbox"]
  node_image_model["Image generation"]
  node_gcs[("Cloud Storage")]
  node_memory[("Memory Bank")]
  node_artifacts[("Artifact service")]
end

node_engineer(("Engineer"))

node_engineer -->|"sends chat"| node_frontend
node_frontend -->|"forwards A2A"| node_agent_platform
node_agent_platform -->|"dispatches RPC"| node_a2a_routes
node_a2a_routes -->|"runs agent"| node_agent
node_agent -->|"queries pipeline data"| node_firestore
node_agent -.->|"retrieves procedures"| node_rag
node_agent -.->|"executes analysis"| node_sandbox
node_agent -.->|"requests diagram"| node_image_model
node_agent -.->|"uploads diagram"| node_gcs
node_agent -->|"saves image"| node_artifacts
node_agent -.->|"stores session findings"| node_memory
node_agent -->|"emits UI data"| node_a2ui
node_frontend -->|"renders cards"| node_a2ui
node_fastapi -->|"attaches routes"| node_a2a_routes
node_fastapi -->|"attaches routes"| node_reasoning_adapter
node_reasoning_adapter -->|"dispatches methods"| node_agent
node_reasoning_adapter -->|"gets shared services"| node_services
node_fastapi -->|"gets shared services"| node_services

click node_frontend "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/frontend/main.py"
click node_agent "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/agent.py"
click node_a2a_routes "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/a2a.py"
click node_fastapi "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/fast_api_app.py"
click node_a2ui "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/a2ui_utils.py"
click node_services "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/services.py"
click node_reasoning_adapter "https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/reasoning_engine_adapter.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_frontend,node_a2ui toneBlue
class node_agent_platform,node_a2a_routes,node_fastapi,node_services,node_reasoning_adapter toneAmber
class node_agent toneMint
class node_firestore,node_rag,node_sandbox,node_image_model,node_gcs,node_memory,node_artifacts toneRose
class node_engineer toneIndigo
```

## Components

### Web interface

- [Chat proxy](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/frontend/main.py): `frontend/main.py`
- [A2UI rendering](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/a2ui_utils.py): `app/a2ui_utils.py`

### Agent serving

- **Agent Platform**
- [A2A routes](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/a2a.py): `app/app_utils/a2a.py`
- [FastAPI app](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/fast_api_app.py): `app/fast_api_app.py`
- [Shared services](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/services.py): `app/app_utils/services.py`
- [Reasoning adapter](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/app_utils/reasoning_engine_adapter.py): `app/app_utils/reasoning_engine_adapter.py`

### Incident diagnosis

- [DataOps agent](https://github.com/lawrence-anthony/buildwithgemini-data-pipeline-troubleshooting-assistant/blob/main/app/agent.py): `app/agent.py`

### Cloud capabilities

- **Pipeline store**
- **Runbook retrieval**
- **Python sandbox**
- **Image generation**
- **Cloud Storage**
- **Memory Bank**
- **Artifact service**

### Other components

- **Engineer**

## Connections

- Engineer → Chat proxy: sends chat
- Chat proxy → Agent Platform: forwards A2A
- Agent Platform → A2A routes: dispatches RPC
- A2A routes → DataOps agent: runs agent
- DataOps agent → Pipeline store: queries pipeline data
- DataOps agent → Runbook retrieval: retrieves procedures
- DataOps agent → Python sandbox: executes analysis
- DataOps agent → Image generation: requests diagram
- DataOps agent → Cloud Storage: uploads diagram
- DataOps agent → Artifact service: saves image
- DataOps agent → Memory Bank: stores session findings
- DataOps agent → A2UI rendering: emits UI data
- Chat proxy → A2UI rendering: renders cards
- FastAPI app → A2A routes: attaches routes
- FastAPI app → Reasoning adapter: attaches routes
- Reasoning adapter → DataOps agent: dispatches methods
- Reasoning adapter → Shared services: gets shared services
- FastAPI app → Shared services: gets shared services
