How an LLM Multi-Agent Offensive Security System Plans, Executes, Verifies and Governs Autonomous Penetration Tests
About This Book
Introduction: The Shape of Autonomous Offense
- The Central Thesis: Autonomy Through Constraint
- The Dual-Graph Core
- Evidence as First-Class Data
- Scope and Methodology
- How to Read This Book
- Why This Matters
Part I: Foundations and System Context
Chapter 1: ARTEX in the Ecosystem of Agentic Offensive Security
- The Rise of Autonomous Offensive Frameworks
- ARTEX’s Provenance
- The Threat Landscape Shift
- What “Autonomous Penetration Testing” Means (and Does Not Mean)
- Why the Architecture Is the Interesting Part
Chapter 2: The Core Design Philosophy: Autonomy Through Constraint
- The Two-Graph Thesis
- The Planner/Worker Split
- Evidence as First-Class Data
- The Control Plane
- Untrusted Data Boundaries
- Design Decisions and Their Rationale
- The Recurring Pattern
Part II: System Architecture
Chapter 3: High-Level Architecture and Deployment Model
- Component Map
- Deployment Options
- The Single-Binary Model and go:embed
- Ports, Configuration and the Environment Surface
- Trust Boundaries
Chapter 4: The Dual-Graph Data Model
- The Schema at a Glance
- The Asset Graph
- The Exploration Graph
- Why Graphs and Not a Flat Task List
- The Cold-Digest Mechanism
- Schema Migrations and Idempotent Startup
- The Task Layer
- Cross-Task Relationships
- The Activity Ledger
Chapter 5: The Server, Manager and Engine
- The HTTP Server
- The Manager
- The Task Handle
- The Engine: Planner Loop
- The Engine: Worker Loops
- Intent Claiming and Crash Recovery
- Per-Work Control
- Idle-Turn Nudge
- Execution Context
- LLM Pool and Failover
- Activity Emission
- Error Handling
Part III: The Agent Harness (norma SDK)
Chapter 6: The norma SDK: ARTEX’s Agent Runtime
- What norma Is
- agentcore: The Session and Execution Loop
- llm.Provider: The Model Abstraction
- tool.CoreTool: The Tool Specification
- permission and Hooks
- transcript: Conversation Persistence
- harness.HookRunner and the Hook Registry
Chapter 7: The Agent Execution Loop
- agentcore.Options: The Configuration Surface
- The Turn Loop
- Streaming vs. Non-Streaming
- Tool Calling: From Model Decision to Executable Action
- Output Spill and Truncation
- Termination and Settlement
Chapter 8: Context Management, Compaction and NOA
- The Compaction Window
- Cold-Node Compaction
- The NOA Experimental Mechanism
- TodoStore: Planning Scratchpads
- Deferred Tools and the Unlock Set
- Context Telemetry
Part IV: The Planner
Chapter 9: The Planner: ARTEX’s Decision Brain
- The Planner’s Role
- The Event-Driven Wake-Up
- The Situational Block
- Constraints and the Code-Owned Prompt
- The Hard Floor Rule
- The Planner’s Tool Set
- The Planning Prompt
Chapter 10: Planning Semantics: Goals, Intents and Attack Chains
- Goals and the prove_goal Contract
- Intents: Open Exploration Directions
- Lineage: Parents and Yields
- Serial Exploit Chains
- Anti-Stagnation by Discipline
- Coverage: The Ledger and the Denominator
- The Force-Directed Coverage Graph
Part V: The Worker
Chapter 11: The Worker: Bounded Execution
- The Worker’s Contract
- Claiming and Per-Intent Session Identity
- The Worker’s Tool Surface
- Write-Back Discipline
- The Report Contract
- Budget Discipline and Settlement
- Resume and Continuation
- Operator Handoff
Chapter 12: Tool Discovery, Augmentation and RAG
- The Base Tool Set
- Domain Tools: The Dual-Graph Interface
- AugmentTools: Skills, MCP and the Unlock Set
- Deferred Tools: The Catalog That Fits
- Custom Tools and the Execution Spec
- Tool Surface Reduction: Why the Worker Loses MultiEdit/Glob/Grep
Chapter 13: Reconnaissance, Enumeration and the Scanner Toolchain
- The Image Toolchain: Lean by Default
- The Recording Proxy as the Reconnaissance Spine
- The Enrich Engine
- Asset Insertion and Coverage-Driven Exploration
- OSINT and Web Search Backends
- The Browser Toolchain for Authenticated Targets
Part VI: Evidence, Findings and Verification
Chapter 14: The Recording MITM Proxy and Traffic Store
- The Proxy Architecture
- The Traffic Store
- Traffic Search, Retrieval and Lifecycle
- How Traffic Becomes Finding Evidence
Chapter 15: Findings, Provenance and Verification
- The Finding Lifecycle
- The Reporter: Findings Become Reports
- Evidence Binding and the Evidence Store
- The Retester Agent
- Provenance and Verification: What Is Enforced Where
- Finding Notifications
Part VII: Control, Safety and Governance
Chapter 16: The Interception Gate and Approval Workflow
- The Intercept Package
- The LLM Fallback Judge
- Approval Rules: String and Regex
- The PreToolUse Hook and Guard Wiring
- Asset Interception: Gating the Plan
- Decision Records
- The Human in the Loop
Chapter 17: Scope, Budgets and Concurrency
- Scope Rows and the Coverage Denominator
- Task and Run Budgets: Time and Steps
- Concurrency: The Real Blast-Radius Control
- The Honest Gap: No Egress Pacing
Chapter 18: Prompt Injection Defense and Untrusted Output
- The Threat Model: The Target as an Adversarial Prompt Source
- What the Code Owns: Prompts, Capability, Context
- Review-Context Isolation: The Judge Cannot Be Poisoned by the Transcript
- Verification as the Injection Backstop
- The Notifications Escalator: An Injection Defense Outside the Agent Loop
Part VIII: Operations, Reliability and Extension
Chapter 19: Observability, Debugging and Reliability
- The Activity Ledger and Per-Step Traces
- SSE Streaming and the Live Console
- Token Accounting and LLM Usage Records
- Session Transcripts and the llmrec Recorder
- Error Recovery: The Five Retry Layers
- Operations: Pool, Backups, Self-Update
Chapter 20: Extension Points, Skills, MCP and Multi-Task Orchestration
- Skills: The Shipped Catalog
- MCP Servers: stdio, HTTP and SSE
- Memory and the Workspace
- Multi-Task Orchestration: Cross-Task Inheritance and the Blackboard
- The LLM Chain: Per-Task Failover
- Extending the Agent Roles
Conclusion: The Unified Mental Model
- Synthesis: Connecting All Subsystems
- The Most Significant Architectural Strengths
- The Most Significant Limitations
- The Broader Engineering Principles
- Where the Field Is Going
References
Appendix A: Source File Map
- Application packages
- The vendored SDK
- Frontend and operations
Appendix B: Environment Variables and Configuration
- Environment variables
config.example.json- Runtime settings (UI, persisted to the
settingstable) - Ports and paths
- A note on secrets
