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.
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.
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.
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
- The gate is code, not a prompt. Because every command is parsed and checked in Rust before execution, a jailbroken or confused model still cannot touch an out-of-scope target.
- Isolation by default. Tools never run on the host — only inside a disposable Docker container with hard timeouts, so a misbehaving tool can't harm your machine.
- Local & private. Findings and the audit log stay in local SQLite; API keys stay in the OS keychain. Nothing is sent anywhere except your chosen AI provider.
- Provider-agnostic. One OpenAI-compatible transport plus a native Anthropic client means you can switch models — cloud or local — without changing anything else.