# mr-destroyer/zimzilla architecture

> Architecture diagram of the GitHub repository mr-destroyer/zimzilla, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mr-destroyer/zimzilla
- Repository: https://github.com/mr-destroyer/zimzilla

## Overview

ZIMZILLA is a terminal coding agent: the user describes a task, the agent streams model responses and tool requests, tools inspect or change the project under mode and scope controls, and the terminal shows results. Additional documented capabilities include session persistence, model/source switching, web research, and autonomous security investigations. The graph preserves major indexed modules; several connections rely on README descriptions or index references, and unsampled implementation details are not inferred.

Main entry points: [`zimzilla/ui/app.py`](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/app.py) (Terminal App), [`zimzilla/agent.py`](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/agent.py) (Agent Loop), [`zimzilla/sources.py`](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/sources.py) (Source Dispatch), [`zimzilla/tools.py`](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/tools.py) (Tool Execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Agent Runtime"]
  node_agent["Agent Loop<br/>[agent.py]"]
  node_tools["Tool Execution<br/>[tools.py]"]
  node_sandbox["Command Sandbox<br/>[sandbox.py]"]
  node_websearch["Web Research<br/>[websearch.py]"]
end

subgraph group_terminal["Terminal Experience"]
  node_app["Terminal App<br/>[app.py]"]
  node_theme["Theme Palette<br/>[theme.py]"]
  node_renderers["Transcript Renderers<br/>[renderers.py]"]
  node_markdown["Markdown Renderer<br/>[markdown.py]"]
  node_banner["Terminal Banner<br/>[banner.py]"]
end

subgraph group_models["Model Sources"]
  node_sources["Source Dispatch<br/>[sources.py]"]
  node_logfare["Logfare Gateway<br/>[logfare.py]"]
  node_aihubmix["AIHubMix<br/>[aihubmix.py]"]
  node_antseed["Antseed<br/>[antseed.py]"]
  node_ldxhub["LDXHub<br/>[ldxhub.py]"]
  node_openrouter["OpenRouter<br/>[openrouter.py]"]
  node_unorouter["UnoRouter<br/>[unorouter.py]"]
end

subgraph group_security["Security Workflows"]
  node_hunt["Bug Hunt<br/>[hunt.py]"]
  node_team["Worker Team<br/>[team.py]"]
  node_osint["OSINT Router<br/>[osint.py]"]
  node_osinttree["OSINT Tree<br/>[osint_tree.py]"]
  node_ad["Ad Recon<br/>[ad.py]"]
  node_crack["Credential Audit<br/>[crack.py]"]
  node_phish["Phishing Workflow<br/>[phish.py]"]
end

subgraph group_state["Policy and State"]
  node_config["Runtime Config<br/>[config.py]"]
  node_scope["Scope Guard<br/>[scope.py]"]
  node_scopevalidator["Scope Validation<br/>[scope_validator.py]"]
  node_session["Session Memory<br/>[session.py]"]
end

node_operator(("Operator"))

node_operator -->|"drives"| node_app
node_app -.->|"runs turns"| node_agent
node_agent -->|"dispatches tools"| node_tools
node_agent -->|"reads policy"| node_config
node_agent -->|"checks scope"| node_scope
node_tools -->|"uses"| node_sandbox
node_tools -->|"uses"| node_websearch
node_tools -->|"checks scope"| node_scope
node_tools -->|"uses"| node_ldxhub
node_agent -->|"selects source"| node_sources
node_sources -->|"dispatches"| node_logfare
node_sources -->|"dispatches"| node_aihubmix
node_sources -->|"dispatches"| node_antseed
node_sources -->|"dispatches"| node_openrouter
node_sources -->|"dispatches"| node_unorouter
node_hunt -->|"runs workers"| node_agent
node_hunt -->|"uses workers"| node_team
node_app -->|"routes commands"| node_hunt
node_app -->|"routes commands"| node_osint
node_app -->|"routes commands"| node_ad
node_app -->|"routes commands"| node_crack
node_app -->|"routes commands"| node_phish
node_osint -->|"hands off playbook"| node_agent
node_osinttree -->|"supports tree view"| node_osint
node_app -->|"manages sessions"| node_session
node_scopevalidator -->|"validates rules"| node_scope
node_app -->|"selects palette"| node_theme
node_app -->|"renders events"| node_renderers
node_renderers -->|"renders markdown"| node_markdown
node_app -->|"shows banner"| node_banner
node_agent -->|"uses document jobs"| node_ldxhub

click node_app "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/app.py"
click node_agent "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/agent.py"
click node_tools "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/tools.py"
click node_sandbox "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/sandbox.py"
click node_websearch "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/websearch.py"
click node_config "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/config.py"
click node_scope "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/scope.py"
click node_scopevalidator "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/scope_validator.py"
click node_session "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/session.py"
click node_sources "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/sources.py"
click node_logfare "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/logfare.py"
click node_aihubmix "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/aihubmix.py"
click node_antseed "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/antseed.py"
click node_ldxhub "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ldxhub.py"
click node_openrouter "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/openrouter.py"
click node_unorouter "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/unorouter.py"
click node_hunt "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/hunt.py"
click node_team "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/team.py"
click node_osint "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/osint.py"
click node_osinttree "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/osint_tree.py"
click node_ad "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ad.py"
click node_crack "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/crack.py"
click node_phish "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/phish.py"
click node_theme "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/theme.py"
click node_renderers "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/renderers.py"
click node_markdown "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/markdown.py"
click node_banner "https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/banner.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent,node_tools,node_sandbox,node_websearch toneBlue
class node_app,node_theme,node_renderers,node_markdown,node_banner toneAmber
class node_sources,node_logfare,node_aihubmix,node_antseed,node_ldxhub,node_openrouter,node_unorouter toneMint
class node_hunt,node_team,node_osint,node_osinttree,node_ad,node_crack,node_phish toneRose
class node_config,node_scope,node_scopevalidator,node_session,node_operator toneIndigo
```

## Components

### Agent Runtime

- [Agent Loop](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/agent.py): `zimzilla/agent.py`
- [Tool Execution](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/tools.py): `zimzilla/tools.py`
- [Command Sandbox](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/sandbox.py): `zimzilla/sandbox.py`
- [Web Research](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/websearch.py): `zimzilla/websearch.py`

### Terminal Experience

- [Terminal App](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/app.py): `zimzilla/ui/app.py`
- [Theme Palette](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/theme.py): `zimzilla/theme.py`
- [Transcript Renderers](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/renderers.py): `zimzilla/ui/renderers.py`
- [Markdown Renderer](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/markdown.py): `zimzilla/ui/markdown.py`
- [Terminal Banner](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ui/banner.py): `zimzilla/ui/banner.py`

### Model Sources

- [Source Dispatch](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/sources.py): `zimzilla/sources.py`
- [Logfare Gateway](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/logfare.py): `zimzilla/logfare.py`
- [AIHubMix](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/aihubmix.py): `zimzilla/aihubmix.py`
- [Antseed](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/antseed.py): `zimzilla/antseed.py`
- [LDXHub](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ldxhub.py): `zimzilla/ldxhub.py`
- [OpenRouter](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/openrouter.py): `zimzilla/openrouter.py`
- [UnoRouter](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/unorouter.py): `zimzilla/unorouter.py`

### Security Workflows

- [Bug Hunt](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/hunt.py): `zimzilla/hunt.py`
- [Worker Team](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/team.py): `zimzilla/team.py`
- [OSINT Router](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/osint.py): `zimzilla/osint.py`
- [OSINT Tree](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/osint_tree.py): `zimzilla/osint_tree.py`
- [Ad Recon](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/ad.py): `zimzilla/ad.py`
- [Credential Audit](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/crack.py): `zimzilla/crack.py`
- [Phishing Workflow](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/phish.py): `zimzilla/phish.py`

### Policy and State

- [Runtime Config](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/config.py): `zimzilla/config.py`
- [Scope Guard](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/scope.py): `zimzilla/scope.py`
- [Scope Validation](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/scope_validator.py): `zimzilla/scope_validator.py`
- [Session Memory](https://github.com/mr-destroyer/zimzilla/blob/main/zimzilla/session.py): `zimzilla/session.py`

### Other components

- **Operator**

## Connections

- Operator → Terminal App: drives
- Terminal App → Agent Loop: runs turns (evidence: `zimzilla/ui/app.py`)
- Agent Loop → Tool Execution: dispatches tools (evidence: `zimzilla/agent.py`)
- Agent Loop → Runtime Config: reads policy (evidence: `zimzilla/agent.py`)
- Agent Loop → Scope Guard: checks scope (evidence: `zimzilla/agent.py`)
- Tool Execution → Command Sandbox: uses (evidence: `zimzilla/tools.py`)
- Tool Execution → Web Research: uses (evidence: `zimzilla/tools.py`)
- Tool Execution → Scope Guard: checks scope (evidence: `zimzilla/tools.py`)
- Tool Execution → LDXHub: uses (evidence: `zimzilla/tools.py`)
- Agent Loop → Source Dispatch: selects source (evidence: `zimzilla/agent.py`)
- Source Dispatch → Logfare Gateway: dispatches (evidence: `zimzilla/sources.py`)
- Source Dispatch → AIHubMix: dispatches (evidence: `zimzilla/sources.py`)
- Source Dispatch → Antseed: dispatches (evidence: `zimzilla/sources.py`)
- Source Dispatch → OpenRouter: dispatches (evidence: `zimzilla/sources.py`)
- Source Dispatch → UnoRouter: dispatches (evidence: `zimzilla/sources.py`)
- Bug Hunt → Agent Loop: runs workers (evidence: `zimzilla/hunt.py`)
- Bug Hunt → Worker Team: uses workers (evidence: `zimzilla/hunt.py`)
- Terminal App → Bug Hunt: routes commands (evidence: `zimzilla/ui/app.py`)
- Terminal App → OSINT Router: routes commands (evidence: `zimzilla/ui/app.py`)
- Terminal App → Ad Recon: routes commands (evidence: `zimzilla/ui/app.py`)
- Terminal App → Credential Audit: routes commands (evidence: `zimzilla/ui/app.py`)
- Terminal App → Phishing Workflow: routes commands (evidence: `zimzilla/ui/app.py`)
- OSINT Router → Agent Loop: hands off playbook (evidence: `zimzilla/osint.py`)
- OSINT Tree → OSINT Router: supports tree view (evidence: `zimzilla/osint_tree.py`)
- Terminal App → Session Memory: manages sessions (evidence: `zimzilla/ui/app.py`)
- Scope Validation → Scope Guard: validates rules (evidence: `zimzilla/scope_validator.py`)
- Terminal App → Theme Palette: selects palette (evidence: `zimzilla/ui/app.py`)
- Terminal App → Transcript Renderers: renders events (evidence: `zimzilla/ui/app.py`)
- Transcript Renderers → Markdown Renderer: renders markdown (evidence: `zimzilla/ui/renderers.py`)
- Terminal App → Terminal Banner: shows banner (evidence: `zimzilla/ui/app.py`)
- Agent Loop → LDXHub: uses document jobs (evidence: `zimzilla/agent.py`)
