# karitselmuthu/devops_agent architecture

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

- Interactive diagram: https://gitdiagram.com/karitselmuthu/devops_agent
- Repository: https://github.com/karitselmuthu/devops_agent

## Overview

DevOps Agents Platform accepts workflow and application-deployment requests through a FastAPI service and web portal. Workflow requests are planned into sequential source-scan, CI/CD, infrastructure, and monitoring tasks; workers execute each task and return results to advance or stop the sequence. A separate proposal flow produces reviewable code patches. Application deployment has its own plan, approval, build, provision, and deletion lifecycle. README documents the product branches; edges for unsampled implementation details are omitted where source evidence is unavailable.

Main entry points: [`src/agents_platform/worker.py`](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/worker.py) (Task worker), [`src/agents_platform/api.py`](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/api.py) (FastAPI API), [`src/mcp_hub/api.py`](https://github.com/karitselmuthu/devops_agent/blob/main/src/mcp_hub/api.py) (HTTP tool hub), [`src/agents_platform/orchestrator.py`](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/orchestrator.py) (Workflow orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_api["FastAPI API<br/>[api.py]"]
  node_portal["Web portal<br/>[portal.py]"]
end

subgraph group_workflow["Workflow coordination"]
  node_planner["Workflow planner<br/>[planner.py]"]
  node_orchestrator["Workflow orchestrator<br/>[orchestrator.py]"]
  node_persistence[("Workflow persistence<br/>[persistence.py]")]
  node_broker["Task broker<br/>[messaging.py]"]
  node_worker["Task worker<br/>[worker.py]"]
  node_models["Task contracts<br/>[models.py]"]
end

subgraph group_agents["Workflow agents"]
  node_security["Source scanning<br/>[security_agent.py]"]
  node_code["Code proposals<br/>[code_agent.py]"]
  node_devops["CI/CD agent<br/>[devops_agent.py]"]
  node_infrastructure["Infrastructure agent"]
  node_monitoring["Monitoring agent"]
  node_source["Source checkout<br/>[source.py]"]
end

subgraph group_deploy["App deployment"]
  node_app_plans["Deployment planning<br/>[app_deployments.py]"]
  node_app_store[("Deployment state<br/>[app_store.py]")]
  node_app_runtime["Deployment worker<br/>[app_runtime.py]"]
  node_app_aws["AWS provisioning<br/>[app_aws.py]"]
end

subgraph group_integrations["Integrations"]
  node_hub["HTTP tool hub<br/>[api.py]"]
  node_github["GitHub services"]
  node_aws_services["AWS services"]
end

node_operator(("Operator"))

node_operator -->|"submits requests"| node_api
node_operator -->|"uses portal"| node_portal
node_api -->|"routes workflows"| node_orchestrator
node_api -->|"uses durable state"| node_persistence
node_api -->|"mounts tools"| node_hub
node_api -->|"creates plans"| node_app_plans
node_api -->|"manages plans"| node_app_store
node_portal -->|"calls API"| node_api
node_orchestrator -->|"creates plan"| node_planner
node_orchestrator -->|"publishes tasks"| node_broker
node_orchestrator -->|"uses contracts"| node_models
node_persistence -->|"creates plan"| node_planner
node_persistence -->|"stores contracts"| node_models
node_worker -->|"consumes tasks"| node_broker
node_worker -->|"publishes results"| node_broker
node_worker -->|"uses contracts"| node_models
node_worker -.->|"executes task"| node_security
node_worker -.->|"executes task"| node_code
node_worker -.->|"executes task"| node_devops
node_worker -.->|"executes task"| node_infrastructure
node_worker -.->|"executes task"| node_monitoring
node_security -.->|"scans checkout"| node_source
node_devops -->|"dispatches pipeline"| node_github
node_devops -.->|"dispatches pipeline"| node_aws_services
node_infrastructure -->|"inspects or updates"| node_aws_services
node_monitoring -.->|"checks metrics"| node_aws_services
node_hub -->|"reads run status"| node_devops
node_hub -->|"invokes inspection"| node_infrastructure
node_hub -->|"invokes metric check"| node_monitoring
node_hub -->|"exposes read tools"| node_aws_services
node_app_plans -->|"checks out source"| node_source
node_app_store -.->|"shares database layer"| node_persistence
node_app_runtime -->|"updates deployment state"| node_app_store
node_app_runtime -->|"runs AWS lifecycle"| node_app_aws
node_app_aws -->|"uses source checkout"| node_source
node_app_aws -->|"builds and provisions"| node_aws_services
node_app_plans -.->|"records plan"| node_app_store

click node_api "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/api.py"
click node_portal "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/portal.py"
click node_planner "https://github.com/karitselmuthu/devops_agent/blob/main/src/planning_agent/planner.py"
click node_orchestrator "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/orchestrator.py"
click node_persistence "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/persistence.py"
click node_broker "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_shared/messaging.py"
click node_worker "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/worker.py"
click node_models "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_shared/models.py"
click node_security "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/security_agent.py"
click node_code "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/code_agent.py"
click node_devops "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/devops_agent.py"
click node_infrastructure "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/infrastructure_agent.py"
click node_monitoring "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/monitoring_agent.py"
click node_source "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/source.py"
click node_app_plans "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_deployments.py"
click node_app_store "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_store.py"
click node_app_runtime "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_runtime.py"
click node_app_aws "https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_aws.py"
click node_hub "https://github.com/karitselmuthu/devops_agent/blob/main/src/mcp_hub/api.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_api,node_portal toneBlue
class node_planner,node_orchestrator,node_persistence,node_broker,node_worker,node_models toneAmber
class node_security,node_code,node_devops,node_infrastructure,node_monitoring,node_source toneMint
class node_app_plans,node_app_store,node_app_runtime,node_app_aws toneRose
class node_hub,node_github,node_aws_services,node_operator toneIndigo
```

## Components

### User entry

- [FastAPI API](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/api.py): `src/agents_platform/api.py`
- [Web portal](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/portal.py): `src/agents_platform/portal.py`

### Workflow coordination

- [Workflow planner](https://github.com/karitselmuthu/devops_agent/blob/main/src/planning_agent/planner.py): `src/planning_agent/planner.py`
- [Workflow orchestrator](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/orchestrator.py): `src/agents_platform/orchestrator.py`
- [Workflow persistence](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/persistence.py): `src/agents_platform/persistence.py`
- [Task broker](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_shared/messaging.py): `src/agents_shared/messaging.py`
- [Task worker](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/worker.py): `src/agents_platform/worker.py`
- [Task contracts](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_shared/models.py): `src/agents_shared/models.py`

### Workflow agents

- [Source scanning](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/security_agent.py): `src/agents/security_agent.py`
- [Code proposals](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/code_agent.py): `src/agents/code_agent.py`
- [CI/CD agent](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/devops_agent.py): `src/agents/devops_agent.py`
- [Infrastructure agent](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/infrastructure_agent.py): `src/agents/infrastructure_agent.py`
- [Monitoring agent](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents/monitoring_agent.py): `src/agents/monitoring_agent.py`
- [Source checkout](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/source.py): `src/agents_platform/source.py`

### App deployment

- [Deployment planning](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_deployments.py): `src/agents_platform/app_deployments.py`
- [Deployment state](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_store.py): `src/agents_platform/app_store.py`
- [Deployment worker](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_runtime.py): `src/agents_platform/app_runtime.py`
- [AWS provisioning](https://github.com/karitselmuthu/devops_agent/blob/main/src/agents_platform/app_aws.py): `src/agents_platform/app_aws.py`

### Integrations

- [HTTP tool hub](https://github.com/karitselmuthu/devops_agent/blob/main/src/mcp_hub/api.py): `src/mcp_hub/api.py`
- **GitHub services**
- **AWS services**

### Other components

- **Operator**

## Connections

- Operator → FastAPI API: submits requests (evidence: `README.md`)
- Operator → Web portal: uses portal (evidence: `README.md`)
- FastAPI API → Workflow orchestrator: routes workflows (evidence: `src/agents_platform/api.py`)
- FastAPI API → Workflow persistence: uses durable state (evidence: `src/agents_platform/api.py`)
- FastAPI API → HTTP tool hub: mounts tools (evidence: `src/agents_platform/api.py`)
- FastAPI API → Deployment planning: creates plans (evidence: `src/agents_platform/api.py`)
- FastAPI API → Deployment state: manages plans (evidence: `src/agents_platform/api.py`)
- Web portal → FastAPI API: calls API (evidence: `README.md`)
- Workflow orchestrator → Workflow planner: creates plan (evidence: `src/agents_platform/orchestrator.py`)
- Workflow orchestrator → Task broker: publishes tasks (evidence: `src/agents_platform/orchestrator.py`)
- Workflow orchestrator → Task contracts: uses contracts (evidence: `src/agents_platform/orchestrator.py`)
- Workflow persistence → Workflow planner: creates plan (evidence: `src/agents_platform/persistence.py`)
- Workflow persistence → Task contracts: stores contracts (evidence: `src/agents_platform/persistence.py`)
- Task worker → Task broker: consumes tasks (evidence: `src/agents_platform/worker.py`)
- Task worker → Task broker: publishes results (evidence: `src/agents_platform/worker.py`)
- Task worker → Task contracts: uses contracts (evidence: `src/agents_platform/worker.py`)
- Task worker → Source scanning: executes task
- Task worker → Code proposals: executes task
- Task worker → CI/CD agent: executes task
- Task worker → Infrastructure agent: executes task
- Task worker → Monitoring agent: executes task
- Source scanning → Source checkout: scans checkout
- CI/CD agent → GitHub services: dispatches pipeline (evidence: `src/agents/devops_agent.py`)
- CI/CD agent → AWS services: dispatches pipeline
- Infrastructure agent → AWS services: inspects or updates (evidence: `src/agents/infrastructure_agent.py`)
- Monitoring agent → AWS services: checks metrics
- HTTP tool hub → CI/CD agent: reads run status (evidence: `src/mcp_hub/api.py`)
- HTTP tool hub → Infrastructure agent: invokes inspection (evidence: `src/mcp_hub/api.py`)
- HTTP tool hub → Monitoring agent: invokes metric check (evidence: `src/mcp_hub/api.py`)
- HTTP tool hub → AWS services: exposes read tools (evidence: `README.md`)
- Deployment planning → Source checkout: checks out source (evidence: `src/agents_platform/app_deployments.py`)
- Deployment state → Workflow persistence: shares database layer (evidence: `src/agents_platform/app_store.py`)
- Deployment worker → Deployment state: updates deployment state (evidence: `src/agents_platform/app_runtime.py`)
- Deployment worker → AWS provisioning: runs AWS lifecycle (evidence: `src/agents_platform/app_runtime.py`)
- AWS provisioning → Source checkout: uses source checkout (evidence: `src/agents_platform/app_aws.py`)
- AWS provisioning → AWS services: builds and provisions (evidence: `README.md`)
- Deployment planning → Deployment state: records plan (evidence: `src/agents_platform/app_store.py`)
