# jellythomas/agent-eyes architecture

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

- Interactive diagram: https://gitdiagram.com/jellythomas/agent-eyes
- Repository: https://github.com/jellythomas/agent-eyes

## Overview

Agent Eyes is a model-independent MCP server for native desktop and browser inspection and control, with explicit optional CDP shadow automation. The principal flow is an AI client invoking MCP tools, resolving or observing a target, then executing bounded UI actions through a platform accessibility provider and real input. A separate setup capability scans clients and prerequisites, applies user-approved configuration, and checks readiness. Relationships among runtime modules are based on the SOURCE INDEX references; README-only capabilities are retained without implying unsampled implementation details.

Main entry points: [`src/agent_eyes/server.py`](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/server.py) (MCP server), [`src/agent_eyes/adapters/base.py`](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/base.py) (Platform adapter interface), [`src/agent_eyes/setup/handlers.py`](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/handlers.py) (Setup tool handlers), [`src/agent_eyes/setup/configurator.py`](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/configurator.py) (Client configurator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP Runtime"]
  node_server["MCP server<br/>[server.py]"]
  node_coordinator["Request coordinator<br/>[coordinator.py]"]
  node_contracts["Tool and transaction contracts"]
  node_operation["Operation budgets<br/>[operation.py]"]
  node_result["Result formatting<br/>[result_format.py]"]
end

subgraph group_targets["Target Inspection"]
  node_observe["Accessibility observations<br/>[observations.py]"]
  node_inventory["Browser inventory"]
  node_resolve["Target resolver<br/>[target_resolver.py]"]
  node_target_observation["Target observation"]
  node_adapters["Platform adapter interface<br/>[base.py]"]
  node_macos["macOS accessibility<br/>[macos.py]"]
  node_linux["Linux accessibility<br/>[linux.py]"]
  node_windows["Windows accessibility<br/>[windows.py]"]
end

subgraph group_control["UI Control"]
  node_execute["Action kernel<br/>[action_kernel.py]"]
  node_transactions["Native transactions<br/>[transactions.py]"]
  node_input["Input simulation<br/>[input_sim.py]"]
  node_worker["Provider worker<br/>[provider_worker.py]"]
  node_cdp["CDP shadow control<br/>[cdp.py]"]
  node_persistent["Persistent CDP<br/>[cdp_persistent.py]"]
end

subgraph group_setup["Setup and Readiness"]
  node_setup_handlers["Setup tool handlers<br/>[handlers.py]"]
  node_scanner["Client and competitor scan<br/>[scanner.py]"]
  node_configurator["Client configurator<br/>[configurator.py]"]
  node_installer["Persistent installation<br/>[install.py]"]
  node_readiness["Readiness checks<br/>[readiness.py]"]
  node_state[("Setup state<br/>[state.py]")]
end

node_agent(("AI MCP client"))

node_agent -->|"calls MCP tools"| node_server
node_server -->|"dispatches requests"| node_coordinator
node_server -->|"uses contracts"| node_contracts
node_server -->|"uses budgets"| node_operation
node_server -->|"formats results"| node_result
node_coordinator -->|"uses observations"| node_observe
node_coordinator -->|"uses operations"| node_operation
node_server -->|"uses inventory"| node_inventory
node_server -->|"uses resolver"| node_resolve
node_server -->|"uses observation"| node_target_observation
node_observe -->|"uses interface"| node_adapters
node_inventory -->|"uses interface"| node_adapters
node_macos -->|"implements interface"| node_adapters
node_linux -->|"implements interface"| node_adapters
node_windows -->|"implements interface"| node_adapters
node_server -->|"uses kernel"| node_execute
node_server -->|"uses transactions"| node_transactions
node_execute -->|"delegates actions"| node_transactions
node_transactions -->|"uses interface"| node_adapters
node_transactions -->|"uses worker"| node_worker
node_server -->|"uses input"| node_input
node_server -.->|"dispatches shadow mode"| node_cdp
node_server -->|"supports persistent shadow"| node_persistent
node_persistent -->|"uses CDP"| node_cdp
node_agent -->|"requests setup"| node_setup_handlers
node_setup_handlers -->|"uses scan results"| node_scanner
node_setup_handlers -->|"applies setup"| node_configurator
node_setup_handlers -->|"marks initialized"| node_state
node_configurator -->|"uses scan"| node_scanner
node_configurator -->|"uses state"| node_state
node_configurator -.->|"installs launcher"| node_installer
node_setup_handlers -.->|"checks readiness"| node_readiness
node_state -->|"stores readiness"| node_readiness

click node_server "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/server.py"
click node_coordinator "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/coordinator.py"
click node_contracts "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/transaction_contract.py"
click node_operation "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/operation.py"
click node_result "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/result_format.py"
click node_observe "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/observations.py"
click node_inventory "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/browser_inventory.py"
click node_resolve "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/target_resolver.py"
click node_target_observation "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/target_observation.py"
click node_adapters "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/base.py"
click node_macos "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/macos.py"
click node_linux "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/linux.py"
click node_windows "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/windows.py"
click node_execute "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/action_kernel.py"
click node_transactions "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/transactions.py"
click node_input "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/input_sim.py"
click node_worker "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/provider_worker.py"
click node_cdp "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/cdp.py"
click node_persistent "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/cdp_persistent.py"
click node_setup_handlers "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/handlers.py"
click node_scanner "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/scanner.py"
click node_configurator "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/configurator.py"
click node_installer "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/install.py"
click node_readiness "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/readiness.py"
click node_state "https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/state.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_server,node_coordinator,node_contracts,node_operation,node_result,node_agent toneBlue
class node_observe,node_inventory,node_resolve,node_target_observation,node_adapters,node_macos,node_linux,node_windows toneAmber
class node_execute,node_transactions,node_input,node_worker,node_cdp,node_persistent toneMint
class node_setup_handlers,node_scanner,node_configurator,node_installer,node_readiness,node_state toneRose
```

## Components

### MCP Runtime

- [MCP server](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/server.py): `src/agent_eyes/server.py`
- [Request coordinator](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/coordinator.py): `src/agent_eyes/coordinator.py`
- [Tool and transaction contracts](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/transaction_contract.py): `src/agent_eyes/transaction_contract.py`
- [Operation budgets](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/operation.py): `src/agent_eyes/operation.py`
- [Result formatting](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/result_format.py): `src/agent_eyes/result_format.py`

### Target Inspection

- [Accessibility observations](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/observations.py): `src/agent_eyes/observations.py`
- [Browser inventory](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/browser_inventory.py): `src/agent_eyes/browser_inventory.py`
- [Target resolver](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/target_resolver.py): `src/agent_eyes/target_resolver.py`
- [Target observation](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/target_observation.py): `src/agent_eyes/target_observation.py`
- [Platform adapter interface](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/base.py): `src/agent_eyes/adapters/base.py`
- [macOS accessibility](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/macos.py): `src/agent_eyes/adapters/macos.py`
- [Linux accessibility](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/linux.py): `src/agent_eyes/adapters/linux.py`
- [Windows accessibility](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/adapters/windows.py): `src/agent_eyes/adapters/windows.py`

### UI Control

- [Action kernel](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/action_kernel.py): `src/agent_eyes/action_kernel.py`
- [Native transactions](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/transactions.py): `src/agent_eyes/transactions.py`
- [Input simulation](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/input_sim.py): `src/agent_eyes/input_sim.py`
- [Provider worker](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/provider_worker.py): `src/agent_eyes/provider_worker.py`
- [CDP shadow control](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/cdp.py): `src/agent_eyes/cdp.py`
- [Persistent CDP](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/cdp_persistent.py): `src/agent_eyes/cdp_persistent.py`

### Setup and Readiness

- [Setup tool handlers](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/handlers.py): `src/agent_eyes/setup/handlers.py`
- [Client and competitor scan](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/scanner.py): `src/agent_eyes/setup/scanner.py`
- [Client configurator](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/configurator.py): `src/agent_eyes/setup/configurator.py`
- [Persistent installation](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/install.py): `src/agent_eyes/setup/install.py`
- [Readiness checks](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/readiness.py): `src/agent_eyes/setup/readiness.py`
- [Setup state](https://github.com/jellythomas/agent-eyes/blob/main/src/agent_eyes/setup/state.py): `src/agent_eyes/setup/state.py`

### Other components

- **AI MCP client**

## Connections

- AI MCP client → MCP server: calls MCP tools
- MCP server → Request coordinator: dispatches requests (evidence: `src/agent_eyes/server.py`)
- MCP server → Tool and transaction contracts: uses contracts (evidence: `src/agent_eyes/server.py`)
- MCP server → Operation budgets: uses budgets (evidence: `src/agent_eyes/server.py`)
- MCP server → Result formatting: formats results (evidence: `src/agent_eyes/server.py`)
- Request coordinator → Accessibility observations: uses observations (evidence: `src/agent_eyes/coordinator.py`)
- Request coordinator → Operation budgets: uses operations (evidence: `src/agent_eyes/coordinator.py`)
- MCP server → Browser inventory: uses inventory (evidence: `src/agent_eyes/server.py`)
- MCP server → Target resolver: uses resolver (evidence: `src/agent_eyes/server.py`)
- MCP server → Target observation: uses observation (evidence: `src/agent_eyes/server.py`)
- Accessibility observations → Platform adapter interface: uses interface (evidence: `src/agent_eyes/observations.py`)
- Browser inventory → Platform adapter interface: uses interface (evidence: `src/agent_eyes/browser_inventory.py`)
- macOS accessibility → Platform adapter interface: implements interface (evidence: `src/agent_eyes/adapters/macos.py`)
- Linux accessibility → Platform adapter interface: implements interface (evidence: `src/agent_eyes/adapters/linux.py`)
- Windows accessibility → Platform adapter interface: implements interface (evidence: `src/agent_eyes/adapters/windows.py`)
- MCP server → Action kernel: uses kernel (evidence: `src/agent_eyes/server.py`)
- MCP server → Native transactions: uses transactions (evidence: `src/agent_eyes/server.py`)
- Action kernel → Native transactions: delegates actions (evidence: `src/agent_eyes/action_kernel.py`)
- Native transactions → Platform adapter interface: uses interface (evidence: `src/agent_eyes/transactions.py`)
- Native transactions → Provider worker: uses worker (evidence: `src/agent_eyes/transactions.py`)
- MCP server → Input simulation: uses input (evidence: `src/agent_eyes/server.py`)
- MCP server → CDP shadow control: dispatches shadow mode (evidence: `src/agent_eyes/server.py`)
- MCP server → Persistent CDP: supports persistent shadow (evidence: `src/agent_eyes/server.py`)
- Persistent CDP → CDP shadow control: uses CDP (evidence: `src/agent_eyes/cdp_persistent.py`)
- AI MCP client → Setup tool handlers: requests setup
- Setup tool handlers → Client and competitor scan: uses scan results (evidence: `src/agent_eyes/setup/handlers.py`)
- Setup tool handlers → Client configurator: applies setup (evidence: `src/agent_eyes/setup/handlers.py`)
- Setup tool handlers → Setup state: marks initialized (evidence: `src/agent_eyes/setup/handlers.py`)
- Client configurator → Client and competitor scan: uses scan (evidence: `src/agent_eyes/setup/configurator.py`)
- Client configurator → Setup state: uses state (evidence: `src/agent_eyes/setup/configurator.py`)
- Client configurator → Persistent installation: installs launcher
- Setup tool handlers → Readiness checks: checks readiness
- Setup state → Readiness checks: stores readiness (evidence: `src/agent_eyes/setup/state.py`)
