# Repository Briefing: kilolonion/agent-vscreen
> Source: https://repoforai.com/repo/kilolonion/agent-vscreen (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/kilolonion/agent-vscreen
- **Official Docs / Website**: https://github.com/kilolonion/agent-vscreen/releases/latest
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Kotlin
- **License**: MIT
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.0.2 (2026-12-01) — https://github.com/kilolonion/agent-vscreen/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Self-Hosted, MCP, CLI, API
- **Momentum**: 216 ★ total (+1 24h / +28 7d) · 33 forks
- **Topics**: `ai-agent`, `android`, `android-automation`, `kotlin`, `llm`, `mcp`, `mcp-server`, `no-root`, `phone-agent`, `shizuku`, `tailscale`, `virtual-display`
- **When to Use**: Best for: Supervised Android app automation on a shared handset, with private agent access and a human available to take over or confirm sensitive steps. Skip if: You cannot grant Shizuku or root privileges, need proven unattended screen-off input across untested OEM builds, or primarily need a deterministic regression test runner.

## Overview
```text
### Architecture & Core Mechanics
Agent-VScreen is a Kotlin Android execution layer, not a model host. It opens target apps on a separate virtual display and executes taps, swipes, text entry, and key presses there. Shizuku or root supplies the privileges for device control; read-only accessibility and on-device OCR supply observations. A floating preview gives the phone owner visibility into the virtual display without moving the target app onto the main screen.

The agent can run on the handset or elsewhere and connects through the `vscreen` CLI, MCP, or plain HTTP. This separates model selection from Android execution. The source tree includes the Android `app/`, `element-detector/`, and optional tunnel components under `tsbridge/` and `cloudflared/`. Local mode binds the HTTP endpoint to loopback, so off-device control requires a separately configured route.

### Key Capabilities & Differentiators
Screen observation combines read-only accessibility with PP-OCRv6 or ML Kit OCR. Agents can inspect changes and transient pop-ups between turns, zoom or replay observations, collect paginated content, and set background watches. Stable v2.0.2 lets callers choose paste, key events, or accessibility for text entry. It also adds import and export for demonstrations, scripts, notes, and habits, with a preview of naming conflicts before import.

The phone owner can hold the floating preview for 0.5 seconds to take over, stop execution in one tap, answer a pointing question via `ask`, record a demonstration via `teach`, or handle a password or code on the main screen via `handoff`. Separate agent tokens and permission profiles support read-only access and app-level blocks. Payments and other high-risk actions require biometric or PIN confirmation on the phone.

### Trade-offs & Limitations
The main reason to choose this over main-display ADB or accessibility automation is that an agent and a person can use different displays on the same handset. The cost is privileged setup, more OEM-specific behavior to validate, and an active display and app workload on the phone even though model inference happens outside Agent-VScreen. Some OEM builds can drop virtual-display touches when the main display is off despite reporting that the virtual display is interactive. The v2.0.2 cycle added detection and fallback to accessibility or waking the main display when needed; unattended operation still warrants a test on the exact device and ROM.

Use loopback or a private route when public connectivity is unnecessary. An agent token grants access to real apps, and screen observations can include sensitive content. Since tokens are permanent by default, prefer an expiry for trials and use app restrictions and minimal permissions. If the job is deterministic regression testing rather than supervised use on a shared handset, a dedicated Android UI test harness is a better fit.

### Hardware & Deployment Guide
The stable APK targets arm64 phones running Android 11 or later; Android 14 or later is recommended. Verify the signing certificate before installation. Start Shizuku or a compatible provider and authorize it, or approve root instead. Shizuku must be restarted after reboot. Enable overlay, notifications, read-only accessibility, and battery exemption, then check OEM auto-start and background restrictions. Pair locally first, then add a private route if needed. Experimental public MCP uses OAuth 2.1 with on-phone approval, never exposes `system`, and closes after 24 hours without authenticated requests.

Source builds require JDK 21, Android `compileSdk` 37, and `./gradlew :app:assembleRelease`. To bundle the tunnel components, run `./tsbridge/build.sh` and `./cloudflared/build.sh` first. Stable v2.0.2 closes the virtual display and its apps roughly 20 seconds after use in on-demand mode, then stops the service. The v2.0.3-beta1 prerelease changes thermal protection to prioritize system thermal signals, require sustained conditions for most thresholds, and resume automatically after cooldown.
```

## Key Capabilities
```text
- Display isolation: Target apps run on a virtual display without occupying the main screen.
- Screen observation: Read-only accessibility combines with on-device PP-OCRv6 or ML Kit; the timeline records changes and transient pop-ups between turns.
- Human takeover: Hold the floating preview for 0.5 seconds to take control, stop in one tap, or use `handoff` to enter credentials on the main screen.
- Authorization: Each agent gets a separate token and permission profile; apps can be blocked or read-only, and high-risk actions require phone-side biometric or PIN confirmation.
- Connection boundaries: Local HTTP binds to `127.0.0.1:18765`; private remote access includes Tailscale with Headscale support, while public MCP is experimental and off by default.
- Input control: Stable v2.0.2 supports `type "text" paste|keys|a11y` to select the input method and `type+` to append.
```

## Quick Start / Clone
```bash
apksigner verify --print-certs downloaded.apk
```
