# wool-xing/test-agent architecture

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

- Interactive diagram: https://gitdiagram.com/wool-xing/test-agent
- Repository: https://github.com/wool-xing/test-agent

## Overview

Test-Agent is an AI-powered software testing framework: users submit a requirement or target through the CLI, API, or web UI; the runtime routes work to specialist agents and testing capabilities, then exposes run status and reports. The README also documents multi-platform/protocol testing, compliance and quality gates, learning mode, evidence, integrations, and a plugin marketplace. Some subsystem links below are documented capabilities rather than inspected call paths; those edges cite the README, and unsampled implementation details are not inferred.

Main entry points: [`runtime/orchestrator/direct.py`](https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/direct.py) (Run Orchestrator), [`runtime/router/llm_client.py`](https://github.com/wool-xing/test-agent/blob/main/runtime/router/llm_client.py) (LLM Client), [`runtime/api/main.py`](https://github.com/wool-xing/test-agent/blob/main/runtime/api/main.py) (Runtime API), [`runtime/orchestrator/agents/base.py`](https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/agents/base.py) (Specialist Agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User Interfaces"]
  node_cli["CLI<br/>[main.py]"]
  node_api["Runtime API<br/>[main.py]"]
  node_web["Web Console<br/>[App.tsx]"]
end

subgraph group_execution["Test Execution"]
  node_orchestrator["Run Orchestrator<br/>[direct.py]"]
  node_agents["Specialist Agents<br/>[base.py]"]
  node_router["Model Router<br/>[model_router.py]"]
  node_llm["LLM Client<br/>[llm_client.py]"]
  node_test_tools["Testing Capabilities"]
  node_sandbox["Execution Sandbox<br/>[sandbox.py]"]
end

subgraph group_quality["Analysis and Quality"]
  node_quality_gates["Quality Gates"]
  node_impact["Impact Analysis<br/>[impact_engine.py]"]
  node_compliance["Compliance Checks<br/>[engine.py]"]
  node_reports["Reports and Exports"]
  node_learning["Learning Mode"]
end

subgraph group_platform["Integrations and Extensions"]
  node_gateway["Messaging Gateway"]
  node_marketplace["Plugin Marketplace"]
end

subgraph group_foundation["Runtime Foundation"]
  node_results[("Run Results<br/>[models.py]")]
  node_evidence["Evidence Vault<br/>[server.py]"]
  node_settings["Runtime Settings<br/>[settings.py]"]
end

node_user(("Test Engineer"))
node_external_llm{{"LLM Providers"}}

node_user -->|"submits requirements"| node_cli
node_user -->|"submits target"| node_api
node_user -->|"uses console"| node_web
node_api -->|"submits run"| node_orchestrator
node_orchestrator -.->|"dispatches work"| node_agents
node_agents -->|"requests completion"| node_llm
node_llm -->|"resolves model"| node_router
node_llm -->|"calls provider"| node_external_llm
node_orchestrator -.->|"runs tests"| node_test_tools
node_orchestrator -.->|"executes safely"| node_sandbox
node_orchestrator -.->|"records run"| node_results
node_api -->|"returns status"| node_results
node_orchestrator -.->|"captures evidence"| node_evidence
node_orchestrator -.->|"produces reports"| node_reports
node_orchestrator -.->|"evaluates gates"| node_quality_gates
node_orchestrator -.->|"checks compliance"| node_compliance
node_impact -->|"recommends tests"| node_test_tools
node_settings -->|"configures providers"| node_llm
node_user -->|"enables learn mode"| node_learning
node_orchestrator -.->|"notifies channels"| node_gateway
node_user -->|"discovers plugins"| node_marketplace

click node_cli "https://github.com/wool-xing/test-agent/blob/main/runtime/cli/main.py"
click node_api "https://github.com/wool-xing/test-agent/blob/main/runtime/api/main.py"
click node_web "https://github.com/wool-xing/test-agent/blob/main/runtime/web/src/App.tsx"
click node_orchestrator "https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/direct.py"
click node_agents "https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/agents/base.py"
click node_router "https://github.com/wool-xing/test-agent/blob/main/runtime/router/model_router.py"
click node_llm "https://github.com/wool-xing/test-agent/blob/main/runtime/router/llm_client.py"
click node_test_tools "https://github.com/wool-xing/test-agent/tree/main/utils"
click node_sandbox "https://github.com/wool-xing/test-agent/blob/main/runtime/core/sandbox.py"
click node_quality_gates "https://github.com/wool-xing/test-agent/blob/main/utils/quality/quality_gate_engine.py"
click node_impact "https://github.com/wool-xing/test-agent/blob/main/runtime/intelligence/impact_engine.py"
click node_compliance "https://github.com/wool-xing/test-agent/blob/main/runtime/compliance/engine.py"
click node_reports "https://github.com/wool-xing/test-agent/tree/main/runtime/exporters"
click node_results "https://github.com/wool-xing/test-agent/blob/main/runtime/storage/models.py"
click node_evidence "https://github.com/wool-xing/test-agent/blob/main/runtime/mcp/evidence_vault/server.py"
click node_settings "https://github.com/wool-xing/test-agent/blob/main/runtime/config/settings.py"
click node_learning "https://github.com/wool-xing/test-agent/tree/main/runtime/learning_loop"
click node_gateway "https://github.com/wool-xing/test-agent/tree/main/runtime/gateway"
click node_marketplace "https://github.com/wool-xing/test-agent/tree/main/runtime/marketplace"

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_cli,node_api,node_web toneBlue
class node_orchestrator,node_agents,node_router,node_llm,node_test_tools,node_sandbox toneAmber
class node_quality_gates,node_impact,node_compliance,node_reports,node_learning toneMint
class node_gateway,node_marketplace toneRose
class node_results,node_evidence,node_settings,node_user,node_external_llm toneIndigo
```

## Components

### User Interfaces

- [CLI](https://github.com/wool-xing/test-agent/blob/main/runtime/cli/main.py): `runtime/cli/main.py`
- [Runtime API](https://github.com/wool-xing/test-agent/blob/main/runtime/api/main.py): `runtime/api/main.py`
- [Web Console](https://github.com/wool-xing/test-agent/blob/main/runtime/web/src/App.tsx): `runtime/web/src/App.tsx`

### Test Execution

- [Run Orchestrator](https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/direct.py): `runtime/orchestrator/direct.py`
- [Specialist Agents](https://github.com/wool-xing/test-agent/blob/main/runtime/orchestrator/agents/base.py): `runtime/orchestrator/agents/base.py`
- [Model Router](https://github.com/wool-xing/test-agent/blob/main/runtime/router/model_router.py): `runtime/router/model_router.py`
- [LLM Client](https://github.com/wool-xing/test-agent/blob/main/runtime/router/llm_client.py): `runtime/router/llm_client.py`
- [Testing Capabilities](https://github.com/wool-xing/test-agent/tree/main/utils): `utils`
- [Execution Sandbox](https://github.com/wool-xing/test-agent/blob/main/runtime/core/sandbox.py): `runtime/core/sandbox.py`

### Analysis and Quality

- [Quality Gates](https://github.com/wool-xing/test-agent/blob/main/utils/quality/quality_gate_engine.py): `utils/quality/quality_gate_engine.py`
- [Impact Analysis](https://github.com/wool-xing/test-agent/blob/main/runtime/intelligence/impact_engine.py): `runtime/intelligence/impact_engine.py`
- [Compliance Checks](https://github.com/wool-xing/test-agent/blob/main/runtime/compliance/engine.py): `runtime/compliance/engine.py`
- [Reports and Exports](https://github.com/wool-xing/test-agent/tree/main/runtime/exporters): `runtime/exporters`
- [Learning Mode](https://github.com/wool-xing/test-agent/tree/main/runtime/learning_loop): `runtime/learning_loop`

### Integrations and Extensions

- [Messaging Gateway](https://github.com/wool-xing/test-agent/tree/main/runtime/gateway): `runtime/gateway`
- [Plugin Marketplace](https://github.com/wool-xing/test-agent/tree/main/runtime/marketplace): `runtime/marketplace`

### Runtime Foundation

- [Run Results](https://github.com/wool-xing/test-agent/blob/main/runtime/storage/models.py): `runtime/storage/models.py`
- [Evidence Vault](https://github.com/wool-xing/test-agent/blob/main/runtime/mcp/evidence_vault/server.py): `runtime/mcp/evidence_vault/server.py`
- [Runtime Settings](https://github.com/wool-xing/test-agent/blob/main/runtime/config/settings.py): `runtime/config/settings.py`

### Other components

- **Test Engineer**
- **LLM Providers**

## Connections

- Test Engineer → CLI: submits requirements (evidence: `README.md`)
- Test Engineer → Runtime API: submits target (evidence: `README.md`)
- Test Engineer → Web Console: uses console (evidence: `README.md`)
- Runtime API → Run Orchestrator: submits run (evidence: `runtime/api/main.py`)
- Run Orchestrator → Specialist Agents: dispatches work (evidence: `README.md`)
- Specialist Agents → LLM Client: requests completion (evidence: `runtime/orchestrator/agents/base.py`)
- LLM Client → Model Router: resolves model (evidence: `runtime/router/llm_client.py`)
- LLM Client → LLM Providers: calls provider (evidence: `runtime/router/llm_client.py`)
- Run Orchestrator → Testing Capabilities: runs tests (evidence: `README.md`)
- Run Orchestrator → Execution Sandbox: executes safely (evidence: `README.md`)
- Run Orchestrator → Run Results: records run (evidence: `README.md`)
- Runtime API → Run Results: returns status (evidence: `runtime/api/main.py`)
- Run Orchestrator → Evidence Vault: captures evidence (evidence: `README.md`)
- Run Orchestrator → Reports and Exports: produces reports (evidence: `README.md`)
- Run Orchestrator → Quality Gates: evaluates gates (evidence: `README.md`)
- Run Orchestrator → Compliance Checks: checks compliance (evidence: `README.md`)
- Impact Analysis → Testing Capabilities: recommends tests (evidence: `runtime/intelligence/impact_engine.py`)
- Runtime Settings → LLM Client: configures providers (evidence: `runtime/router/llm_client.py`)
- Test Engineer → Learning Mode: enables learn mode (evidence: `README.md`)
- Run Orchestrator → Messaging Gateway: notifies channels (evidence: `README.md`)
- Test Engineer → Plugin Marketplace: discovers plugins (evidence: `README.md`)
