How nvisosecurity/cyber-security-llm-agents works
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: coordinator_agents.py Coordinator · logs.py Logging · shared_config.py Config · run_agents.py run_agents.py
Components 18
Orchestration
Entry scripts and scenario selection
- run_agents.py · Main script for running a chosen scenario
run_agents.py - run_servers.py · Starts optional local demo services
run_servers.py - run_notebooks.sh · Launches notebook-based walkthroughs
run_notebooks.sh - Scenarios · Central scenario definitions and runtime selection
actions/agent_actions.py
Agents
LLM-backed roles that coordinate and execute tasks
- Coordinator · Breaks down tasks and routes subtasks
agents/coordinator_agents.py - Text agent · General language and reasoning tasks
agents/text_agents.py - Code agent · Code generation and analysis tasks
agents/code_agents.py - CALDERA agent · Handles CALDERA-related automation
agents/caldera_agents.py
Tools
External capability layer used by agents
- Web tools · Web-oriented interactions and helpers
tools/web_tools.py - Code tools · Code-centric helpers and execution support
tools/code_tools.py - CALDERA tools · Integration helpers for CALDERA actions
tools/caldera_tools.py
Runtime
Shared config, logging, and local demo services
- Config · Loads shared configuration and environment settings
utils/shared_config.py - Constants · Repository-wide constants
utils/constants.py - Logging · Logging utilities for scripts and agents
utils/logs.py - Web server · Local HTTP service for demos and interactions
utils/web_server.py - FTP server · Local FTP service for demo interactions
utils/ftp_server.py
Demos
Notebook and media assets
- Notebook demo · RSAC 2024 walkthrough notebook
notebooks/RSA 2024 - Demos - Destroyer of Endpoints.ipynb - Videos · Supporting media assets for documentation
documentation/videos
Connections 21
- 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