# nvisosecurity/cyber-security-llm-agents architecture

> Architecture diagram of the GitHub repository nvisosecurity/cyber-security-llm-agents, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nvisosecurity/cyber-security-llm-agents
- Repository: https://github.com/nvisosecurity/cyber-security-llm-agents

## Overview

1. **Overall shape**
   This is a Python-based, AutoGen-driven multi-agent framework for cybersecurity workflows. The core architecture is a set of LLM-backed agents coordinated through named “scenarios,” with optional local services for web/FTP demo interactions and Jupyter notebooks for walkthroughs.

2. **Primary entrypoints**
   - `run_agents.py` is the main runtime for executing a chosen scenario.
   - `run_servers.py` starts the optional supporting infrastructure.
   - `run_notebooks.sh` launches notebook-based demos.
   These are the top-level orchestration boundaries, separating task execution from demo infrastructure.

3. **Scenario and workflow definition**
   `actions/agent_actions.py` appears to be the central scenario registry. The README explicitly says scenarios are defined there and selected by name at runtime. This means the repo is organized around reusable workflow definitions rather than a single fixed application flow.

4. **Agent layer**
   The `agents/` package contains specialized agent roles:
   - `coordinator_agents.py` for task decomposition and orchestration
   - `text_agents.py` for general language/reasoning tasks
   - `code_agents.py` for code-oriented generation or analysis
   - `caldera_agents.py` for CALDERA-related security automation
   This is the main decision-making layer, where the LLM interactions happen.

5. **Tooling / capability layer**
   The `tools/` package exposes external capabilities to the agents:
   - `web_tools.py` for web-related interactions
   - `code_tools.py` for code execution or code-centric helpers
   - `caldera_tools.py` for CALDERA integrations
   These are the action boundary between “reasoning” and “doing”; agents do not directly own all side effects, they invoke tools.

6. **Shared runtime utilities**
   The `utils/` package provides cross-cutting infrastructure:
   - `shared_config.py` for configuration loading
   - `constants.py` for shared values
   - `logs.py` for logging
   - `web_server.py` and `ftp_server.py` for local service hosting
   These modules support the runtime environment and demo services rather than scenario logic.

7. **Data flow through the system**
   A typical execution path is: select a scenario in `run_agents.py` → load the corresponding action definition → coordinator agent dispatches subtasks to specialized agents → agents call tools as needed → results are returned and composed into the final response. This creates a clear separation between orchestration, reasoning, and side effects.

8. **Optional local infrastructure**
   `run_servers.py` starts lightweight HTTP and FTP services, likely used for demonstrations involving download, upload, or exfiltration-style interactions. These are intentionally external to the agent loop so scenarios can interact with a controllable local target.

9. **Demos and artifacts**
   `notebooks/` contains at least one RSAC 2024 demo notebook focused on EDR detection/bypass demonstrations. `documentation/videos/` holds media used in the README. These are presentation and validation assets, not core runtime components.

10. **Integration boundary and risk model**
   The repository is built on LLMs and explicitly warns that generated code and commands are risky to run. Architecturally, that means the trust boundary is important: the model can propose actions, but those actions only become real through tool invocation, local servers, or external services such as OpenAI and possibly CALDERA.

11. **Technology stack**
   The repo is a Python project with dependency management via `requirements.txt`, environment-based configuration via `.env`, and AutoGen as the agent framework. The architecture is therefore lightweight and script-driven rather than a full web service or microservice system.

12. **How to draw it**
   A good diagram would show: user/CLI at the top; `run_agents.py` selecting a scenario from `actions/agent_actions.py`; a coordinator agent routing to text/code/CALDERA agents; tools on the side for web/code/CALDERA operations; utility services below for config, logging, HTTP, and FTP; and notebooks/docs as supporting demo surfaces.

Main entry points: [`agents/coordinator_agents.py`](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/coordinator_agents.py) (Coordinator), [`utils/logs.py`](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/logs.py) (Logging), [`utils/shared_config.py`](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/shared_config.py) (Config), [`run_agents.py`](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_agents.py) (run_agents.py)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_run_agents["run_agents.py<br/>runtime entrypoint<br/>[run_agents.py]"]
  node_run_servers["run_servers.py<br/>server entrypoint<br/>[run_servers.py]"]
  node_run_notebooks["run_notebooks.sh<br/>demo launcher<br/>[run_notebooks.sh]"]
  node_scenario_registry["Scenarios<br/>workflow registry<br/>[agent_actions.py]"]
