# rootfaiyaz/argus architecture

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

- Interactive diagram: https://gitdiagram.com/rootfaiyaz/argus
- Repository: https://github.com/rootfaiyaz/argus

## Overview

Argus is a local coding and authorized-pentesting terminal agent. The operator interacts through the REPL; the agent builds a profile- and context-aware conversation, calls the local model, and handles tool requests through permissions and dispatch. Tools support coding and security work, with engagement tracking and durable session, memory, and model-cache state. README documents the local llama-server boundary, web access through skills, and reporting capabilities. Some subsystem links rely on README or SOURCE INDEX references; unsampled internals are not assumed to call one another.

Main entry points: [`argus/agent.py`](https://github.com/rootfaiyaz/argus/blob/main/argus/agent.py) (Agent loop), [`argus/tools/registry.py`](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/registry.py) (Tool registry and dispatch), [`argus/__main__.py`](https://github.com/rootfaiyaz/argus/blob/main/argus/__main__.py) (REPL and commands), [`argus/client.py`](https://github.com/rootfaiyaz/argus/blob/main/argus/client.py) (LlamaClient)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Operator interaction"]
  node_repl["REPL and commands<br/>[__main__.py]"]
  node_terminal["Terminal rendering<br/>[ui.py]"]
end

subgraph group_agent["Agent orchestration"]
  node_agentloop["Agent loop<br/>[agent.py]"]
  node_config["Runtime config<br/>[config.py]"]
  node_profiles["Coding and pentest profiles<br/>[profiles.py]"]
  node_conversation["History and compaction<br/>[context.py]"]
  node_permissions["Tool permissions<br/>[permissions.py]"]
end

subgraph group_tools["Agent capabilities"]
  node_registry["Tool registry and dispatch<br/>[registry.py]"]
  node_filetools["File operations<br/>[fs.py]"]
  node_search["Content search<br/>[search.py]"]
  node_shell["Shell execution<br/>[shell.py]"]
  node_skilltools["Skill tools<br/>[meta.py]"]
  node_skills["Bundled and installed skills<br/>[skills.py]"]
  node_engtools["Engagement tools"]
end

subgraph group_state["Durable state"]
  node_engagement[("Coverage and findings<br/>[engagement.py]")]
  node_memory[("Cross-session memory<br/>[memory.py]")]
  node_sessions[("Saved sessions<br/>[sessions.py]")]
end

subgraph group_model["Local model"]
  node_client["LlamaClient<br/>[client.py]"]
  node_server["llama-server"]
end

node_operator(("Operator"))
node_browser["Browser automation"]
node_target[("Local files and targets")]

node_operator -->|"submits prompts"| node_repl
node_repl -->|"runs turns"| node_agentloop
node_agentloop -->|"renders updates"| node_terminal
node_repl -->|"renders commands"| node_terminal
node_agentloop -->|"uses settings"| node_config
node_agentloop -->|"selects role"| node_profiles
node_agentloop -->|"updates history"| node_conversation
node_agentloop -->|"requests completions"| node_client
node_client -->|"streams requests"| node_server
node_agentloop -->|"checks tool calls"| node_permissions
node_agentloop -->|"dispatches calls"| node_registry
node_registry -->|"registers tools"| node_filetools
node_registry -->|"registers tools"| node_search
node_registry -->|"registers tools"| node_shell
node_registry -->|"registers tools"| node_skilltools
node_registry -->|"registers tools"| node_engtools
node_search -->|"uses path helpers"| node_filetools
node_skilltools -->|"loads skill bodies"| node_skills
node_skills -.->|"guides automation"| node_browser
node_shell -.->|"runs scripts"| node_browser
node_filetools -->|"reads and writes"| node_target
node_browser -.->|"drives browser"| node_target
node_engtools -->|"records coverage"| node_engagement
node_agentloop -->|"restores tracker"| node_engagement
node_agentloop -->|"saves sessions"| node_sessions
node_agentloop -->|"uses remembered facts"| node_memory
node_client -.->|"saves cache"| node_target
node_engagement -->|"reinjects tracker"| node_conversation

click node_repl "https://github.com/rootfaiyaz/argus/blob/main/argus/__main__.py"
click node_terminal "https://github.com/rootfaiyaz/argus/blob/main/argus/ui.py"
click node_agentloop "https://github.com/rootfaiyaz/argus/blob/main/argus/agent.py"
click node_config "https://github.com/rootfaiyaz/argus/blob/main/argus/config.py"
click node_profiles "https://github.com/rootfaiyaz/argus/blob/main/argus/profiles.py"
click node_conversation "https://github.com/rootfaiyaz/argus/blob/main/argus/context.py"
click node_permissions "https://github.com/rootfaiyaz/argus/blob/main/argus/permissions.py"
click node_registry "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/registry.py"
click node_filetools "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/fs.py"
click node_search "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/search.py"
click node_shell "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/shell.py"
click node_skilltools "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/meta.py"
click node_skills "https://github.com/rootfaiyaz/argus/blob/main/argus/skills.py"
click node_engtools "https://github.com/rootfaiyaz/argus/blob/main/argus/tools/engagement_tools.py"
click node_engagement "https://github.com/rootfaiyaz/argus/blob/main/argus/engagement.py"
click node_memory "https://github.com/rootfaiyaz/argus/blob/main/argus/memory.py"
click node_sessions "https://github.com/rootfaiyaz/argus/blob/main/argus/sessions.py"
click node_client "https://github.com/rootfaiyaz/argus/blob/main/argus/client.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_repl,node_terminal,node_browser toneBlue
class node_agentloop,node_config,node_profiles,node_conversation,node_permissions,node_target toneAmber
class node_registry,node_filetools,node_search,node_shell,node_skilltools,node_skills,node_engtools toneMint
class node_engagement,node_memory,node_sessions toneRose
class node_client,node_server,node_operator toneIndigo
```

## Components

### Operator interaction

- [REPL and commands](https://github.com/rootfaiyaz/argus/blob/main/argus/__main__.py): `argus/__main__.py`
- [Terminal rendering](https://github.com/rootfaiyaz/argus/blob/main/argus/ui.py): `argus/ui.py`

### Agent orchestration

- [Agent loop](https://github.com/rootfaiyaz/argus/blob/main/argus/agent.py): `argus/agent.py`
- [Runtime config](https://github.com/rootfaiyaz/argus/blob/main/argus/config.py): `argus/config.py`
- [Coding and pentest profiles](https://github.com/rootfaiyaz/argus/blob/main/argus/profiles.py): `argus/profiles.py`
- [History and compaction](https://github.com/rootfaiyaz/argus/blob/main/argus/context.py): `argus/context.py`
- [Tool permissions](https://github.com/rootfaiyaz/argus/blob/main/argus/permissions.py): `argus/permissions.py`

### Agent capabilities

- [Tool registry and dispatch](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/registry.py): `argus/tools/registry.py`
- [File operations](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/fs.py): `argus/tools/fs.py`
- [Content search](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/search.py): `argus/tools/search.py`
- [Shell execution](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/shell.py): `argus/tools/shell.py`
- [Skill tools](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/meta.py): `argus/tools/meta.py`
- [Bundled and installed skills](https://github.com/rootfaiyaz/argus/blob/main/argus/skills.py): `argus/skills.py`
- [Engagement tools](https://github.com/rootfaiyaz/argus/blob/main/argus/tools/engagement_tools.py): `argus/tools/engagement_tools.py`

### Durable state

- [Coverage and findings](https://github.com/rootfaiyaz/argus/blob/main/argus/engagement.py): `argus/engagement.py`
- [Cross-session memory](https://github.com/rootfaiyaz/argus/blob/main/argus/memory.py): `argus/memory.py`
- [Saved sessions](https://github.com/rootfaiyaz/argus/blob/main/argus/sessions.py): `argus/sessions.py`

### Local model

- [LlamaClient](https://github.com/rootfaiyaz/argus/blob/main/argus/client.py): `argus/client.py`
- **llama-server**

### Other components

- **Operator**
- **Browser automation**
- **Local files and targets**

## Connections

- Operator → REPL and commands: submits prompts (evidence: `README.md`)
- REPL and commands → Agent loop: runs turns (evidence: `argus/__main__.py`)
- Agent loop → Terminal rendering: renders updates (evidence: `argus/agent.py`)
- REPL and commands → Terminal rendering: renders commands (evidence: `argus/__main__.py`)
- Agent loop → Runtime config: uses settings (evidence: `argus/agent.py`)
- Agent loop → Coding and pentest profiles: selects role (evidence: `argus/agent.py`)
- Agent loop → History and compaction: updates history (evidence: `argus/agent.py`)
- Agent loop → LlamaClient: requests completions (evidence: `README.md`)
- LlamaClient → llama-server: streams requests (evidence: `README.md`)
- Agent loop → Tool permissions: checks tool calls (evidence: `argus/agent.py`)
- Agent loop → Tool registry and dispatch: dispatches calls (evidence: `argus/agent.py`)
- Tool registry and dispatch → File operations: registers tools (evidence: `argus/tools/registry.py`)
- Tool registry and dispatch → Content search: registers tools (evidence: `argus/tools/registry.py`)
- Tool registry and dispatch → Shell execution: registers tools (evidence: `argus/tools/registry.py`)
- Tool registry and dispatch → Skill tools: registers tools (evidence: `argus/tools/registry.py`)
- Tool registry and dispatch → Engagement tools: registers tools (evidence: `argus/tools/registry.py`)
- Content search → File operations: uses path helpers (evidence: `argus/tools/search.py`)
- Skill tools → Bundled and installed skills: loads skill bodies (evidence: `README.md`)
- Bundled and installed skills → Browser automation: guides automation (evidence: `README.md`)
- Shell execution → Browser automation: runs scripts (evidence: `README.md`)
- File operations → Local files and targets: reads and writes (evidence: `README.md`)
- Browser automation → Local files and targets: drives browser (evidence: `README.md`)
- Engagement tools → Coverage and findings: records coverage (evidence: `argus/tools/engagement_tools.py`)
- Agent loop → Coverage and findings: restores tracker (evidence: `argus/agent.py`)
- Agent loop → Saved sessions: saves sessions (evidence: `argus/agent.py`)
- Agent loop → Cross-session memory: uses remembered facts (evidence: `argus/agent.py`)
- LlamaClient → Local files and targets: saves cache (evidence: `README.md`)
- Coverage and findings → History and compaction: reinjects tracker (evidence: `argus/context.py`)
