The Synchronous Orchestrator¶
The heart of Emmu is the Synchronous Orchestrator. It acts as the intelligent routing engine that sits between the user interface and the backend LLMs, ensuring that tasks are handled sequentially but processed asynchronously to prevent system lockups.
[!NOTE] The Problem: Traditional "Agentic" loops (like AutoGPT) often get stuck in endless thought-loops, locking the terminal and failing to return actionable results.
The Solution: Emmu's orchestrator is strictly non-blocking. It relies on explicit Planner/Reviewer phases to evaluate code before execution, ensuring the AI only takes action when it is mathematically or logically sound.
1. The Non-Blocking Engine¶
Emmu uses an asynchronous execution model (asyncio) beneath a synchronous-style planner. When a user submits a complex prompt (e.g., "Find the SQL injection on this domain and exploit it"):
- Intake & Classification: The Orchestrator intercepts the prompt and parses it.
- Specialist Selection: It queries the
SpecialistRegistryto find the exact agent capable of this task (e.g.,sqli_expert). - Execution Offload: The task is handed off to the Specialist. The UI remains non-blocked, meaning you can continue interacting with the Web Dashboard or terminal while the agent works in the background.
2. The Planner-Reviewer Loop¶
To eliminate the most critical issue in AI Engineering—Hallucination—Emmu enforces a strict internal validation gate.
The Problem with Zero-Shot Agents¶
If an agent is told to write an exploit script, it might generate a script that looks correct but contains syntax errors, imports non-existent libraries, or targets the wrong endpoint. If executed blindly, this breaks the automation chain.
The Emmu Solution: The Anti-Hallucination Reviewer¶
Emmu introduces a dedicated reviewer specialist model. Before any critical action is taken (such as executing a bash script or verifying a CTF flag), the workflow enters a Planner-Reviewer loop:
graph TD
A[Task Dispatched] --> B(Specialist Generates Exploit)
subgraph Reviewer Gate
B --> C{Reviewer Analysis}
C -->|Syntax Error / Bad Logic| D[Feedback Sent Back to Specialist]
D --> B
end
C -->|Verified & Correct| E[Execution / Tool Call]
How it works: 1. The Specialist generates a plan or a script. 2. The Reviewer reads the output. The Reviewer’s system prompt strictly instructs it to be "critical, suspicious, and highly detail-oriented." 3. If the Reviewer finds a flaw, it rejects the action and forces the Specialist to fix it. 4. Only upon Reviewer approval does the Orchestrator trigger the native tool call (e.g., writing the file to disk or executing it).
Next Steps¶
Understanding how the Orchestrator routes tasks is only half the battle. To understand who it routes tasks to, explore the Agent Specialists (The Workforce) documentation.