> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Plugin Tools Overview

> Profy's three-layer interaction tool architecture: computer, browser, chrome

# Three-Layer Tool Architecture

Profy provides three layers of interaction tools, covering the full spectrum from pixel-level desktop control to DOM-aware browser automation. All layers share a unified `tool(action=...)` calling convention.

## Architecture

```mermaid theme={null}
graph TB
    subgraph layers ["Three-Layer Tools"]
        computer["computer(action=...)"]
        browser["browser(action=...)"]
        chrome["chrome(action=...)"]
    end

    subgraph backends ["Execution Backends"]
        cloud["Cloud Sandbox (CDP + noVNC)"]
        desktop["Desktop (Electron CUA)"]
        ext["Chrome Extension (Native Messaging)"]
    end

    computer -->|"Cloud: noVNC pixel"| cloud
    computer -->|"Desktop: sky.* equivalent"| desktop
    browser -->|"Cloud: CDP on sandbox Chromium"| cloud
    browser -->|"Desktop: Electron in-app browser"| desktop
    chrome -->|"Desktop + Extension"| ext
```

## Layer Comparison

| Layer        | Tool                   | Scope              | Awareness                       | Backend                        |
| ------------ | ---------------------- | ------------------ | ------------------------------- | ------------------------------ |
| **computer** | `computer(action=...)` | Full screen/window | Pixel screenshots + coordinates | Cloud: noVNC / Desktop: CUA    |
| **browser**  | `browser(action=...)`  | Controlled browser | DOM + Accessibility Tree        | Cloud: CDP / Desktop: Electron |
| **chrome**   | `chrome(action=...)`   | User's Chrome      | DOM + Accessibility Tree        | Chrome Extension CDP           |

## When to Use Each

### Use `computer` for:

* Native desktop applications (Finder, Terminal, IDE)
* Game automation
* Any non-browser GUI application
* Screen-level visual verification

### Use `browser` for:

* Browsing public web pages
* Testing in-development sites (localhost)
* Web scraping
* Form automation (no auth required)
* 3D/WebGL visual verification

### Use `chrome` for:

* Operations requiring user's login state
* Accessing authenticated internal systems
* Performing actions on logged-in websites
* Secure credential management

## Unified Calling Convention

All three layers share the same call pattern:

```python theme={null}
# Screenshot
computer(action="screenshot")
browser(action="screenshot", url="http://localhost:5173")
chrome(action="screenshot")

# Click
computer(action="click", x=100, y=200)
browser(action="click", ref="button[0]")
chrome(action="click", ref="button[0]")

# Type
computer(action="type", text="Hello")
browser(action="type", ref="input[0]", text="Hello")
chrome(action="type", ref="input[0]", text="Hello")
```

## Backend Polymorphism

The same tool name routes to different backends depending on execution environment:

* **Cloud Sandbox**: `computer` → noVNC pixel stream, `browser` → CDP protocol
* **Desktop**: `computer` → macOS CUA daemon, `browser` → Electron webview
* **Chrome Extension**: `chrome` → Native Messaging → Extension CDP

Tool authors don't need to worry about backend differences — just pick the right layer.

## Confirmation Policy

| Tool       | Policy               | Reason                        |
| ---------- | -------------------- | ----------------------------- |
| `computer` | Depends on action    | May affect system             |
| `browser`  | Not required         | Fully sandboxed               |
| `chrome`   | 4-level confirmation | Operating user's real browser |

## Related Documentation

<CardGroup cols={3}>
  <Card title="Computer Use" icon="display" href="/en/documentation/plugins/computer">
    Pixel-level desktop control
  </Card>

  <Card title="Browser" icon="globe" href="/en/documentation/plugins/browser">
    DOM-aware browser control
  </Card>

  <Card title="Chrome Extension" icon="chrome" href="/en/documentation/plugins/chrome">
    User Chrome browser control
  </Card>

  <Card title="Rendering Surfaces" icon="window-maximize" href="/en/documentation/plugins/rendering-surfaces">
    Eight display channels
  </Card>

  <Card title="A2UI" icon="grid-2" href="/en/documentation/plugins/a2ui">
    Declarative interactive UI components
  </Card>

  <Card title="Video Production" icon="video" href="/en/documentation/plugins/video-production">
    AI video production pipeline & timeline editing
  </Card>

  <Card title="3D & Visualization" icon="cube" href="/en/documentation/plugins/3d-development">
    Data viz, 3D scenes & game dev
  </Card>
</CardGroup>
