# som8018/agentic-ai-deploy architecture

> Architecture diagram of the GitHub repository som8018/agentic-ai-deploy, 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/som8018/agentic-ai-deploy
- Repository: https://github.com/som8018/agentic-ai-deploy

## Overview

This repository is a small prototype for AI-assisted CI/CD decisions. Its two scripts illustrate a pre-deployment flow (inspect a Git diff, ask an LLM which tests to run and whether to deploy, then write a test-list file) and a post-deployment flow (fetch CPU/error metrics and ask an LLM whether to continue or roll back). The post-deployment script reports a recommendation; it does not implement rollback. The workflow file is present, but its contents were not sampled, so its connections are unverified.

Main entry points: [`agent_analyze.py`](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_analyze.py) (Diff analyzer), [`agent_post_deploy_check.py`](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_post_deploy_check.py) (Deployment checker), [`.github/workflows/agentic-deploy.yml`](https://github.com/som8018/agentic-ai-deploy/blob/main/.github/workflows/agentic-deploy.yml) (GitHub Actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Pipeline entry"]
  node_github_actions["GitHub Actions<br/>[agentic-deploy.yml]"]
end

subgraph group_predeploy["Pre-deployment analysis"]
  node_git[("Git history")]
  node_analyzer["Diff analyzer<br/>[agent_analyze.py]"]
  node_test_list["Test-list output<br/>[agent_analyze.py]"]
end

subgraph group_postdeploy["Post-deployment monitoring"]
  node_postcheck["Deployment checker"]
  node_decision["Deploy decision"]
end

node_openai{{"OpenAI API"}}
node_metrics_api{{"Metrics API"}}

node_github_actions -.->|"may invoke"| node_analyzer
node_github_actions -.->|"may invoke"| node_postcheck
node_analyzer -->|"reads diff"| node_git
node_analyzer -->|"requests advice"| node_openai
node_analyzer -->|"writes list"| node_test_list
node_postcheck -->|"fetches metrics"| node_metrics_api
node_postcheck -->|"requests evaluation"| node_openai
node_postcheck -->|"prints decision"| node_decision

click node_github_actions "https://github.com/som8018/agentic-ai-deploy/blob/main/.github/workflows/agentic-deploy.yml"
click node_analyzer "https://github.com/som8018/agentic-ai-deploy/blob/main/agent_analyze.py"
click node_test_list "https://github.com/som8018/agentic-ai-deploy/blob/main/agent_analyze.py"
click node_postcheck "https://github.com/som8018/agentic-ai-deploy/blob/main/agent_post_deploy_check.py"
click node_decision "https://github.com/som8018/agentic-ai-deploy/blob/main/agent_post_deploy_check.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_github_actions toneBlue
class node_git,node_analyzer,node_test_list toneAmber
class node_postcheck,node_decision,node_openai,node_metrics_api toneMint
```

## Components

### Pipeline entry

- [GitHub Actions](https://github.com/som8018/agentic-ai-deploy/blob/main/.github/workflows/agentic-deploy.yml): `.github/workflows/agentic-deploy.yml`

### Pre-deployment analysis

- **Git history**
- [Diff analyzer](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_analyze.py): `agent_analyze.py`
- [Test-list output](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_analyze.py): `agent_analyze.py`

### Post-deployment monitoring

- [Deployment checker](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_post_deploy_check.py): `agent_post_deploy_check.py`
- [Deploy decision](https://github.com/som8018/agentic-ai-deploy/blob/main/agent_post_deploy_check.py): `agent_post_deploy_check.py`

### Other components

- **OpenAI API**
- **Metrics API**

## Connections

- GitHub Actions → Diff analyzer: may invoke
- GitHub Actions → Deployment checker: may invoke
- Diff analyzer → Git history: reads diff (evidence: `agent_analyze.py`)
- Diff analyzer → OpenAI API: requests advice (evidence: `agent_analyze.py`)
- Diff analyzer → Test-list output: writes list (evidence: `agent_analyze.py`)
- Deployment checker → Metrics API: fetches metrics (evidence: `agent_post_deploy_check.py`)
- Deployment checker → OpenAI API: requests evaluation (evidence: `agent_post_deploy_check.py`)
- Deployment checker → Deploy decision: prints decision (evidence: `agent_post_deploy_check.py`)
