Listen to this Post

Introduction
The cybersecurity industry is witnessing a paradigm shift from single-model AI assistants to coordinated multi-agent systems capable of executing entire penetration testing lifecycles with minimal human intervention. Francisco Javier Donoso Martínez’s architecture—built on Debian 13, orchestrated by Hermes NAS, containerized with Docker Compose, and powered by a shared memory layer called OCHO—exemplifies this evolution. This article deconstructs that pipeline, providing a technical deep-dive into each agent’s role, the infrastructure requirements, and practical implementation steps for security professionals looking to build their own autonomous offensive security stack.
Learning Objectives
- Understand the architecture and interaction patterns of a multi-agent ethical hacking pipeline spanning OSINT, vulnerability correlation, exploitation planning, and continuous learning.
- Deploy and configure the core infrastructure stack (Debian 13, Docker Compose, Hermes NAS, and OCHO shared memory) for agent isolation and orchestration.
- Implement and customize each specialized agent (Alfa, Beta, Gamma, Delta, Epsilon, Zeta) with practical commands, API security configurations, and cloud hardening measures.
- Apply operational governance controls—tracing, authorization boundaries, function segregation, and human oversight—to ensure safe autonomous execution.
You Should Know
- Infrastructure Foundation: Debian 13, Hermes NAS, Docker Compose, and OCHO
The foundation of any multi-agent offensive security system rests on four pillars: a stable host OS, an orchestration layer, container isolation, and a shared memory fabric.
Debian 13 (Trixie) serves as the base operating system. Several penetration testing distributions—including Parrot OS 7.x and NexOS—are already built on Debian 13, providing a stable kernel (Linux 6.12 LTS or newer) and extensive package support. For a minimal, custom build:
Update the system and install core dependencies sudo apt update && sudo apt upgrade -y sudo apt install -y docker.io docker-compose python3 python3-pip git curl wget nmap masscan hydra sqlmap metasploit-framework
Hermes NAS functions as the primary orchestration agent—an open-source, self-hosted AI agent developed by Nous Research that supervises and coordinates the entire ecosystem. It persistently monitors messages from various channels and can execute commands, access local files, and utilize API keys or tokens.
Docker Compose provides isolation and execution for specialized agents. Each agent runs in its own container, preventing interference and containing potential damage. A basic `docker-compose.yml` for the agent ecosystem:
version: '3.8' services: hermes-orchestrator: image: nousresearch/hermes-agent:latest container_name: hermes-1as volumes: - ./hermes_config:/config - ./shared_memory:/shared environment: - HERMES_MEMORY_BACKEND=ocho networks: - agent_network restart: unless-stopped alfa-osint: build: ./agents/alfa container_name: alfa-osint networks: - agent_network depends_on: - hermes-orchestrator deploy: resources: limits: memory: 2G Additional agents (beta, gamma, delta, epsilon, zeta) follow similar patterns networks: agent_network: driver: bridge ipam: config: - subnet: 172.20.0.0/16
OCHO (shared memory layer) maintains context and knowledge across agents, enabling cross-session memory and multi-agent awareness. Parent agents (like Hermes) automatically track spawned sub-agents, with parents added as observers in child sessions. This persistent conversation memory ensures that findings from Alfa (OSINT) inform Beta (Classification) without requiring redundant data transfers.
- The Multi-Agent Pipeline: From OSINT to Operational Learning
The six-agent pipeline represents a complete offensive security kill chain, from reconnaissance to continuous improvement.
Alfa — OSINT Agent: This agent scrapes open sources (Shodan, Censys, DNS records, WHOIS, subdomain enumeration) and constructs an initial attack surface representation.
Implementation snippet using Python and Shodan:
import shodan import dns.resolver class AlfaOSINT: def <strong>init</strong>(self, api_key): self.api = shodan.Shodan(api_key) def enumerate_subdomains(self, domain): Use crt.sh or sublist3r subdomains = [] Implementation details return subdomains def scan_ports(self, target): results = self.api.search(target) return results
Beta — Classification Agent: Processes Alfa’s findings, identifies active assets, potential vectors, and structures technical information into a shared database (e.g., Neo4j knowledge graph).
Gamma — Vulnerability Agent: Correlates identified assets with CVEs, misconfigurations, and weaknesses. This agent can query the National Vulnerability Database (NVD) and CWE catalog.
Using NVD API to fetch CVEs for a given service curl -X GET "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=nginx&resultsPerPage=10"
Delta — Planning Agent: Constructs test scenarios and coordinates sub-agents for specific tasks within authorized scope. This agent employs utility-based scheduling to prioritize actions based on information gain and success probability.
Epsilon — Execution and Monitoring Agent: Supervises tests, logs results, and feeds back to Delta when a scenario enables new validations.
Zeta — Learning and Optimization Agent: Consolidates results, identifies improvements, and converts repeatable procedures into reusable skills.
3. Step-by-Step Deployment: Building Your Multi-Agent Pentest Stack
Step 1: Provision the Debian 13 Host
Download Debian 13 (Trixie) netinst ISO wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.0.0-amd64-1etinst.iso Install with minimal configuration, enable SSH
Step 2: Install Docker and Docker Compose
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER Install Docker Compose plugin sudo apt install docker-compose-plugin
Step 3: Configure Hermes NAS Orchestrator
Clone Hermes Agent repository git clone https://github.com/NousResearch/hermes-agent.git cd hermes-agent Create configuration with OCHO memory backend cat > config.yaml << EOF memory: backend: ocho ocho_endpoint: http://ocho-service:8080 approvals: require_approval: true approval_regex: "^sudo|rm -rf|DROP TABLE" network: egress_allowlist: - ".target-domain.com" - "api.nvd.nist.gov" EOF
Step 4: Build Agent Containers
Create Dockerfile for each agent cat > agents/alfa/Dockerfile << EOF FROM python:3.11-slim RUN pip install shodan dnspython requests beautifulsoup4 COPY alfa.py /app/ WORKDIR /app CMD ["python", "alfa.py"] EOF Build all agents docker compose build
Step 5: Launch the Ecosystem
docker compose up -d Verify all containers are running docker compose ps Check Hermes logs docker compose logs hermes-orchestrator -f
- API Security and Cloud Hardening for Autonomous Agents
When deploying AI agents that execute commands and access credentials, security controls are paramount. Implement the following measures:
API Key Management: Store secrets in environment variables or a secrets manager, never in code.
Use Docker secrets or environment variables
echo "SHODAN_API_KEY=your_key_here" > .env
Reference in docker-compose.yml
environment:
- SHODAN_API_KEY=${SHODAN_API_KEY}
Network Isolation: Deploy agents in an isolated network segment with strict egress controls.
In docker-compose.yml networks: agent_network: driver: bridge internal: true No external access except through proxy
Resource Limits: Prevent resource exhaustion attacks:
deploy: resources: limits: cpus: '2' memory: 4G
Rollback and Sandboxing: Implement validation safeguards including static deny-lists, rate limiting, and sandbox rollback.
5. Operational Governance: Control, Traceability, and Human Oversight
As Francisco Javier Donoso Martínez highlighted, the real challenge shifts from “What can an AI agent do?” to “How do we design, govern, and control a complete team of specialized agents?”.
Authorization Boundaries: Each agent must operate within explicit scope limitations. Implement an allowlist-based egress control:
Hermes configuration network: egress_allowlist: - ".authorized-target.com" - "api.nvd.nist.gov" - "cve.circl.lu" egress_denylist: - ".internal.corp" - "192.168."
Function Segregation: No single agent should have end-to-end capability. Alfa (OSINT) cannot execute exploits; Epsilon (Execution) cannot modify its own code.
Tracing and Evidence: Every decision and action must be logged with immutable timestamps:
Enable audit logging in Docker docker compose logs --timestamps > audit.log Forward logs to SIEM
Human-in-the-Loop Checkpoints: Require approval for high-risk actions (privilege escalation, data exfiltration attempts, destructive commands):
approvals: require_approval: true approval_regex: "^sudo|rm -rf|DROP TABLE|chmod 777|/etc/passwd"
6. Commands and Tools for Each Agent Phase
Reconnaissance (Alfa):
Subdomain enumeration sublist3r -d target.com -o subdomains.txt Port scanning nmap -sS -p- -T4 target.com -oA nmap_full OSINT gathering theHarvester -d target.com -b google -l 100
Vulnerability Correlation (Gamma):
CVE lookup for specific service versions searchsploit Apache 2.4.49 Using NVD API curl "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=Apache%20Struts"
Exploitation (Delta/Epsilon):
Metasploit automated exploitation msfconsole -q -x "use exploit/multi/http/struts2_rest_xstream; set RHOSTS target.com; run" Custom exploit scripts python3 exploit.py --target target.com --port 8080
Post-Exploitation and Learning (Zeta):
Extract credentials mimikatz.exe "sekurlsa::logonpasswords" Generate report python3 report_generator.py --input findings.json --output report.pdf
What Undercode Say
- The Shift from Single-Agent to Multi-Agent is Inevitable: Research shows multi-agent frameworks achieve 22.0% on NYU CTF Bench and 44.0% on HackTheBox—2.5% to 8.5% better than single-agent approaches. The division of labor mirrors real-world penetration testing teams.
-
Automation is a Force Multiplier, Not a Replacement: Palo Alto Networks’ Unit 42 demonstrated that AI multi-agent systems serve as force multipliers, rapidly accelerating exploitation of well-known misconfigurations without necessarily creating new attack surfaces. The human security professional remains essential for strategic oversight, complex reasoning, and ethical judgment.
-
Governance is the Critical Success Factor: AgentPentestAI’s experiments on 20 HackTheBox/VulnHub targets showed 68% subtask completion (versus 52% for PentestGPT) and reduced hallucinations from 12% to 5% through rollback validation, disallow lists, and sandboxing. These governance controls are not optional—they are the difference between a useful tool and a dangerous liability.
-
The Operational Learning Loop is the True Innovation: Francisco’s “Observe → Classify → Analyze → Plan → Validate → Learn” cycle transforms each execution into reusable knowledge. This addresses the fundamental limitation of traditional penetration testing: each engagement starts from zero.
-
Cloud and API Security Must Be Addressed Early: As autonomous agents gain cloud access, misconfigurations in IAM, storage buckets, and API endpoints become critical attack vectors. Hardening the agent infrastructure itself is as important as the vulnerabilities it discovers.
Prediction
+1 Multi-agent offensive security pipelines will become standard in enterprise DevSecOps within 24-36 months, reducing average penetration testing time from 2-3 weeks to under 48 hours.
+1 The operational learning loop will give rise to “self-healing” security postures—systems that not only identify vulnerabilities but automatically generate and apply patches, as demonstrated by RedAmon’s CodeFix agent.
-1 The democratization of autonomous hacking tools will lower the barrier to entry for malicious actors, leading to a surge in AI-driven, machine-speed attacks that outpace human defenders.
-1 Governance failures—misconfigured authorization boundaries, insufficient sandboxing, or excessive agent autonomy—will result in high-profile breaches where autonomous agents inadvertently attack production systems or exfiltrate sensitive data.
+1 Regulatory frameworks will evolve to mandate human-in-the-loop checkpoints, immutable audit trails, and certified agent architectures, creating a new market for “compliant autonomous security” platforms.
-1 The cybersecurity skills gap will widen as traditional penetration testing roles evolve toward AI orchestration and governance, leaving organizations without the hybrid talent (security + AI engineering) required to operate these systems safely.
▶️ Related Video (68% Match):
🎯Let’s Practice For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
IT/Security Reporter URL:
Reported By: Francisco Javier – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


