The 3-Layer Orchestration Engine: How Lory Solves Context Exhaustion | Lorikeet Security Skip to main content
Back to Blog

The 3-Layer Orchestration Engine: How Lory Solves Context Exhaustion

Lorikeet Security Engineering September 23, 2026 11 min read Engineering & AI Architecture

Building an autonomous AI penetration testing agent is deceptively difficult. Early attempts by industry researchers typically involved feeding an entire penetration testing methodology and target URL into a single long-running LLM conversation.

Within 30 minutes, this architecture breaks down. The context window is flooded with megabytes of raw HTML, port scan dumps, and terminal outputs. The model suffers from context degradation (forgetting vulnerabilities discovered earlier), hallucinates tool arguments, and hits Input Tokens Per Minute (ITPM) rate limits.

To solve this fundamental challenge, Lorikeet Security engineered the 3-Layer Orchestration Engine (LoryOrchestrator).

The Architectural Breakthrough: Instead of executing an entire engagement in one degrading conversation, Lory decouples deterministic reconnaissance from vector exploitation, running independent, clean context passes for each attack class.

Layer 3: Deterministic Reconnaissance Sweep (LoryEnumerator)

Zero-LLM Fast Recon

Before involving a single LLM token, Layer 3 executes standard network and web enumeration tools: http_probe, dns_recon, port_scan, web_fingerprint, and nuclei_scan.

It ingests raw outputs and compiles a compact JSON Recon Digest (~2 KB to 5 KB). This digest provides exact HTTP status codes, detected frameworks, server headers, and exposed endpoints without polluting the reasoning loop with thousands of lines of unneeded terminal text.

Layer 2: Per-Vector Fan-Out (LoryEngine)

Isolated Reasoning Contexts

Lory splits the engagement across distinct attack vectors: SQL Injection, Broken Object Level Authorization (BOLA/IDOR), Server-Side Request Forgery (SSRF), Authentication Flaws, and Remote Code Execution.

For each vector in scope, an isolated LoryEngine instance spins up:

  1. Seeded with a pristine context window containing only the core rules of engagement, the specific attack vector’s SKILL.md playbook, and the Layer 3 Recon Digest.
  2. Executes targeted hypotheses using sandboxed tools (sqlmap_probe, service_audit, content_fetch).
  3. Constructs validated, reproducible finding payloads with exact curl commands when vulnerabilities are confirmed.

Layer 1: Context Budgeting, Compaction & Rate-Limit Throttling

Mathematical Token Caps & Compaction

Layer 1 governs compute budgets and prevents runaway loops.

Lory waving

Hi, I'm Lory! Need help finding the right service? Click to chat!