Overview
Shannon’s agent system is the core of its autonomous testing capability. Each agent is a specialized AI instance powered by Claude, designed for a specific security testing task. The system coordinates 13 agents across 5 phases, with sophisticated parallel execution and dependency management.Agent Registry
All agents are defined in a centralized registry that serves as the single source of truth: File:src/session-manager.ts:14-108
Agent Definition Structure
Unique identifier for the agent (e.g.,
'injection-vuln', 'xss-exploit')Human-readable name for logging and UI display
Array of agent names that must complete before this agent runs. Empty array
[] means no prerequisites.Filename (without extension) of the prompt template in
/prompts/ directoryExpected output filename that the agent must produce. Used for validation.
Which Claude model tier to use:
small: Claude Haiku (fast, cost-efficient)medium: Claude Sonnet (balanced, default)large: Claude Opus (deep reasoning)
Complete Agent List
Phase 1: Pre-Reconnaissance (1 agent)
Phase 1: Pre-Reconnaissance (1 agent)
pre-recon
- Prerequisites: None (runs first)
- Model: Large (Claude Opus)
- Purpose: Source code analysis + external reconnaissance
- Deliverable:
code_analysis_deliverable.md - Prompt:
prompts/pre-recon-code.txt
Phase 2: Reconnaissance (1 agent)
Phase 2: Reconnaissance (1 agent)
recon
- Prerequisites:
pre-recon - Model: Medium (default)
- Purpose: Live application exploration and attack surface mapping
- Deliverable:
recon_deliverable.md - Prompt:
prompts/recon.txt
Phase 3: Vulnerability Analysis (5 agents)
Phase 3: Vulnerability Analysis (5 agents)
All vulnerability agents run in parallel after recon completes:
injection-vuln
- Prerequisites:
recon - Focus: SQL Injection, Command Injection, NoSQL Injection
- Deliverable:
injection_analysis_deliverable.md - Prompt:
prompts/vuln-injection.txt
xss-vuln
- Prerequisites:
recon - Focus: Stored/Reflected/DOM XSS
- Deliverable:
xss_analysis_deliverable.md - Prompt:
prompts/vuln-xss.txt
auth-vuln
- Prerequisites:
recon - Focus: Broken Authentication
- Deliverable:
auth_analysis_deliverable.md - Prompt:
prompts/vuln-auth.txt
authz-vuln
- Prerequisites:
recon - Focus: Broken Authorization, IDOR
- Deliverable:
authz_analysis_deliverable.md - Prompt:
prompts/vuln-authz.txt
ssrf-vuln
- Prerequisites:
recon - Focus: Server-Side Request Forgery
- Deliverable:
ssrf_analysis_deliverable.md - Prompt:
prompts/vuln-ssrf.txt
Phase 4: Exploitation (5 agents)
Phase 4: Exploitation (5 agents)
Each exploitation agent runs conditionally after its corresponding vulnerability agent:
injection-exploit
- Prerequisites:
injection-vuln - Deliverable:
injection_exploitation_evidence.md - Prompt:
prompts/exploit-injection.txt
xss-exploit
- Prerequisites:
xss-vuln - Deliverable:
xss_exploitation_evidence.md - Prompt:
prompts/exploit-xss.txt
auth-exploit
- Prerequisites:
auth-vuln - Deliverable:
auth_exploitation_evidence.md - Prompt:
prompts/exploit-auth.txt
authz-exploit
- Prerequisites:
authz-vuln - Deliverable:
authz_exploitation_evidence.md - Prompt:
prompts/exploit-authz.txt
ssrf-exploit
- Prerequisites:
ssrf-vuln - Deliverable:
ssrf_exploitation_evidence.md - Prompt:
prompts/exploit-ssrf.txt
Phase 5: Reporting (1 agent)
Phase 5: Reporting (1 agent)
report
- Prerequisites: All 5 exploit agents
- Model: Small (Claude Haiku)
- Purpose: Consolidate findings into final report
- Deliverable:
comprehensive_security_assessment_report.md - Prompt:
prompts/report-executive.txt
Agent Type System
Shannon uses TypeScript’s type system to ensure type safety: File:src/types/agents.ts
Parallel Execution
Shannon maximizes efficiency through intelligent parallel execution:Execution Model
Concurrency Control
By default, all 5 vuln/exploit pipelines run concurrently. You can limit concurrency to reduce API usage:src/temporal/workflows.ts:338-363
Browser Isolation
To prevent conflicts, each parallel agent gets its own Playwright browser instance: File:src/session-manager.ts:152-181
Agent Validators
Each agent has a validator function that checks if its deliverable was successfully created: File:src/session-manager.ts:184-227
Validator Types
- Simple File Validators
- Queue Validators
- Evidence Validators
Pre-recon, recon, and report agents just check if their deliverable file exists:
Agent Execution Lifecycle
Here’s how an agent is executed from start to finish:Agent Execution Service
Activity delegates to
AgentExecutionService in src/services/agent-execution.ts:- Loads agent definition from registry
- Loads and prepares prompt template
- Configures MCP servers (Playwright + Shannon Helper)
- Invokes Claude Agent SDK
SDK Execution
src/ai/claude-executor.ts handles the actual AI execution:- Streams messages from Claude
- Updates progress indicators
- Logs to audit system
- Handles errors and retry logic
Phase Mapping
Agents are grouped into phases for metrics and progress reporting: File:src/session-manager.ts:114-128
Model Tier Selection
Different agents use different Claude models based on task complexity:Large (Opus)
Agents:
pre-reconDeep source code analysis requires maximum reasoning capability.Medium (Sonnet)
Agents: All vuln and exploit agents,
reconBalanced performance and cost for most security tasks. This is the default.Small (Haiku)
Agents:
reportFast and cost-efficient for summarization tasks.Adding a New Agent
To add a new agent to Shannon:Next Steps
Temporal Orchestration
Learn how workflows coordinate agents and handle failures
Adding Agents
Step-by-step guide for extending Shannon with new agents
Workflow Phases
Understand how agents are organized into phases
Agent Registry
Complete reference of all agent definitions