end

subgraph group_agents["Agents"]
  node_coordinator{{"Coordinator<br/>agent orchestration"}}
  node_text_agent{{"Text agent<br/>reasoning agent<br/>[text_agents.py]"}}
  node_code_agent{{"Code agent<br/>[code_agents.py]"}}
  node_caldera_agent{{"CALDERA agent<br/>security agent<br/>[caldera_agents.py]"}}
end

subgraph group_tools["Tools"]
  node_web_tools["Web tools<br/>web capability<br/>[web_tools.py]"]
  node_code_tools["Code tools<br/>execution helpers<br/>[code_tools.py]"]
  node_caldera_tools["CALDERA tools<br/>caldera integration<br/>[caldera_tools.py]"]
end

subgraph group_runtime["Runtime"]
  node_shared_config["Config<br/>[shared_config.py]"]
  node_constants["Constants<br/>shared values<br/>[constants.py]"]
  node_logs["Logging<br/>[logs.py]"]
  node_web_server[("Web server<br/>local service<br/>[web_server.py]")]
  node_ftp_server[("FTP server<br/>local service<br/>[ftp_server.py]")]
end

subgraph group_demos["Demos"]
  node_notebook_demo["Notebook demo<br/>demo notebook"]
  node_videos["Videos<br/>presentation assets"]
end

node_run_agents -->|"selects"| node_scenario_registry
node_run_agents -->|"loads"| node_shared_config
node_run_agents -->|"writes"| node_logs
node_scenario_registry -->|"creates"| node_coordinator
node_coordinator -->|"routes to"| node_text_agent
node_coordinator -->|"routes to"| node_code_agent
node_coordinator -->|"routes to"| node_caldera_agent
node_text_agent -->|"uses"| node_web_tools
node_code_agent -->|"uses"| node_code_tools
node_caldera_agent -->|"uses"| node_caldera_tools
node_run_servers -->|"starts"| node_web_server
node_run_servers -->|"starts"| node_ftp_server
node_run_notebooks -->|"opens"| node_notebook_demo
node_shared_config -.->|"depends on"| node_constants
node_web_server -.->|"depends on"| node_shared_config
node_ftp_server -.->|"depends on"| node_shared_config
node_coordinator -.->|"writes"| node_logs
node_text_agent -.->|"writes"| node_logs
node_code_agent -.->|"writes"| node_logs
node_caldera_agent -.->|"writes"| node_logs
node_notebook_demo -.->|"references"| node_videos

