# aj-design19/testing_agent_updated architecture

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

- Interactive diagram: https://gitdiagram.com/aj-design19/testing_agent_updated
- Repository: https://github.com/aj-design19/testing_agent_updated

## Overview

Adya AI Testing Agent autonomously validates workflows by driving a browser-based SAI copilot, answering its questions as a selected persona, collecting evidence, and judging the run. Its wider capabilities include browser/canvas inspection, accessibility and visual evaluation, persistent learning, human review, and run reporting. The main orchestration excerpt is incomplete, so edges from it are limited to components named in the SOURCE INDEX; unshown subsystem wiring is omitted.

Main entry points: [`app/orchestrator.py`](https://github.com/aj-design19/testing_agent_updated/blob/main/app/orchestrator.py) (Run orchestrator), [`app/browser/canvas_monitor.py`](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/canvas_monitor.py) (Canvas monitor), [`app/judge/llm_judge.py`](https://github.com/aj-design19/testing_agent_updated/blob/main/app/judge/llm_judge.py) (LLM evaluation), [`app/store/models.py`](https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/models.py) (Persistence models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Run orchestration"]
  node_entry["Run entry<br/>[main.py]"]
  node_orchestrator["Run orchestrator<br/>[orchestrator.py]"]
end

subgraph group_browser["Browser and evidence"]
  node_browser_manager["Browser manager<br/>[browser_manager.py]"]
  node_login["Login<br/>[login.py]"]
  node_sai_handler["SAI interaction<br/>[sai_handler.py]"]
  node_sai_navigator["SAI navigation<br/>[sai_navigator.py]"]
  node_canvas_monitor["Canvas monitor<br/>[canvas_monitor.py]"]
  node_canvas_validator["Flow validation"]
  node_canvas_zoomer["Canvas zoom<br/>[canvas_zoomer.py]"]
  node_dom_intelligence["DOM intelligence"]
  node_screenshot_agent["Screenshot capture"]
  node_accessibility["Accessibility audit"]
  node_style_extractor["Style extraction<br/>[style_extractor.py]"]
end

subgraph group_conversation["Workflow and conversation"]
  node_workflow_registry["Workflow definitions"]
  node_journey_loader["Journey loader<br/>[journey_loader.py]"]
  node_answer_engine["Persona answers<br/>[answer_engine.py]"]
end

subgraph group_evaluation["Evaluation and reporting"]
  node_judge["LLM evaluation<br/>[llm_judge.py]"]
  node_visual_judge["Visual evaluation<br/>[visual_judge.py]"]
  node_run_report["Run report<br/>[run_report.py]"]
end

subgraph group_governance["Learning and governance"]
  node_models["Persistence models<br/>[models.py]"]
  node_mongo_store[("Mongo store<br/>[mongo_store.py]")]
  node_postgres_store[("Postgres store<br/>[postgres_store.py]")]
  node_audit_log[("Audit log<br/>[audit_log.py]")]
  node_esll["Self-learning service<br/>[esll_service.py]"]
  node_hitl["Human review queue<br/>[hitl_manager.py]"]
end

node_operator(("Test operator"))

node_operator -.->|"starts run"| node_entry
node_entry -->|"dispatches to"| node_orchestrator
node_orchestrator -->|"uses browser"| node_browser_manager
node_orchestrator -->|"uses login"| node_login
node_orchestrator -->|"drives interaction"| node_sai_handler
node_orchestrator -->|"captures evidence"| node_screenshot_agent
node_orchestrator -->|"monitors canvas"| node_canvas_monitor
node_orchestrator -->|"checks accessibility"| node_accessibility
node_orchestrator -->|"checks styling"| node_style_extractor
node_orchestrator -->|"uses answers"| node_answer_engine
node_orchestrator -->|"evaluates run"| node_judge
node_journey_loader -->|"loads definitions"| node_workflow_registry
node_sai_handler -->|"generates replies"| node_answer_engine
node_sai_handler -->|"reads panel"| node_sai_navigator
node_sai_handler -->|"reads DOM state"| node_dom_intelligence
node_canvas_monitor -->|"inspects DOM"| node_dom_intelligence
node_canvas_monitor -->|"navigates SAI"| node_sai_navigator
node_canvas_monitor -->|"uses screenshots"| node_screenshot_agent
node_canvas_monitor -->|"validates flow"| node_canvas_validator
node_canvas_monitor -->|"zooms canvas"| node_canvas_zoomer
node_judge -->|"uses visual judge"| node_visual_judge
node_judge -->|"uses flow checks"| node_canvas_validator
node_judge -->|"uses audit results"| node_accessibility
node_judge -->|"uses style results"| node_style_extractor
node_run_report -->|"renders evaluations"| node_visual_judge
node_mongo_store -->|"uses models"| node_models
node_postgres_store -->|"uses models"| node_models
node_audit_log -->|"uses models"| node_models
node_esll -->|"uses models"| node_models
node_esll -->|"persists learning"| node_mongo_store
node_esll -->|"persists runs"| node_postgres_store
node_esll -->|"records changes"| node_audit_log
node_hitl -->|"manages queue"| node_postgres_store
node_hitl -->|"audits decisions"| node_audit_log
node_hitl -->|"uses queue models"| node_models

click node_entry "https://github.com/aj-design19/testing_agent_updated/blob/main/app/main.py"
click node_orchestrator "https://github.com/aj-design19/testing_agent_updated/blob/main/app/orchestrator.py"
click node_browser_manager "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/browser_manager.py"
click node_login "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/login.py"
click node_sai_handler "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/sai_handler.py"
click node_sai_navigator "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/sai_navigator.py"
click node_canvas_monitor "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/canvas_monitor.py"
click node_canvas_validator "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/flow_graph_validator.py"
click node_canvas_zoomer "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/canvas_zoomer.py"
click node_dom_intelligence "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/dom_intelligence.py"
click node_screenshot_agent "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/screenshot_agent.py"
click node_accessibility "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/accessibility_checker.py"
click node_style_extractor "https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/style_extractor.py"
click node_workflow_registry "https://github.com/aj-design19/testing_agent_updated/blob/main/app/workflows/workflow_registry.py"
click node_journey_loader "https://github.com/aj-design19/testing_agent_updated/blob/main/app/workflows/journey_loader.py"
click node_answer_engine "https://github.com/aj-design19/testing_agent_updated/blob/main/app/conversation/answer_engine.py"
click node_judge "https://github.com/aj-design19/testing_agent_updated/blob/main/app/judge/llm_judge.py"
click node_visual_judge "https://github.com/aj-design19/testing_agent_updated/blob/main/app/judge/visual_judge.py"
click node_run_report "https://github.com/aj-design19/testing_agent_updated/blob/main/app/reporting/run_report.py"
click node_models "https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/models.py"
click node_mongo_store "https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/mongo_store.py"
click node_postgres_store "https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/postgres_store.py"
click node_audit_log "https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/audit_log.py"
click node_esll "https://github.com/aj-design19/testing_agent_updated/blob/main/app/esll/esll_service.py"
click node_hitl "https://github.com/aj-design19/testing_agent_updated/blob/main/app/governance/hitl_manager.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_entry,node_orchestrator toneBlue
class node_browser_manager,node_login,node_sai_handler,node_sai_navigator,node_canvas_monitor,node_canvas_validator,node_canvas_zoomer,node_dom_intelligence,node_screenshot_agent,node_accessibility,node_style_extractor toneAmber
class node_workflow_registry,node_journey_loader,node_answer_engine toneMint
class node_judge,node_visual_judge,node_run_report toneRose
class node_models,node_mongo_store,node_postgres_store,node_audit_log,node_esll,node_hitl,node_operator toneIndigo
```

## Components

### Run orchestration

- [Run entry](https://github.com/aj-design19/testing_agent_updated/blob/main/app/main.py): `app/main.py`
- [Run orchestrator](https://github.com/aj-design19/testing_agent_updated/blob/main/app/orchestrator.py): `app/orchestrator.py`

### Browser and evidence

- [Browser manager](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/browser_manager.py): `app/browser/browser_manager.py`
- [Login](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/login.py): `app/browser/login.py`
- [SAI interaction](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/sai_handler.py): `app/browser/sai_handler.py`
- [SAI navigation](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/sai_navigator.py): `app/browser/sai_navigator.py`
- [Canvas monitor](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/canvas_monitor.py): `app/browser/canvas_monitor.py`
- [Flow validation](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/flow_graph_validator.py): `app/browser/flow_graph_validator.py`
- [Canvas zoom](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/canvas_zoomer.py): `app/browser/canvas_zoomer.py`
- [DOM intelligence](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/dom_intelligence.py): `app/browser/dom_intelligence.py`
- [Screenshot capture](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/screenshot_agent.py): `app/browser/screenshot_agent.py`
- [Accessibility audit](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/accessibility_checker.py): `app/browser/accessibility_checker.py`
- [Style extraction](https://github.com/aj-design19/testing_agent_updated/blob/main/app/browser/style_extractor.py): `app/browser/style_extractor.py`

### Workflow and conversation

- [Workflow definitions](https://github.com/aj-design19/testing_agent_updated/blob/main/app/workflows/workflow_registry.py): `app/workflows/workflow_registry.py`
- [Journey loader](https://github.com/aj-design19/testing_agent_updated/blob/main/app/workflows/journey_loader.py): `app/workflows/journey_loader.py`
- [Persona answers](https://github.com/aj-design19/testing_agent_updated/blob/main/app/conversation/answer_engine.py): `app/conversation/answer_engine.py`

### Evaluation and reporting

- [LLM evaluation](https://github.com/aj-design19/testing_agent_updated/blob/main/app/judge/llm_judge.py): `app/judge/llm_judge.py`
- [Visual evaluation](https://github.com/aj-design19/testing_agent_updated/blob/main/app/judge/visual_judge.py): `app/judge/visual_judge.py`
- [Run report](https://github.com/aj-design19/testing_agent_updated/blob/main/app/reporting/run_report.py): `app/reporting/run_report.py`

### Learning and governance

- [Persistence models](https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/models.py): `app/store/models.py`
- [Mongo store](https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/mongo_store.py): `app/store/mongo_store.py`
- [Postgres store](https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/postgres_store.py): `app/store/postgres_store.py`
- [Audit log](https://github.com/aj-design19/testing_agent_updated/blob/main/app/store/audit_log.py): `app/store/audit_log.py`
- [Self-learning service](https://github.com/aj-design19/testing_agent_updated/blob/main/app/esll/esll_service.py): `app/esll/esll_service.py`
- [Human review queue](https://github.com/aj-design19/testing_agent_updated/blob/main/app/governance/hitl_manager.py): `app/governance/hitl_manager.py`

### Other components

- **Test operator**

## Connections

- Test operator → Run entry: starts run
- Run entry → Run orchestrator: dispatches to (evidence: `app/main.py`)
- Run orchestrator → Browser manager: uses browser (evidence: `app/orchestrator.py`)
- Run orchestrator → Login: uses login (evidence: `app/orchestrator.py`)
- Run orchestrator → SAI interaction: drives interaction (evidence: `app/orchestrator.py`)
- Run orchestrator → Screenshot capture: captures evidence (evidence: `app/orchestrator.py`)
- Run orchestrator → Canvas monitor: monitors canvas (evidence: `app/orchestrator.py`)
- Run orchestrator → Accessibility audit: checks accessibility (evidence: `app/orchestrator.py`)
- Run orchestrator → Style extraction: checks styling (evidence: `app/orchestrator.py`)
- Run orchestrator → Persona answers: uses answers (evidence: `app/orchestrator.py`)
- Run orchestrator → LLM evaluation: evaluates run (evidence: `app/orchestrator.py`)
- Journey loader → Workflow definitions: loads definitions (evidence: `app/workflows/journey_loader.py`)
- SAI interaction → Persona answers: generates replies (evidence: `app/browser/sai_handler.py`)
- SAI interaction → SAI navigation: reads panel (evidence: `app/browser/sai_handler.py`)
- SAI interaction → DOM intelligence: reads DOM state (evidence: `app/browser/sai_handler.py`)
- Canvas monitor → DOM intelligence: inspects DOM (evidence: `app/browser/canvas_monitor.py`)
- Canvas monitor → SAI navigation: navigates SAI (evidence: `app/browser/canvas_monitor.py`)
- Canvas monitor → Screenshot capture: uses screenshots (evidence: `app/browser/canvas_monitor.py`)
- Canvas monitor → Flow validation: validates flow (evidence: `app/browser/canvas_monitor.py`)
- Canvas monitor → Canvas zoom: zooms canvas (evidence: `app/browser/canvas_monitor.py`)
- LLM evaluation → Visual evaluation: uses visual judge (evidence: `app/judge/llm_judge.py`)
- LLM evaluation → Flow validation: uses flow checks (evidence: `app/judge/llm_judge.py`)
- LLM evaluation → Accessibility audit: uses audit results (evidence: `app/judge/llm_judge.py`)
- LLM evaluation → Style extraction: uses style results (evidence: `app/judge/llm_judge.py`)
- Run report → Visual evaluation: renders evaluations (evidence: `app/reporting/run_report.py`)
- Mongo store → Persistence models: uses models (evidence: `app/store/mongo_store.py`)
- Postgres store → Persistence models: uses models (evidence: `app/store/postgres_store.py`)
- Audit log → Persistence models: uses models (evidence: `app/store/audit_log.py`)
- Self-learning service → Persistence models: uses models (evidence: `app/esll/esll_service.py`)
- Self-learning service → Mongo store: persists learning (evidence: `app/esll/esll_service.py`)
- Self-learning service → Postgres store: persists runs (evidence: `app/esll/esll_service.py`)
- Self-learning service → Audit log: records changes (evidence: `app/esll/esll_service.py`)
- Human review queue → Postgres store: manages queue (evidence: `app/governance/hitl_manager.py`)
- Human review queue → Audit log: audits decisions (evidence: `app/governance/hitl_manager.py`)
- Human review queue → Persistence models: uses queue models (evidence: `app/governance/hitl_manager.py`)
