# umanagalla27/aegis-enterprise-ai architecture

> Architecture diagram of the GitHub repository umanagalla27/aegis-enterprise-ai, 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/umanagalla27/aegis-enterprise-ai
- Repository: https://github.com/umanagalla27/aegis-enterprise-ai

## Overview

Aegis is an AIOps/SRE platform whose user-facing workflow accepts telemetry or an incident through FastAPI, detects anomalies or diagnoses root causes, and can route remediation through a stateful agent workflow with security checks and human approval. Separate capabilities provide hybrid and topology-aware retrieval, model foundations, and a telemetry-to-reliability-marts ETL. The README documents additional streaming and evaluation features. Some links below rely on README-level architecture claims; unsampled implementations and integrations are not inferred beyond those claims.

Main entry points: [`src/api/main.py`](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/api/main.py) (FastAPI backend), [`src/agents/graph.py`](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/graph.py) (Agent workflow), [`src/rag/hybrid_retriever.py`](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/hybrid_retriever.py) (Hybrid retrieval), [`data_platform/airflow/dags/daily_sre_etl.py`](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/airflow/dags/daily_sre_etl.py) (SRE ETL orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_serving["Serving and AIOps"]
  node_api["FastAPI backend<br/>[main.py]"]
  node_dashboard["Control center<br/>[dashboard.py]"]
  node_anomaly["Anomaly engine<br/>[anomaly_engine.py]"]
  node_prometheus["Prometheus metrics"]
  node_otel["OpenTelemetry"]
  node_mlflow["MLflow tracking<br/>[mlflow_tracker.py]"]
end

subgraph group_agents["Agent and Security"]
  node_agentgraph["Agent workflow<br/>[graph.py]"]
  node_agentstate["Workflow state<br/>[state.py]"]
  node_rca["Incident diagnosis<br/>[rca_agent.py]"]
  node_mcp["MCP tools<br/>[server.py]"]
  node_injection["Injection defense"]
  node_redactor["PII redaction"]
  node_allowlist["Tool authorization<br/>[tool_allowlist.py]"]
end

subgraph group_retrieval["Retrieval and Models"]
  node_retriever["Hybrid retrieval"]
  node_graph_rag["Topology retrieval<br/>[graph_rag.py]"]
  node_chunking["Document chunking<br/>[chunking.py]"]
  node_queryrewrite["Query rewriting<br/>[query_rewriter.py]"]
  node_multimodal["Multimodal retrieval<br/>[multimodal_rag.py]"]
  node_transformer["Transformer foundations"]
  node_prompt["Prompt engine<br/>[prompt_engine.py]"]
  node_vllm["LLM serving<br/>[vllm_serving.py]"]
end

subgraph group_data["Data Platform"]
  node_producer["Kafka producer<br/>[producer.py]"]
  node_consumer["Kafka consumer<br/>[consumer.py]"]
  node_spark["Telemetry aggregation"]
  node_airflow["SRE ETL orchestration<br/>[daily_sre_etl.py]"]
  node_dbt["Reliability marts<br/>[dbt_runner.py]"]
end

subgraph group_quality["Evaluation"]
  node_ragas["RAG evaluation<br/>[ragas_evaluator.py]"]
  node_agenteval["Agent evaluation<br/>[agent_evaluator.py]"]
  node_evalrunner["AIOps evaluation runner<br/>[run_aiops_eval.py]"]
end

node_operator(("SRE operator"))

node_operator -->|"submits incident"| node_api
node_api -->|"serves dashboard"| node_dashboard
node_api -->|"checks telemetry"| node_anomaly
node_api -->|"requests diagnosis"| node_rca
node_api -->|"inspects text"| node_injection
node_api -->|"redacts PII"| node_redactor
node_api -->|"exposes metrics"| node_prometheus
node_api -->|"instruments requests"| node_otel
node_api -.->|"tracks experiments"| node_mlflow
node_api -.->|"starts workflow"| node_agentgraph
node_agentgraph -->|"updates state"| node_agentstate
node_agentgraph -->|"checks prompts"| node_injection
node_agentgraph -->|"redacts input"| node_redactor
node_agentgraph -->|"authorizes tools"| node_allowlist
node_agentgraph -->|"calls tools"| node_mcp
node_agentgraph -.->|"diagnoses incident"| node_rca
node_mcp -->|"searches runbooks"| node_retriever
node_mcp -->|"queries topology"| node_graph_rag
node_api -.->|"serves RAG"| node_retriever
node_api -.->|"serves topology"| node_graph_rag
node_chunking -.->|"provides chunks"| node_retriever
node_queryrewrite -.->|"rewrites queries"| node_retriever
node_multimodal -.->|"extends retrieval"| node_retriever
node_transformer -.->|"supports serving"| node_vllm
node_prompt -.->|"prepares prompts"| node_vllm
node_operator -.->|"emits telemetry"| node_producer
node_producer -->|"streams events"| node_consumer
node_consumer -.->|"feeds batches"| node_spark
node_api -->|"triggers ETL"| node_airflow
node_airflow -->|"aggregates telemetry"| node_spark
node_airflow -->|"runs models"| node_dbt
node_spark -->|"returns metrics"| node_airflow
node_api -->|"runs evaluation"| node_ragas
node_api -->|"runs benchmark"| node_evalrunner
node_evalrunner -->|"evaluates diagnosis"| node_rca
node_evalrunner -->|"evaluates detection"| node_anomaly
node_agenteval -.->|"benchmarks workflow"| node_agentgraph

click node_api "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/api/main.py"
click node_dashboard "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/api/dashboard.py"
click node_anomaly "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/anomaly_engine.py"
click node_prometheus "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/prometheus_exporter.py"
click node_otel "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/otel_instrumentation.py"
click node_mlflow "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/mlflow_tracker.py"
click node_agentgraph "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/graph.py"
click node_agentstate "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/state.py"
click node_rca "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/rca_agent.py"
click node_mcp "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/mcp/server.py"
click node_injection "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/injection_defense.py"
click node_redactor "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/presidio_redactor.py"
click node_allowlist "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/tool_allowlist.py"
click node_retriever "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/hybrid_retriever.py"
click node_graph_rag "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/graph_rag.py"
click node_chunking "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/chunking.py"
click node_queryrewrite "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/query_rewriter.py"
click node_multimodal "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/multimodal_rag.py"
click node_transformer "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/transformer_scratch.py"
click node_prompt "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/prompt_engine.py"
click node_vllm "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/vllm_serving.py"
click node_producer "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/kafka/producer.py"
click node_consumer "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/kafka/consumer.py"
click node_spark "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/spark/batch_aggregator.py"
click node_airflow "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/airflow/dags/daily_sre_etl.py"
click node_dbt "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/dbt_project/dbt_runner.py"
click node_ragas "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/ragas_evaluator.py"
click node_agenteval "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/agent_evaluator.py"
click node_evalrunner "https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/run_aiops_eval.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_dashboard,node_anomaly,node_prometheus,node_otel,node_mlflow toneBlue
class node_agentgraph,node_agentstate,node_rca,node_mcp,node_injection,node_redactor,node_allowlist toneAmber
class node_retriever,node_graph_rag,node_chunking,node_queryrewrite,node_multimodal,node_transformer,node_prompt,node_vllm toneMint
class node_producer,node_consumer,node_spark,node_airflow,node_dbt toneRose
class node_ragas,node_agenteval,node_evalrunner,node_operator toneIndigo
```

## Components

### Serving and AIOps

- [FastAPI backend](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/api/main.py): `src/api/main.py`
- [Control center](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/api/dashboard.py): `src/api/dashboard.py`
- [Anomaly engine](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/anomaly_engine.py): `src/observability/anomaly_engine.py`
- [Prometheus metrics](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/prometheus_exporter.py): `src/observability/prometheus_exporter.py`
- [OpenTelemetry](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/otel_instrumentation.py): `src/observability/otel_instrumentation.py`
- [MLflow tracking](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/observability/mlflow_tracker.py): `src/observability/mlflow_tracker.py`

### Agent and Security

- [Agent workflow](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/graph.py): `src/agents/graph.py`
- [Workflow state](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/state.py): `src/agents/state.py`
- [Incident diagnosis](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/agents/rca_agent.py): `src/agents/rca_agent.py`
- [MCP tools](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/mcp/server.py): `src/mcp/server.py`
- [Injection defense](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/injection_defense.py): `src/security/injection_defense.py`
- [PII redaction](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/presidio_redactor.py): `src/security/presidio_redactor.py`
- [Tool authorization](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/security/tool_allowlist.py): `src/security/tool_allowlist.py`

### Retrieval and Models

- [Hybrid retrieval](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/hybrid_retriever.py): `src/rag/hybrid_retriever.py`
- [Topology retrieval](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/graph_rag.py): `src/rag/graph_rag.py`
- [Document chunking](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/chunking.py): `src/rag/chunking.py`
- [Query rewriting](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/query_rewriter.py): `src/rag/query_rewriter.py`
- [Multimodal retrieval](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/rag/multimodal_rag.py): `src/rag/multimodal_rag.py`
- [Transformer foundations](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/transformer_scratch.py): `src/models/transformer_scratch.py`
- [Prompt engine](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/prompt_engine.py): `src/models/prompt_engine.py`
- [LLM serving](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/src/models/vllm_serving.py): `src/models/vllm_serving.py`

### Data Platform

- [Kafka producer](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/kafka/producer.py): `data_platform/kafka/producer.py`
- [Kafka consumer](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/kafka/consumer.py): `data_platform/kafka/consumer.py`
- [Telemetry aggregation](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/spark/batch_aggregator.py): `data_platform/spark/batch_aggregator.py`
- [SRE ETL orchestration](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/airflow/dags/daily_sre_etl.py): `data_platform/airflow/dags/daily_sre_etl.py`
- [Reliability marts](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/data_platform/dbt_project/dbt_runner.py): `data_platform/dbt_project/dbt_runner.py`

### Evaluation

- [RAG evaluation](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/ragas_evaluator.py): `eval/ragas_evaluator.py`
- [Agent evaluation](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/agent_evaluator.py): `eval/agent_evaluator.py`
- [AIOps evaluation runner](https://github.com/umanagalla27/aegis-enterprise-ai/blob/main/eval/run_aiops_eval.py): `eval/run_aiops_eval.py`

### Other components

- **SRE operator**

## Connections

- SRE operator → FastAPI backend: submits incident
- FastAPI backend → Control center: serves dashboard (evidence: `src/api/main.py`)
- FastAPI backend → Anomaly engine: checks telemetry (evidence: `src/api/main.py`)
- FastAPI backend → Incident diagnosis: requests diagnosis (evidence: `src/api/main.py`)
- FastAPI backend → Injection defense: inspects text (evidence: `src/api/main.py`)
- FastAPI backend → PII redaction: redacts PII (evidence: `src/api/main.py`)
- FastAPI backend → Prometheus metrics: exposes metrics (evidence: `src/api/main.py`)
- FastAPI backend → OpenTelemetry: instruments requests
- FastAPI backend → MLflow tracking: tracks experiments
- FastAPI backend → Agent workflow: starts workflow
- Agent workflow → Workflow state: updates state (evidence: `src/agents/graph.py`)
- Agent workflow → Injection defense: checks prompts (evidence: `src/agents/graph.py`)
- Agent workflow → PII redaction: redacts input (evidence: `src/agents/graph.py`)
- Agent workflow → Tool authorization: authorizes tools (evidence: `src/agents/graph.py`)
- Agent workflow → MCP tools: calls tools (evidence: `src/agents/graph.py`)
- Agent workflow → Incident diagnosis: diagnoses incident
- MCP tools → Hybrid retrieval: searches runbooks (evidence: `src/mcp/server.py`)
- MCP tools → Topology retrieval: queries topology (evidence: `src/mcp/server.py`)
- FastAPI backend → Hybrid retrieval: serves RAG
- FastAPI backend → Topology retrieval: serves topology
- Document chunking → Hybrid retrieval: provides chunks
- Query rewriting → Hybrid retrieval: rewrites queries
- Multimodal retrieval → Hybrid retrieval: extends retrieval
- Transformer foundations → LLM serving: supports serving
- Prompt engine → LLM serving: prepares prompts
- SRE operator → Kafka producer: emits telemetry
- Kafka producer → Kafka consumer: streams events (evidence: `data_platform/kafka/consumer.py`)
- Kafka consumer → Telemetry aggregation: feeds batches
- FastAPI backend → SRE ETL orchestration: triggers ETL (evidence: `src/api/main.py`)
- SRE ETL orchestration → Telemetry aggregation: aggregates telemetry (evidence: `data_platform/airflow/dags/daily_sre_etl.py`)
- SRE ETL orchestration → Reliability marts: runs models (evidence: `data_platform/airflow/dags/daily_sre_etl.py`)
- Telemetry aggregation → SRE ETL orchestration: returns metrics (evidence: `data_platform/airflow/dags/daily_sre_etl.py`)
- FastAPI backend → RAG evaluation: runs evaluation (evidence: `src/api/main.py`)
- FastAPI backend → AIOps evaluation runner: runs benchmark (evidence: `src/api/main.py`)
- AIOps evaluation runner → Incident diagnosis: evaluates diagnosis (evidence: `eval/run_aiops_eval.py`)
- AIOps evaluation runner → Anomaly engine: evaluates detection (evidence: `eval/run_aiops_eval.py`)
- Agent evaluation → Agent workflow: benchmarks workflow