click node_run_agents "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_agents.py"
click node_run_servers "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_servers.py"
click node_run_notebooks "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_notebooks.sh"
click node_scenario_registry "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/actions/agent_actions.py"
click node_coordinator "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/coordinator_agents.py"
click node_text_agent "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/text_agents.py"
click node_code_agent "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/code_agents.py"
click node_caldera_agent "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/caldera_agents.py"
click node_web_tools "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/web_tools.py"
click node_code_tools "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/code_tools.py"
click node_caldera_tools "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/caldera_tools.py"
click node_shared_config "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/shared_config.py"
click node_constants "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/constants.py"
click node_logs "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/logs.py"
click node_web_server "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/web_server.py"
click node_ftp_server "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/ftp_server.py"
click node_notebook_demo "https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/notebooks/RSA 2024 - Demos - Destroyer of Endpoints.ipynb"
click node_videos "https://github.com/nvisosecurity/cyber-security-llm-agents/tree/main/documentation/videos"

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_run_agents,node_run_servers,node_run_notebooks,node_scenario_registry toneBlue
class node_coordinator,node_text_agent,node_code_agent,node_caldera_agent toneAmber
class node_web_tools,node_code_tools,node_caldera_tools toneMint
class node_shared_config,node_constants,node_logs,node_web_server,node_ftp_server toneRose
class node_notebook_demo,node_videos toneIndigo
```

## Components

### Orchestration

Entry scripts and scenario selection

- [run_agents.py](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_agents.py): runtime entrypoint · Main script for running a chosen scenario · `run_agents.py`
- [run_servers.py](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_servers.py): server entrypoint · Starts optional local demo services · `run_servers.py`
- [run_notebooks.sh](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/run_notebooks.sh): demo launcher · Launches notebook-based walkthroughs · `run_notebooks.sh`
- [Scenarios](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/actions/agent_actions.py): workflow registry · Central scenario definitions and runtime selection · `actions/agent_actions.py`

### Agents

LLM-backed roles that coordinate and execute tasks

- [Coordinator](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/coordinator_agents.py): agent orchestration · Breaks down tasks and routes subtasks · `agents/coordinator_agents.py`
- [Text agent](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/text_agents.py): reasoning agent · General language and reasoning tasks · `agents/text_agents.py`
- [Code agent](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/code_agents.py): code agent · Code generation and analysis tasks · `agents/code_agents.py`
- [CALDERA agent](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/agents/caldera_agents.py): security agent · Handles CALDERA-related automation · `agents/caldera_agents.py`

### Tools

External capability layer used by agents

- [Web tools](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/web_tools.py): web capability · Web-oriented interactions and helpers · `tools/web_tools.py`
- [Code tools](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/code_tools.py): execution helpers · Code-centric helpers and execution support · `tools/code_tools.py`
- [CALDERA tools](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/tools/caldera_tools.py): caldera integration · Integration helpers for CALDERA actions · `tools/caldera_tools.py`

### Runtime

Shared config, logging, and local demo services

- [Config](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/shared_config.py): runtime config · Loads shared configuration and environment settings · `utils/shared_config.py`
- [Constants](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/constants.py): shared values · Repository-wide constants · `utils/constants.py`
- [Logging](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/logs.py): runtime logging · Logging utilities for scripts and agents · `utils/logs.py`
- [Web server](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/web_server.py): local service · Local HTTP service for demos and interactions · `utils/web_server.py`
- [FTP server](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/main/utils/ftp_server.py): local service · Local FTP service for demo interactions · `utils/ftp_server.py`

### Demos

Notebook and media assets

- [Notebook demo](https://github.com/nvisosecurity/cyber-security-llm-agents/blob/HEAD/notebooks/RSA%202024%20-%20Demos%20-%20Destroyer%20of%20Endpoints.ipynb): demo notebook · RSAC 2024 walkthrough notebook · `notebooks/RSA 2024 - Demos - Destroyer of Endpoints.ipynb`
- [Videos](https://github.com/nvisosecurity/cyber-security-llm-agents/tree/main/documentation/videos): presentation assets · Supporting media assets for documentation · `documentation/videos`

## Connections

- run_agents.py → Scenarios: selects · Chooses a scenario by name at runtime
- run_agents.py → Config: loads · Reads environment-based configuration
- run_agents.py → Logging: writes · Uses shared logging during execution
- Scenarios → Coordinator: creates · Maps scenarios to orchestration flows
- Coordinator → Text agent: routes to · Delegates reasoning tasks
- Coordinator → Code agent: routes to · Delegates code-focused tasks
- Coordinator → CALDERA agent: routes to · Delegates CALDERA-related tasks
- Text agent → Web tools: uses · May use web-facing helper actions
- Code agent → Code tools: uses · Invokes code execution and helper capabilities
- CALDERA agent → CALDERA tools: uses · Invokes CALDERA integration helpers
- run_servers.py → Web server: starts · Launches local HTTP demo service
- run_servers.py → FTP server: starts · Launches local FTP demo service
- run_notebooks.sh → Notebook demo: opens · Launches the walkthrough notebook
- Config → Constants: depends on · Uses shared values during configuration
- Web server → Config: depends on · Uses shared runtime settings
- FTP server → Config: depends on · Uses shared runtime settings
- Coordinator → Logging: writes · Records orchestration activity
- Text agent → Logging: writes · Records agent activity
- Code agent → Logging: writes · Records agent activity
- CALDERA agent → Logging: writes · Records agent activity
- Notebook demo → Videos: references · Supporting presentation assets
