# arango-solutions-org/risk-intelligence architecture

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

- Interactive diagram: https://gitdiagram.com/arango-solutions-org/risk-intelligence
- Repository: https://github.com/arango-solutions-org/risk-intelligence

## Overview

Sentries is a sanctions-risk intelligence platform built around an ArangoDB knowledge graph. Its main user-to-result workflow flattens OFAC data, loads it with ontology and demo entities, scores sanctioned parties, adds a mostly clean portfolio, propagates risk through relationships, and installs Visualizer themes and saved queries. Separate capabilities include path-based vetting and an agentic graph-analysis entry point. The graph reflects README and excerpted/indexed relationships; unsampled implementation details and agent internals are not inferred.

Main entry points: [`scripts/run_pipeline.py`](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/run_pipeline.py) (Pipeline runner), [`scripts/load_data.py`](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/load_data.py) (Graph data loader), [`scripts/install_theme.py`](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/install_theme.py) (Theme and action installer), [`run_risk_analysis.py`](https://github.com/arango-solutions-org/risk-intelligence/blob/main/run_risk_analysis.py) (Agentic graph analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data and graph"]
  node_ontology["OWL ontology"]
  node_flatten["OFAC flattening<br/>[flatten_ofac.py]"]
  node_loader["Graph data loader<br/>[load_data.py]"]
  node_synthetic["Synthetic data loader"]
  node_portfolio["Clean portfolio generator"]
  node_graphdb[("ArangoDB knowledge graph")]
  node_pipeline["Pipeline runner<br/>[run_pipeline.py]"]
end

subgraph group_risk["Risk analysis"]
  node_direct["Direct risk scoring"]
  node_inferred["Inferred risk propagation"]
  node_pathvet["Path-based vetting"]
end

subgraph group_experience["Visualizer experience"]
  node_theme["Theme and action installer<br/>[install_theme.py]"]
  node_dashboard["Saved-query installer"]
  node_visualizer["ArangoDB Visualizer"]
end

subgraph group_agentic["Agentic analysis"]
  node_analysis["Agentic graph analysis"]
  node_config["Arango configuration<br/>[common.py]"]
end

node_operator(("Analyst / operator"))
node_ofac["OFAC SDN XML"]

node_operator -->|"runs pipeline"| node_pipeline
node_ofac -->|"supplies XML"| node_flatten
node_flatten -->|"produces CSVs"| node_loader
node_ontology -->|"provides schema"| node_loader
node_pipeline -->|"runs stage"| node_loader
node_pipeline -->|"runs stage"| node_direct
node_pipeline -->|"runs stage"| node_portfolio
node_pipeline -->|"runs stage"| node_inferred
node_pipeline -->|"runs stage"| node_theme
node_loader -->|"loads graph data"| node_graphdb
node_synthetic -->|"loads demo data"| node_graphdb
node_portfolio -->|"adds counterparties"| node_graphdb
node_direct -->|"writes risk scores"| node_graphdb
node_inferred -->|"writes propagated risk"| node_graphdb
node_operator -.->|"performs vetting"| node_pathvet
node_pathvet -.->|"queries risk paths"| node_graphdb
node_operator -.->|"starts analysis"| node_analysis
node_analysis -->|"uses configuration"| node_config
node_analysis -.->|"analyzes graph"| node_graphdb
node_theme -->|"installs themes and actions"| node_graphdb
node_dashboard -.->|"installs saved queries"| node_graphdb
node_visualizer -->|"explores graph"| node_graphdb
node_theme -->|"configures display"| node_visualizer
node_dashboard -.->|"provides queries"| node_visualizer

click node_ontology "https://github.com/arango-solutions-org/risk-intelligence/blob/main/sentries_ontology.owl"
click node_flatten "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/flatten_ofac.py"
click node_loader "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/load_data.py"
click node_synthetic "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/load_synthetic_data.py"
click node_portfolio "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/generate_clean_portfolio.py"
click node_pipeline "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/run_pipeline.py"
click node_direct "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_direct_risk.py"
click node_inferred "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_inferred_risk.py"
click node_pathvet "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_path_risk.py"
click node_analysis "https://github.com/arango-solutions-org/risk-intelligence/blob/main/run_risk_analysis.py"
click node_config "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/common.py"
click node_theme "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/install_theme.py"
click node_dashboard "https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/install_dashboard.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_ontology,node_flatten,node_loader,node_synthetic,node_portfolio,node_graphdb,node_pipeline toneBlue
class node_direct,node_inferred,node_pathvet toneAmber
class node_theme,node_dashboard,node_visualizer toneMint
class node_analysis,node_config toneRose
class node_operator,node_ofac toneIndigo
```

## Components

### Data and graph

- [OWL ontology](https://github.com/arango-solutions-org/risk-intelligence/blob/main/sentries_ontology.owl): `sentries_ontology.owl`
- [OFAC flattening](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/flatten_ofac.py): `scripts/flatten_ofac.py`
- [Graph data loader](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/load_data.py): `scripts/load_data.py`
- [Synthetic data loader](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/load_synthetic_data.py): `scripts/load_synthetic_data.py`
- [Clean portfolio generator](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/generate_clean_portfolio.py): `scripts/generate_clean_portfolio.py`
- **ArangoDB knowledge graph**
- [Pipeline runner](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/run_pipeline.py): `scripts/run_pipeline.py`

### Risk analysis

- [Direct risk scoring](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_direct_risk.py): `scripts/calculate_direct_risk.py`
- [Inferred risk propagation](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_inferred_risk.py): `scripts/calculate_inferred_risk.py`
- [Path-based vetting](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/calculate_path_risk.py): `scripts/calculate_path_risk.py`

### Visualizer experience

- [Theme and action installer](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/install_theme.py): `scripts/install_theme.py`
- [Saved-query installer](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/install_dashboard.py): `scripts/install_dashboard.py`
- **ArangoDB Visualizer**

### Agentic analysis

- [Agentic graph analysis](https://github.com/arango-solutions-org/risk-intelligence/blob/main/run_risk_analysis.py): `run_risk_analysis.py`
- [Arango configuration](https://github.com/arango-solutions-org/risk-intelligence/blob/main/scripts/common.py): `scripts/common.py`

### Other components

- **Analyst / operator**
- **OFAC SDN XML**

## Connections

- Analyst / operator → Pipeline runner: runs pipeline (evidence: `README.md`)
- OFAC SDN XML → OFAC flattening: supplies XML (evidence: `README.md`)
- OFAC flattening → Graph data loader: produces CSVs (evidence: `README.md`)
- OWL ontology → Graph data loader: provides schema (evidence: `README.md`)
- Pipeline runner → Graph data loader: runs stage (evidence: `scripts/run_pipeline.py`)
- Pipeline runner → Direct risk scoring: runs stage (evidence: `scripts/run_pipeline.py`)
- Pipeline runner → Clean portfolio generator: runs stage (evidence: `scripts/run_pipeline.py`)
- Pipeline runner → Inferred risk propagation: runs stage (evidence: `scripts/run_pipeline.py`)
- Pipeline runner → Theme and action installer: runs stage (evidence: `scripts/run_pipeline.py`)
- Graph data loader → ArangoDB knowledge graph: loads graph data (evidence: `scripts/load_data.py`)
- Synthetic data loader → ArangoDB knowledge graph: loads demo data (evidence: `scripts/load_synthetic_data.py`)
- Clean portfolio generator → ArangoDB knowledge graph: adds counterparties (evidence: `README.md`)
- Direct risk scoring → ArangoDB knowledge graph: writes risk scores (evidence: `README.md`)
- Inferred risk propagation → ArangoDB knowledge graph: writes propagated risk (evidence: `README.md`)
- Analyst / operator → Path-based vetting: performs vetting
- Path-based vetting → ArangoDB knowledge graph: queries risk paths
- Analyst / operator → Agentic graph analysis: starts analysis
- Agentic graph analysis → Arango configuration: uses configuration (evidence: `run_risk_analysis.py`)
- Agentic graph analysis → ArangoDB knowledge graph: analyzes graph
- Theme and action installer → ArangoDB knowledge graph: installs themes and actions (evidence: `README.md`)
- Saved-query installer → ArangoDB knowledge graph: installs saved queries
- ArangoDB Visualizer → ArangoDB knowledge graph: explores graph (evidence: `README.md`)
- Theme and action installer → ArangoDB Visualizer: configures display (evidence: `README.md`)
- Saved-query installer → ArangoDB Visualizer: provides queries
