# saurav021406/argus2.o architecture

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

- Interactive diagram: https://gitdiagram.com/saurav021406/argus2.o
- Repository: https://github.com/saurav021406/argus2.o

## Overview

Argus combines Windows automation interfaces with a separate learned desktop-agent research workflow. In the research path, people record demonstrations; episodes are validated and audited, transformed into features and training examples, and used to train a visual policy. At runtime, an instruction is planned into sub-goals, the policy predicts actions, and a safety-checked executor can act on the desktop; suites and run summaries support evaluation. The README documents MCP server modes and database integrations, but the large desktop/ML server source was not sampled, so its internal tool relationships are not expanded here.

Main entry points: [`argus/data/episode.py`](https://github.com/saurav021406/argus2.o/blob/main/argus/data/episode.py) (Episode store), [`argus/core/planner.py`](https://github.com/saurav021406/argus2.o/blob/main/argus/core/planner.py) (Task planner), [`argus/core/__main__.py`](https://github.com/saurav021406/argus2.o/blob/main/argus/core/__main__.py) (Agent command), [`argus/core/agent.py`](https://github.com/saurav021406/argus2.o/blob/main/argus/core/agent.py) (Agent loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Automation interfaces"]
  node_desktop_server["Desktop MCP<br/>[argus_server.py]"]
  node_mysql_server["MySQL MCP<br/>[argus_server.py]"]
  node_ml_server["ML monitoring MCP<br/>[argus_server.py]"]
  node_sql_server["SQL Server MCP<br/>[argus_sqlserver.py]"]
  node_local_cli["Local CLI<br/>[local_cli.py]"]
end

subgraph group_collection["Demonstration data"]
  node_session["Guided recording<br/>[session.py]"]
  node_recorder["Episode recorder<br/>[recorder.py]"]
  node_labeler["Action labeler<br/>[labeler.py]"]
  node_episode[("Episode store<br/>[episode.py]")]
  node_validation["Episode validation<br/>[validator.py]"]
  node_audit["Data audit<br/>[audit.py]"]
  node_coverage["Demo coverage<br/>[coverage.py]"]
end

subgraph group_learning["Policy learning"]
  node_feature_cache["Feature cache<br/>[cache_features.py]"]
  node_vision["Visual encoder<br/>[vision_encoder.py]"]
  node_dataset["Training dataset<br/>[dataset.py]"]
  node_bc["Behavioral cloning"]
end

subgraph group_runtime["Agent runtime"]
  node_dagger["DAgger collection<br/>[dagger.py]"]
  node_entry["Agent command<br/>[__main__.py]"]
  node_planner["Task planner<br/>[planner.py]"]
  node_agent["Agent loop<br/>[agent.py]"]
  node_policy["Visual policy<br/>[policy.py]"]
  node_safety["Safety validator<br/>[validator.py]"]
  node_executor["Action executor<br/>[executor.py]"]
  node_platform["Desktop input<br/>[platform.py]"]
  node_capture["Screen capture<br/>[capture.py]"]
  node_suite["Task evaluation<br/>[suite.py]"]
  node_paintcheck["Paint checks<br/>[paintcheck.py]"]
end

node_mcp_client(("MCP client"))
node_human(("Demonstrator"))
node_instruction(("Instruction"))

node_mcp_client -->|"uses"| node_desktop_server
node_mcp_client -->|"selects"| node_mysql_server
node_mcp_client -->|"selects"| node_ml_server
node_mcp_client -->|"uses"| node_sql_server
node_local_cli -->|"connects"| node_desktop_server
node_human -->|"provides demos"| node_session
node_session -->|"runs"| node_recorder
node_recorder -->|"records"| node_episode
node_recorder -->|"labels"| node_labeler
node_labeler -->|"saves labels"| node_episode
node_episode -->|"validated by"| node_validation
node_audit -->|"checks"| node_episode
node_audit -->|"invokes"| node_validation
node_coverage -->|"analyzes"| node_episode
node_feature_cache -->|"reads"| node_episode
node_feature_cache -->|"encodes frames"| node_vision
node_dataset -->|"loads"| node_episode
node_dataset -->|"aligns goals"| node_planner
node_bc -->|"trains on"| node_dataset
node_bc -->|"optimizes"| node_policy
node_instruction -->|"starts run"| node_entry
node_entry -->|"plans"| node_planner
node_entry -->|"runs"| node_agent
node_agent -->|"requests plan"| node_planner
node_agent -->|"queries"| node_policy
node_agent -->|"dispatches actions"| node_executor
node_executor -->|"validates"| node_safety
node_executor -->|"uses input"| node_platform
node_capture -->|"sets DPI"| node_platform
node_entry -->|"runs evaluation"| node_suite
node_suite -->|"creates plans"| node_planner
node_suite -->|"checks Paint"| node_paintcheck
node_dagger -->|"adds episodes"| node_episode
node_dagger -->|"uses plans"| node_planner
node_dagger -->|"uses training data"| node_dataset

click node_desktop_server "https://github.com/saurav021406/argus2.o/blob/main/argus_server.py"
click node_mysql_server "https://github.com/saurav021406/argus2.o/blob/main/argus_server.py"
click node_ml_server "https://github.com/saurav021406/argus2.o/blob/main/argus_server.py"
click node_sql_server "https://github.com/saurav021406/argus2.o/blob/main/argus_sqlserver.py"
click node_local_cli "https://github.com/saurav021406/argus2.o/blob/main/argus/local_cli.py"
click node_session "https://github.com/saurav021406/argus2.o/blob/main/argus/data/session.py"
click node_recorder "https://github.com/saurav021406/argus2.o/blob/main/argus/data/recorder.py"
click node_labeler "https://github.com/saurav021406/argus2.o/blob/main/argus/data/labeler.py"
click node_episode "https://github.com/saurav021406/argus2.o/blob/main/argus/data/episode.py"
click node_validation "https://github.com/saurav021406/argus2.o/blob/main/argus/data/validator.py"
click node_audit "https://github.com/saurav021406/argus2.o/blob/main/argus/data/audit.py"
click node_coverage "https://github.com/saurav021406/argus2.o/blob/main/argus/data/coverage.py"
click node_feature_cache "https://github.com/saurav021406/argus2.o/blob/main/argus/training/cache_features.py"
click node_vision "https://github.com/saurav021406/argus2.o/blob/main/argus/perception/vision_encoder.py"
click node_dataset "https://github.com/saurav021406/argus2.o/blob/main/argus/training/dataset.py"
click node_bc "https://github.com/saurav021406/argus2.o/blob/main/argus/training/behavioral_cloning.py"
click node_dagger "https://github.com/saurav021406/argus2.o/blob/main/argus/core/dagger.py"
click node_entry "https://github.com/saurav021406/argus2.o/blob/main/argus/core/__main__.py"
click node_planner "https://github.com/saurav021406/argus2.o/blob/main/argus/core/planner.py"
click node_agent "https://github.com/saurav021406/argus2.o/blob/main/argus/core/agent.py"
click node_policy "https://github.com/saurav021406/argus2.o/blob/main/argus/policy/policy.py"
click node_safety "https://github.com/saurav021406/argus2.o/blob/main/argus/safety/validator.py"
click node_executor "https://github.com/saurav021406/argus2.o/blob/main/argus/actions/executor.py"
click node_platform "https://github.com/saurav021406/argus2.o/blob/main/argus/actions/platform.py"
click node_capture "https://github.com/saurav021406/argus2.o/blob/main/argus/perception/capture.py"
click node_suite "https://github.com/saurav021406/argus2.o/blob/main/argus/core/suite.py"
click node_paintcheck "https://github.com/saurav021406/argus2.o/blob/main/argus/core/paintcheck.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_desktop_server,node_mysql_server,node_ml_server,node_sql_server,node_local_cli,node_mcp_client toneBlue
class node_session,node_recorder,node_labeler,node_episode,node_validation,node_audit,node_coverage toneAmber
class node_feature_cache,node_vision,node_dataset,node_bc toneMint
class node_dagger,node_entry,node_planner,node_agent,node_policy,node_safety,node_executor,node_platform,node_capture,node_suite,node_paintcheck toneRose
class node_human,node_instruction toneIndigo
```

## Components

### Automation interfaces

- [Desktop MCP](https://github.com/saurav021406/argus2.o/blob/main/argus_server.py): `argus_server.py`
- [MySQL MCP](https://github.com/saurav021406/argus2.o/blob/main/argus_server.py): `argus_server.py`
- [ML monitoring MCP](https://github.com/saurav021406/argus2.o/blob/main/argus_server.py): `argus_server.py`
- [SQL Server MCP](https://github.com/saurav021406/argus2.o/blob/main/argus_sqlserver.py): `argus_sqlserver.py`
- [Local CLI](https://github.com/saurav021406/argus2.o/blob/main/argus/local_cli.py): `argus/local_cli.py`

### Demonstration data

- [Guided recording](https://github.com/saurav021406/argus2.o/blob/main/argus/data/session.py): `argus/data/session.py`
- [Episode recorder](https://github.com/saurav021406/argus2.o/blob/main/argus/data/recorder.py): `argus/data/recorder.py`
- [Action labeler](https://github.com/saurav021406/argus2.o/blob/main/argus/data/labeler.py): `argus/data/labeler.py`
- [Episode store](https://github.com/saurav021406/argus2.o/blob/main/argus/data/episode.py): `argus/data/episode.py`
- [Episode validation](https://github.com/saurav021406/argus2.o/blob/main/argus/data/validator.py): `argus/data/validator.py`
- [Data audit](https://github.com/saurav021406/argus2.o/blob/main/argus/data/audit.py): `argus/data/audit.py`
- [Demo coverage](https://github.com/saurav021406/argus2.o/blob/main/argus/data/coverage.py): `argus/data/coverage.py`

### Policy learning

- [Feature cache](https://github.com/saurav021406/argus2.o/blob/main/argus/training/cache_features.py): `argus/training/cache_features.py`
- [Visual encoder](https://github.com/saurav021406/argus2.o/blob/main/argus/perception/vision_encoder.py): `argus/perception/vision_encoder.py`
- [Training dataset](https://github.com/saurav021406/argus2.o/blob/main/argus/training/dataset.py): `argus/training/dataset.py`
- [Behavioral cloning](https://github.com/saurav021406/argus2.o/blob/main/argus/training/behavioral_cloning.py): `argus/training/behavioral_cloning.py`

### Agent runtime

- [DAgger collection](https://github.com/saurav021406/argus2.o/blob/main/argus/core/dagger.py): `argus/core/dagger.py`
- [Agent command](https://github.com/saurav021406/argus2.o/blob/main/argus/core/__main__.py): `argus/core/__main__.py`
- [Task planner](https://github.com/saurav021406/argus2.o/blob/main/argus/core/planner.py): `argus/core/planner.py`
- [Agent loop](https://github.com/saurav021406/argus2.o/blob/main/argus/core/agent.py): `argus/core/agent.py`
- [Visual policy](https://github.com/saurav021406/argus2.o/blob/main/argus/policy/policy.py): `argus/policy/policy.py`
- [Safety validator](https://github.com/saurav021406/argus2.o/blob/main/argus/safety/validator.py): `argus/safety/validator.py`
- [Action executor](https://github.com/saurav021406/argus2.o/blob/main/argus/actions/executor.py): `argus/actions/executor.py`
- [Desktop input](https://github.com/saurav021406/argus2.o/blob/main/argus/actions/platform.py): `argus/actions/platform.py`
- [Screen capture](https://github.com/saurav021406/argus2.o/blob/main/argus/perception/capture.py): `argus/perception/capture.py`
- [Task evaluation](https://github.com/saurav021406/argus2.o/blob/main/argus/core/suite.py): `argus/core/suite.py`
- [Paint checks](https://github.com/saurav021406/argus2.o/blob/main/argus/core/paintcheck.py): `argus/core/paintcheck.py`

### Other components

- **MCP client**
- **Demonstrator**
- **Instruction**

## Connections

- MCP client → Desktop MCP: uses (evidence: `README.md`)
- MCP client → MySQL MCP: selects (evidence: `README.md`)
- MCP client → ML monitoring MCP: selects (evidence: `README.md`)
- MCP client → SQL Server MCP: uses (evidence: `README.md`)
- Local CLI → Desktop MCP: connects (evidence: `README.md`)
- Demonstrator → Guided recording: provides demos (evidence: `README.md`)
- Guided recording → Episode recorder: runs (evidence: `argus/data/session.py`)
- Episode recorder → Episode store: records (evidence: `argus/data/recorder.py`)
- Episode recorder → Action labeler: labels (evidence: `argus/data/recorder.py`)
- Action labeler → Episode store: saves labels (evidence: `argus/data/labeler.py`)
- Episode store → Episode validation: validated by (evidence: `argus/data/validator.py`)
- Data audit → Episode store: checks (evidence: `argus/data/audit.py`)
- Data audit → Episode validation: invokes (evidence: `argus/data/audit.py`)
- Demo coverage → Episode store: analyzes (evidence: `argus/data/coverage.py`)
- Feature cache → Episode store: reads (evidence: `README.md`)
- Feature cache → Visual encoder: encodes frames (evidence: `README.md`)
- Training dataset → Episode store: loads (evidence: `argus/training/dataset.py`)
- Training dataset → Task planner: aligns goals (evidence: `argus/training/dataset.py`)
- Behavioral cloning → Training dataset: trains on (evidence: `argus/training/behavioral_cloning.py`)
- Behavioral cloning → Visual policy: optimizes (evidence: `argus/training/behavioral_cloning.py`)
- Instruction → Agent command: starts run (evidence: `argus/core/__main__.py`)
- Agent command → Task planner: plans (evidence: `argus/core/__main__.py`)
- Agent command → Agent loop: runs (evidence: `argus/core/__main__.py`)
- Agent loop → Task planner: requests plan (evidence: `argus/core/agent.py`)
- Agent loop → Visual policy: queries (evidence: `argus/core/agent.py`)
- Agent loop → Action executor: dispatches actions (evidence: `argus/core/agent.py`)
- Action executor → Safety validator: validates (evidence: `argus/actions/executor.py`)
- Action executor → Desktop input: uses input (evidence: `argus/actions/executor.py`)
- Screen capture → Desktop input: sets DPI (evidence: `argus/perception/capture.py`)
- Agent command → Task evaluation: runs evaluation (evidence: `argus/core/__main__.py`)
- Task evaluation → Task planner: creates plans (evidence: `argus/core/suite.py`)
- Task evaluation → Paint checks: checks Paint (evidence: `argus/core/suite.py`)
- DAgger collection → Episode store: adds episodes (evidence: `argus/core/dagger.py`)
- DAgger collection → Task planner: uses plans (evidence: `argus/core/dagger.py`)
- DAgger collection → Training dataset: uses training data (evidence: `argus/core/dagger.py`)
