Architecture

How Aegis plans, gates, and runs an authorized assessment — end to end.

Aegis is a single native desktop application built with Tauri: a React UI over a Rust core. There is no server and no cloud backend — your engagements, findings and audit log live in a local SQLite database, and API keys live in your operating system's keychain. The two external dependencies are the AI provider you choose and a local Docker sandbox where scanning tools actually run.

The defining design choice: the scope gate sits between the orchestrator and the sandbox. Nothing reaches a tool without passing a code-level, default-deny check against the engagement's authorized targets — independent of anything the AI says.

System context (C4)

At the highest level, one person drives Aegis, which talks to an AI provider for reasoning and to a Docker sandbox for execution.

Defines scope · runs scans · reviews findings Plans & triages · HTTPS Executes tools · streamed Security Engineer Runs authorized assessments Aegis Desktop security-assessment cockpit · Tauri AI Providers OpenAI · Anthropic · Azure OpenRouter · LiteLLM · Ollama external system Docker Sandbox Disposable container with security tools external system

Container model (C4)

Inside the app, the Rust core is the hub. The UI only ever talks to it over Tauri IPC; the core owns the scope gate, the provider clients, the sandbox lifecycle and the local store.

Aegis Desktop App · Tauri Uses Commands · Tauri IPC checks every command reads / writes resolves keys chat + tools · HTTPS runs tools · streamed Security Engineer React UI Engagements · Scan · Findings · Dashboard Rust Core Orchestrator · agent loop provider clients · reports Scope Engine Target extraction default-deny gate Local Store SQLite · findings immutable audit OS Keychain Provider API keys AI Providers OpenAI-compatible + Anthropic external system Docker Sandbox nmap · nuclei · httpx · sqlmap external system

The scan loop (sequence)

In Autonomous mode the agent proposes commands and the core runs them — but only after the scope gate approves each one. In Assisted mode the same loop pauses for your explicit approval before every command.

sequenceDiagram
  autonumber
  actor U as Engineer
  participant UI as React UI
  participant OR as Orchestrator (Rust)
  participant GT as Scope Gate
  participant AI as AI Provider
  participant BX as Docker Sandbox
  participant DB as SQLite + Audit

  U->>UI: Start assessment (goal, mode)
  UI->>OR: start_flow(config)
  OR->>BX: ensure sandbox container
  loop until goal reached or step budget spent
    OR->>AI: chat(system + context, tools)
    AI-->>OR: propose terminal command
    OR->>GT: evaluate(command, engagement)
    alt target out of scope
      GT-->>OR: BLOCKED (offending targets)
      OR->>DB: record(blocked)
      OR->>AI: feed refusal — pick an in-scope action
    else in scope
      GT-->>OR: ALLOWED
      opt Assisted mode
        OR->>UI: approval_request
        U-->>OR: approve / skip
      end
      OR->>DB: record(allowed)
      OR->>BX: exec(command)
      BX-->>OR: streamed stdout / stderr
      OR->>UI: live terminal + agent feed
      OR->>AI: feed tool output
    end
  end
  OR->>AI: triage transcript → findings (JSON)
  AI-->>OR: severity-ranked findings
  OR->>DB: store findings
  OR->>UI: render findings + dashboard
    

Why this shape

Back to overview