# m524security/sentrix architecture

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

- Interactive diagram: https://gitdiagram.com/m524security/sentrix
- Repository: https://github.com/m524security/sentrix

## Overview

SENTRIX is an autonomous backup-recovery readiness system: it ingests fleet state and telemetry, reasons over risk and history, predicts near-term breaches, scores recoverability from decaying restore evidence, and takes or recommends action. The agent publishes cycles to an API that serves operational views to a React dashboard. The graph preserves the documented ingestion, memory, recovery-evidence, forecasting, safety, and dashboard capabilities. Some subsystem links are documented rather than shown in sampled implementation excerpts; those are marked dashed.

Main entry points: [`agent/main.py`](https://github.com/m524security/sentrix/blob/main/agent/main.py) (Agent cycle), [`api/main.py`](https://github.com/m524security/sentrix/blob/main/api/main.py) (Control API), [`agent/reasoning/reasoning_core.py`](https://github.com/m524security/sentrix/blob/main/agent/reasoning/reasoning_core.py) (Risk reasoning), [`agent/agency/tool_agent.py`](https://github.com/m524security/sentrix/blob/main/agent/agency/tool_agent.py) (Tool investigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Fleet ingestion"]
  node_sources["Fleet sources<br/>[fleet_source.py]"]
  node_loghub["LogHub engine<br/>[loghub_engine.py]"]
  node_realtime["Telemetry gateway"]
  node_adapters["Telemetry adapters"]
end

subgraph group_agent["Agent reasoning"]
  node_agentloop["Agent cycle<br/>[main.py]"]
  node_reasoning["Risk reasoning<br/>[reasoning_core.py]"]
  node_providers["LLM providers<br/>[llm_providers.py]"]
  node_memory["Decision memory<br/>[decision_memory.py]"]
  node_incidentrag["Incident recall<br/>[incident_rag.py]"]
  node_forecast["RPO forecasting"]
  node_agency["Tool investigation<br/>[tool_agent.py]"]
end

subgraph group_recovery["Recovery evidence"]
  node_confidence["Recovery confidence<br/>[confidence.py]"]
  node_ledger[("Evidence ledger<br/>[evidence_ledger.py]")]
  node_scheduler["Restore scheduler"]
end

subgraph group_service["API and actions"]
  node_actions["Action executor<br/>[executor.py]"]
  node_api["Control API<br/>[main.py]"]
  node_persistence[("Operational persistence<br/>[persistence.py]")]
end

subgraph group_ui["Dashboard"]
  node_dashboard["Dashboard views<br/>[App.js]"]
  node_apiclient["Dashboard API client<br/>[lib.js]"]
end

node_operator(("Engineer"))

node_agentloop -->|"loads fleet"| node_sources
node_sources -->|"uses simulation data"| node_loghub
node_operator -->|"sends telemetry"| node_realtime
node_realtime -->|"parses telemetry"| node_adapters
node_agentloop -->|"reasons over assets"| node_reasoning
node_reasoning -->|"requests model output"| node_providers
node_reasoning -->|"recalls history"| node_memory
node_agency -->|"uses decision history"| node_memory
node_agency -.->|"recalls incidents"| node_incidentrag
node_agentloop -->|"refines assessments"| node_agency
node_agentloop -->|"forecasts breaches"| node_forecast
node_forecast -->|"reconstructs history"| node_loghub
node_agentloop -->|"scores readiness"| node_confidence
node_confidence -.->|"reads restore evidence"| node_ledger
node_agentloop -->|"plans restore tests"| node_scheduler
node_scheduler -->|"uses confidence model"| node_confidence
node_agentloop -->|"dispatches actions"| node_actions
node_agentloop -->|"publishes cycles"| node_api
node_api -.->|"stores cycle data"| node_persistence
node_api -->|"serves fleet state"| node_sources
node_dashboard -->|"uses API helpers"| node_apiclient
node_apiclient -.->|"requests API data"| node_api
node_operator -->|"views fleet readiness"| node_dashboard

click node_sources "https://github.com/m524security/sentrix/blob/main/agent/ingestion/fleet_source.py"
click node_loghub "https://github.com/m524security/sentrix/blob/main/agent/ingestion/loghub_engine.py"
click node_realtime "https://github.com/m524security/sentrix/blob/main/agent/ingestion/realtime_gateway.py"
click node_adapters "https://github.com/m524security/sentrix/tree/main/agent/ingestion/adapters"
click node_agentloop "https://github.com/m524security/sentrix/blob/main/agent/main.py"
click node_reasoning "https://github.com/m524security/sentrix/blob/main/agent/reasoning/reasoning_core.py"
click node_providers "https://github.com/m524security/sentrix/blob/main/agent/reasoning/llm_providers.py"
click node_memory "https://github.com/m524security/sentrix/blob/main/agent/memory/decision_memory.py"
click node_incidentrag "https://github.com/m524security/sentrix/blob/main/agent/memory/incident_rag.py"
click node_forecast "https://github.com/m524security/sentrix/blob/main/agent/reasoning/predictive_engine.py"
click node_agency "https://github.com/m524security/sentrix/blob/main/agent/agency/tool_agent.py"
click node_confidence "https://github.com/m524security/sentrix/blob/main/agent/recovery/confidence.py"
click node_ledger "https://github.com/m524security/sentrix/blob/main/agent/recovery/evidence_ledger.py"
click node_scheduler "https://github.com/m524security/sentrix/blob/main/agent/recovery/evidence_scheduler.py"
click node_actions "https://github.com/m524security/sentrix/blob/main/agent/actions/executor.py"
click node_api "https://github.com/m524security/sentrix/blob/main/api/main.py"
click node_persistence "https://github.com/m524security/sentrix/blob/main/agent/persistence.py"
click node_dashboard "https://github.com/m524security/sentrix/blob/main/dashboard/src/App.js"
click node_apiclient "https://github.com/m524security/sentrix/blob/main/dashboard/src/lib.js"

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_sources,node_loghub,node_realtime,node_adapters toneBlue
class node_agentloop,node_reasoning,node_providers,node_memory,node_incidentrag,node_forecast,node_agency toneAmber
class node_confidence,node_ledger,node_scheduler toneMint
class node_actions,node_api,node_persistence toneRose
class node_dashboard,node_apiclient,node_operator toneIndigo
```

## Components

### Fleet ingestion

- [Fleet sources](https://github.com/m524security/sentrix/blob/main/agent/ingestion/fleet_source.py): `agent/ingestion/fleet_source.py`
- [LogHub engine](https://github.com/m524security/sentrix/blob/main/agent/ingestion/loghub_engine.py): `agent/ingestion/loghub_engine.py`
- [Telemetry gateway](https://github.com/m524security/sentrix/blob/main/agent/ingestion/realtime_gateway.py): `agent/ingestion/realtime_gateway.py`
- [Telemetry adapters](https://github.com/m524security/sentrix/tree/main/agent/ingestion/adapters): `agent/ingestion/adapters`

### Agent reasoning

- [Agent cycle](https://github.com/m524security/sentrix/blob/main/agent/main.py): `agent/main.py`
- [Risk reasoning](https://github.com/m524security/sentrix/blob/main/agent/reasoning/reasoning_core.py): `agent/reasoning/reasoning_core.py`
- [LLM providers](https://github.com/m524security/sentrix/blob/main/agent/reasoning/llm_providers.py): `agent/reasoning/llm_providers.py`
- [Decision memory](https://github.com/m524security/sentrix/blob/main/agent/memory/decision_memory.py): `agent/memory/decision_memory.py`
- [Incident recall](https://github.com/m524security/sentrix/blob/main/agent/memory/incident_rag.py): `agent/memory/incident_rag.py`
- [RPO forecasting](https://github.com/m524security/sentrix/blob/main/agent/reasoning/predictive_engine.py): `agent/reasoning/predictive_engine.py`
- [Tool investigation](https://github.com/m524security/sentrix/blob/main/agent/agency/tool_agent.py): `agent/agency/tool_agent.py`

### Recovery evidence

- [Recovery confidence](https://github.com/m524security/sentrix/blob/main/agent/recovery/confidence.py): `agent/recovery/confidence.py`
- [Evidence ledger](https://github.com/m524security/sentrix/blob/main/agent/recovery/evidence_ledger.py): `agent/recovery/evidence_ledger.py`
- [Restore scheduler](https://github.com/m524security/sentrix/blob/main/agent/recovery/evidence_scheduler.py): `agent/recovery/evidence_scheduler.py`

### API and actions

- [Action executor](https://github.com/m524security/sentrix/blob/main/agent/actions/executor.py): `agent/actions/executor.py`
- [Control API](https://github.com/m524security/sentrix/blob/main/api/main.py): `api/main.py`
- [Operational persistence](https://github.com/m524security/sentrix/blob/main/agent/persistence.py): `agent/persistence.py`

### Dashboard

- [Dashboard views](https://github.com/m524security/sentrix/blob/main/dashboard/src/App.js): `dashboard/src/App.js`
- [Dashboard API client](https://github.com/m524security/sentrix/blob/main/dashboard/src/lib.js): `dashboard/src/lib.js`

### Other components

- **Engineer**

## Connections

- Agent cycle → Fleet sources: loads fleet (evidence: `agent/main.py`)
- Fleet sources → LogHub engine: uses simulation data (evidence: `agent/ingestion/fleet_source.py`)
- Engineer → Telemetry gateway: sends telemetry (evidence: `README.md`)
- Telemetry gateway → Telemetry adapters: parses telemetry (evidence: `README.md`)
- Agent cycle → Risk reasoning: reasons over assets (evidence: `agent/main.py`)
- Risk reasoning → LLM providers: requests model output (evidence: `agent/reasoning/reasoning_core.py`)
- Risk reasoning → Decision memory: recalls history (evidence: `agent/reasoning/reasoning_core.py`)
- Tool investigation → Decision memory: uses decision history (evidence: `agent/agency/tool_agent.py`)
- Tool investigation → Incident recall: recalls incidents (evidence: `agent/agency/tool_agent.py`)
- Agent cycle → Tool investigation: refines assessments (evidence: `agent/main.py`)
- Agent cycle → RPO forecasting: forecasts breaches (evidence: `agent/main.py`)
- RPO forecasting → LogHub engine: reconstructs history (evidence: `agent/reasoning/predictive_engine.py`)
- Agent cycle → Recovery confidence: scores readiness (evidence: `agent/main.py`)
- Recovery confidence → Evidence ledger: reads restore evidence
- Agent cycle → Restore scheduler: plans restore tests (evidence: `agent/main.py`)
- Restore scheduler → Recovery confidence: uses confidence model (evidence: `agent/recovery/evidence_scheduler.py`)
- Agent cycle → Action executor: dispatches actions (evidence: `agent/main.py`)
- Agent cycle → Control API: publishes cycles (evidence: `agent/main.py`)
- Control API → Operational persistence: stores cycle data (evidence: `api/main.py`)
- Control API → Fleet sources: serves fleet state (evidence: `api/main.py`)
- Dashboard views → Dashboard API client: uses API helpers (evidence: `dashboard/src/App.js`)
- Dashboard API client → Control API: requests API data
- Engineer → Dashboard views: views fleet readiness (evidence: `README.md`)
