# splx-ai/agentic-radar architecture

> Architecture diagram of the GitHub repository splx-ai/agentic-radar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/splx-ai/agentic-radar
- Repository: https://github.com/splx-ai/agentic-radar

## Overview

##### Main Components
- CLI Interface: The entry point (agentic_radar/__main__.py and cli.py) where users pass input directories and command options.
- Core Analysis Engine: The central “agentic_radar/analysis” module which subdivides into multiple submodules:
- CrewAI Analysis (agentic_radar/analysis/crewai) – parsing, modeling, and converting graphs from CrewAI workflows.
- LangGraph Analysis (agentic_radar/analysis/langgraph) – analyzing LangGraph-specific structures and handling custom/predefined tools.
- n8n Analysis (agentic_radar/analysis/n8n) – converting n8n JSON configurations and parsing workflow details.
- OpenAI Agents Analysis (agentic_radar/analysis/openai_agents) – including parsing, error handling and categorization for OpenAI Agents workflows.
- Utility Modules: These include general helpers (agentic_radar/utils.py and analysis/utils.py) as well as tool categorizer and parsing helpers that support multiple framework modules.
- Report Generation: The “agentic_radar/report” submodule constructs the final comprehensive HTML security report that includes workflow graphs, lists of tools, and vulnerability mapping.
- Mapper: The module (agentic_radar/mapper) that appears to handle the mapping of identified components to known vulnerabilities (utilizing a JSON file that lists vulnerabilities).

- Utility modules to each analysis submodule, as these provide shared code (helpers, parsers, configuration loaders) required for processing.
- Mapper as a component that takes the analysis output (tools, workflow components) and cross-references them with vulnerability data (such as vulnerabilities.json or tool_categories.json) to create a vulnerability map.

##### Architectural Patterns and Design Principles
- Modularity: Each framework (CrewAI, LangGraph, n8n, OpenAI Agents) is handled via its own module within a larger analysis package. This makes the system extensible (evidenced by support for future frameworks like LlamaIndex, Swarm, etc.).
- Separation of Concerns: The CLI, Analysis, Mapping, and Report Generation layers are clearly separated to keep responsibilities distinct.
- Reusability: Utility modules and shared parsers allow code reuse across multiple framework-specific analyses.

##### Relevant Technologies and Frameworks
- Python as the primary language.
- Integration with external security standards (as mentioned in the README, such as OWASP guidelines).
- Use of Jinja templates (found inside agentic_radar/report/templates) for generating HTML reports.
- CI/CD tools (GitHub workflows) for automated tests and releases.
- Pre-commit and configuration for code quality.

- Input (code directory) → CLI interface → individual analysis submodules → mapping module → report generation.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["CLI Interface"]:::cli
    B["Core Analysis Engine"]:::analysis
    subgraph "Analysis Modules"
        C["CrewAI Analysis Module"]:::analysis
        D["LangGraph Analysis Module"]:::analysis
        E["n8n Analysis Module"]:::analysis
        F["OpenAI Agents Analysis Module"]:::analysis
    end
    G["Utility Modules"]:::utility
    H["Mapper/Vulnerability Engine"]:::mapper
    I["Report Generation Module"]:::report

    %% Data Flow
    A -->|"routes"| B
    B -->|"dispatches"| C
    B -->|"dispatches"| D
    B -->|"dispatches"| E
    B -->|"dispatches"| F

    %% Utilities connections (dotted arrows)
    C -.->|"uses"| G
    D -.->|"uses"| G
    E -.->|"uses"| G
    F -.->|"uses"| G

    %% Analysis modules feed to Mapper and Report Generator
    C -->|"outputs"| H
    D -->|"outputs"| H
    E -->|"outputs"| H
    F -->|"outputs"| H

    C -->|"reports"| I
    D -->|"reports"| I
    E -->|"reports"| I
    F -->|"reports"| I

    %% Mapper feeds final data to Report Generator
    H -->|"maps"| I

    %% Click Events for CLI Interface
    click A "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/__main__.py"
    click A "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/cli.py"

    %% Click Events for Core Analysis Engine and its modules
    click B "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/analysis/"
    click C "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/analysis/crewai/"
    click D "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/analysis/langgraph/"
    click E "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/analysis/n8n/"
    click F "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/analysis/openai_agents/"

    %% Click Events for Utility Modules
    click G "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/utils.py"
    click G "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/analysis/utils.py"

    %% Click Events for Mapper/Vulnerability Engine
    click H "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/mapper/"
    click H "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/mapper/mapper.py"
    click H "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/mapper/vulnerabilities.json"

    %% Click Events for Report Generation Module
    click I "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/report/"
    click I "https://github.com/splx-ai/agentic-radar/blob/main/agentic_radar/report/report.py"
    click I "https://github.com/splx-ai/agentic-radar/tree/main/agentic_radar/report/templates/"

    %% Classes and Styles
    classDef cli fill:#FFCC00,stroke:#333,stroke-width:2px;
    classDef analysis fill:#AED6F1,stroke:#333,stroke-width:2px;
    classDef utility fill:#F9E79F,stroke:#333,stroke-width:2px;
    classDef mapper fill:#82E0AA,stroke:#333,stroke-width:2px;
    classDef report fill:#D2B4DE,stroke:#333,stroke-width:2px;
```
