# patrickkalkman/parasight architecture

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

- Interactive diagram: https://gitdiagram.com/patrickkalkman/parasight
- Repository: https://github.com/patrickkalkman/parasight

## Overview

Parasight is a prototype visual UI-testing agent. Its main workflow runs a natural-language login test: capture the page, analyze it with OmniParser, interact at normalized coordinates, analyze the resulting screenshot, and validate the success message. The agent and tool implementations are excerpted; the README documents visual analysis, self-healing, Playwright, and tracing. The graph reflects the prototype’s shown login path; it does not imply broader test-suite capabilities that the README lists as roadmap items.

Main entry points: [`src/parasight/main.py`](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/main.py) (Agent runner), [`src/parasight/special_tools/validate_element_exists_tool.py`](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/validate_element_exists_tool.py) (Result validation), [`src/parasight/special_tools/take_screenshot_tool.py`](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/take_screenshot_tool.py) (Screenshot capture), [`src/parasight/special_tools/interact_with_element_tool.py`](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/interact_with_element_tool.py) (Coordinate interaction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Test orchestration"]
  node_runner["Agent runner<br/>[main.py]"]
  node_test_agent["UI test agent<br/>[main.py]"]
  node_validation["Result validation"]
end

subgraph group_browser["Browser testing"]
  node_capture["Screenshot capture"]
  node_interaction["Coordinate interaction"]
end

subgraph group_vision["Visual analysis"]
  node_analysis["Image analysis tool"]
  node_parser_client["OmniParser client"]
  node_result_model["Analysis result model"]
end

node_tester(("Test requester"))
node_app["Application under test"]
node_omniparser["OmniParser service"]

node_tester -->|"provides test task"| node_runner
node_runner -->|"runs"| node_test_agent
node_runner -->|"registers tool"| node_capture
node_runner -->|"registers tool"| node_analysis
node_runner -->|"registers tool"| node_interaction
node_runner -->|"registers tool"| node_validation
node_test_agent -->|"requests screenshot"| node_capture
node_test_agent -->|"requests analysis"| node_analysis
node_test_agent -->|"requests actions"| node_interaction
node_test_agent -->|"requests validation"| node_validation
node_capture -->|"navigates and captures"| node_app
node_interaction -->|"acts in browser"| node_app
node_analysis -->|"sends image"| node_parser_client
node_parser_client -->|"posts image"| node_omniparser
node_validation -->|"consumes model"| node_result_model

click node_runner "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/main.py"
click node_test_agent "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/main.py"
click node_capture "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/take_screenshot_tool.py"
click node_interaction "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/interact_with_element_tool.py"
click node_analysis "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/analyze_image_with_omniparser_tool.py"
click node_parser_client "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/helpers/omni_parser_client.py"
click node_validation "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/validate_element_exists_tool.py"
click node_result_model "https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/omniparser_models.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_runner,node_test_agent,node_validation toneBlue
class node_capture,node_interaction toneAmber
class node_analysis,node_parser_client,node_result_model,node_tester toneMint
class node_app,node_omniparser toneIndigo
```

## Components

### Test orchestration

- [Agent runner](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/main.py): `src/parasight/main.py`
- [UI test agent](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/main.py): `src/parasight/main.py`
- [Result validation](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/validate_element_exists_tool.py): `src/parasight/special_tools/validate_element_exists_tool.py`

### Browser testing

- [Screenshot capture](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/take_screenshot_tool.py): `src/parasight/special_tools/take_screenshot_tool.py`
- [Coordinate interaction](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/interact_with_element_tool.py): `src/parasight/special_tools/interact_with_element_tool.py`

### Visual analysis

- [Image analysis tool](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/analyze_image_with_omniparser_tool.py): `src/parasight/special_tools/analyze_image_with_omniparser_tool.py`
- [OmniParser client](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/helpers/omni_parser_client.py): `src/parasight/helpers/omni_parser_client.py`
- [Analysis result model](https://github.com/patrickkalkman/parasight/blob/master/src/parasight/special_tools/omniparser_models.py): `src/parasight/special_tools/omniparser_models.py`

### Other components

- **Test requester**
- **Application under test**
- **OmniParser service**

## Connections

- Test requester → Agent runner: provides test task (evidence: `README.md`)
- Agent runner → UI test agent: runs (evidence: `src/parasight/main.py`)
- Agent runner → Screenshot capture: registers tool (evidence: `src/parasight/main.py`)
- Agent runner → Image analysis tool: registers tool (evidence: `src/parasight/main.py`)
- Agent runner → Coordinate interaction: registers tool (evidence: `src/parasight/main.py`)
- Agent runner → Result validation: registers tool (evidence: `src/parasight/main.py`)
- UI test agent → Screenshot capture: requests screenshot (evidence: `src/parasight/main.py`)
- UI test agent → Image analysis tool: requests analysis (evidence: `src/parasight/main.py`)
- UI test agent → Coordinate interaction: requests actions (evidence: `src/parasight/main.py`)
- UI test agent → Result validation: requests validation (evidence: `src/parasight/main.py`)
- Screenshot capture → Application under test: navigates and captures (evidence: `src/parasight/special_tools/take_screenshot_tool.py`)
- Coordinate interaction → Application under test: acts in browser (evidence: `src/parasight/special_tools/interact_with_element_tool.py`)
- Image analysis tool → OmniParser client: sends image (evidence: `src/parasight/special_tools/analyze_image_with_omniparser_tool.py`)
- OmniParser client → OmniParser service: posts image (evidence: `src/parasight/helpers/omni_parser_client.py`)
- Result validation → Analysis result model: consumes model (evidence: `src/parasight/special_tools/validate_element_exists_tool.py`)
