Local-First Remote AI Engineering Control Plane
Monitor, prompt, and control AI coding agents running on your Mac from your phone via private Tailscale mesh.
The goal of AgentDeck is NOT to build another AI coding agent.
The goal is to build an autonomous remote control plane around the coding agents you already use.
Leave your MacBook running AI coding agents at home, walk outside with your phone, and seamlessly:
- π± Monitor live progress & thinking: Watch file edits, subagent delegations, and plan progress in real time.
- β‘ Send follow-up prompts: Guide agents or dispatch new instructions via phone.
- π Approve or deny high-risk actions: Review dangerous shell commands or destructive operations before execution.
- π» Interactive PTY Terminal: Access full remote zsh shells with mobile modifier keys.
- π Live Git & Diff inspection: Review syntax-highlighted unified diffs, commits, and GitHub PRs.
- π Zero Public Ports: Direct peer-to-peer encrypted WireGuard tunnel using Tailscale.
flowchart TB
subgraph Mobile["π± Mobile Command Center (Flutter)"]
UI["Monochrome OLED UI"]
Sess["Live Session & Prompt Center"]
TermUI["PTY ANSI Terminal"]
DiffUI["Git & Files Diff Viewer"]
end
subgraph Tailscale["π Private Encrypted WireGuard Mesh (100.x.x.x)"]
Mesh["Tailscale Peer-to-Peer Tunnel\nZero Open Internet Ports"]
end
subgraph Host["π» macOS Workstation"]
Daemon["agentdeckd Daemon (Axum + Tokio)"]
DB[(SQLite Event Store)]
PTY["Portable-PTY Subsystem"]
Watch["notify FS Watcher"]
subgraph Agents["π€ AI Coding Agent Fleet"]
AGY["Antigravity CLI (agy)\nstream-json / subagents"]
Claude["Claude Code (claude)"]
Gemini["Gemini CLI (gemini)"]
Ollama["Ollama (Local LLMs)"]
end
end
Mobile <-->|Encrypted REST & WebSockets| Mesh
Mesh <-->|Port 8765| Daemon
Daemon <--> DB
Daemon <--> PTY
Daemon <--> Watch
Daemon <--> AGY
Daemon <--> Claude
Daemon <--> Gemini
Daemon <--> Ollama
- Google Antigravity (
agy) Core Integration:- Native JSON stream execution (
--output-format stream-json). - Interception of Chain of Thought (CoT) reasoning (
THINKINGsteps, planning milestones, subagent delegation). - Real-time live transcript parser reading
~/.gemini/antigravity-ide/brain/<id>/.system_generated/logs/transcript.jsonl. - Session continuation via
agy --continueoragy --conversation <id>. - Interactive prompt dispatching and structured decision interception.
- Native JSON stream execution (
- Multi-Agent Ecosystem Support:
- Unified
AgentAdapterasync trait supporting Google Antigravity (agy), Anthropic Claude Code (claude), Google Gemini CLI (gemini), and Ollama Local Fleet (ollama). - Claude Code
<thinking>XML token parsing and print streaming. - Gemini CLI long-context execution with structured function calling.
- Ollama local fleet support for offline models (
deepseek-r1,qwen2.5-coder:32b,codellama:70b,llama3.3:70b) with native R1<think>token stream parsing.
- Unified
- Automated System Doctor & Capability Matrix:
- CLI diagnostic tool (
agentdeck doctor) for binary detection, PATH verification, and daemon connectivity.
- CLI diagnostic tool (
- 1-Tap Google OAuth Account Switcher:
- Remote management of active Google profiles in
~/.gemini/google_accounts.jsonand~/.gemini/oauth_creds.json. - Switch active Google coding accounts instantly from mobile without touching host terminal.
- Profile linking, account removal, and credential auth status verification.
- Remote management of active Google profiles in
- Gemini & Claude Token Usage Tracking:
- Live RPM / TPM rate limit visualization and quota meters.
- Real-time token consumption history per active session.
- Synchronized IDE quota monitoring directly from mobile client.
- Multi-Workstation Fleet Switcher:
- Seamlessly switch control between multiple workstation nodes (macOS, Windows, Linux) from one mobile app.
- Live Desktop Screen Streaming & Remote Snapshot:
- Low-latency continuous workstation screen streaming (
/ws/screen) with double-tap pinch zoom and live frame capture.
- Low-latency continuous workstation screen streaming (
- Live Webcam Monitoring & Hardware Privacy Control:
- Workstation webcam live feed and snapshot view.
- Hardware privacy toggle (
/api/system/camera/stop) to immediately release camera device & turn off hardware LED.
- Voice Walkie-Talkie & OS Speech Synthesis:
- Speak into mobile phone to broadcast voice directly through workstation speakers via native OS TTS (
sayon macOS, PowerShell SAPI on Windows,espeakon Linux). - Dispatch voice prompts directly into active AI coding agent sessions.
- Speak into mobile phone to broadcast voice directly through workstation speakers via native OS TTS (
- Workstation Locating Audio Alarm:
- 1-tap remote audio alert chime to locate physical host machine in home/office (
/api/system/play-sound).
- 1-tap remote audio alert chime to locate physical host machine in home/office (
- 1-Tap Remote App Launcher:
- Instantly launch desktop applications (VS Code, Terminal, Antigravity IDE, Google Chrome, Cursor) from mobile.
- Remote File Browser & Mobile File Uploader:
- Full file tree browser, directory creation (
/api/system/mkdir), and file content reader. - Upload code assets, images, and files up to 500MB directly into project workspace folders.
- Full file tree browser, directory creation (
- Hardware Telemetry Dashboard:
- Real-time host CPU usage percentage, RAM utilization, and available Disk GB space.
- Full Pseudo-Terminal (
portable-pty):- Persistent
/bin/zshor PowerShell PTY instances streaming over WebSocket (/ws/terminal/:id). - Windows
\r\nline ending normalization for cross-platform terminal compatibility.
- Persistent
- Mobile Touch Modifier Quick-Bar:
- Touch toolbar with
Ctrl+C,Tab,Esc,β,β,Enter,Clear, and modifier keys.
- Touch toolbar with
- ANSI Color Rendering:
- High-performance ANSI color code rendering and full output scrollback.
- Working Tree & Branch Tracking:
- Real-time branch monitoring, modified files list, and git commit history (
/api/projects/:id/git/log).
- Real-time branch monitoring, modified files list, and git commit history (
- Syntax-Highlighted Unified Diff Viewer:
- File-by-file syntax diff inspection (
+added,-removed lines) with line numbers and file breadcrumbs.
- File-by-file syntax diff inspection (
- 1-Tap Mobile Commit, Push & Pull:
- Stage, commit with message synthesis, and push/pull remote branches directly from mobile.
- GitHub Integration:
- Pull Request status, creation, and issue linking (
/api/projects/:id/github).
- Pull Request status, creation, and issue linking (
- Path Traversal Guard:
- Strict canonical path verification blocking agents from accessing directories outside configured project roots.
- Automated Risk Classifier:
- Intercepts high-risk destructive operations (
rm -rf,git push --force, DB reset, credential file edits).
- Intercepts high-risk destructive operations (
- Mobile Push Approvals Queue:
- Suspends agent execution and pushes approval alert to mobile client with diff preview and 1-tap
Approve/Denygates.
- Suspends agent execution and pushes approval alert to mobile client with diff preview and 1-tap
- Zero Open Public Ports:
- Local-first peer-to-peer WireGuard mesh encryption via Tailscale (
100.x.y.z).
- Local-first peer-to-peer WireGuard mesh encryption via Tailscale (
- Background Service Installation:
- Auto-starting daemon via macOS
launchdplist or Windows Scheduled Task (AgentDeckDaemon).
- Auto-starting daemon via macOS
- SQLite Persistent Event Store:
- Transactional event and log storage (
agentdeck.db) surviving network dropouts or phone reboots.
- Transactional event and log storage (
- Monotonic
event_idReplay:- Mobile client automatically catches up on missed events sequentially upon reconnection.
- Pure Black OLED Aesthetic:
- High-contrast
#000000dark mode with white accents (#FFFFFF).
- High-contrast
- Monospace & Typography:
- JetBrains Mono font, custom ASCII progress meters (
ββββββββββββ 75%), micro-animations, and status radars.
- JetBrains Mono font, custom ASCII progress meters (
- macOS or Windows Workstation
- Rust 1.80+ (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shon macOS/Linux, or rustup.rs on Windows) - Flutter 3.24+ (optional for building mobile client)
- Tailscale (free mesh VPN for secure remote phone access)
git clone https://github.com/darknecrocities/Agentdeck.git
cd AgentdeckRun the one-click setup script to build release binaries, install the launchd background service (auto-starts on boot), and verify system agents:
./scripts/setup-all.shRun the automated PowerShell installer or double-click scripts\setup-windows.bat:
powershell -ExecutionPolicy Bypass -File .\scripts\install-windows-service.ps1This automatically:
- Builds release binaries (
agentdeckd.exeandagentdeck.exe). - Adds
~/.agentdeck/binto your User PATH. - Configures
.envand detects your Windows Tailscale IP (100.x.x.x). - Registers a Windows Scheduled Task (
AgentDeckDaemon) that auto-startsagentdeckdon login silently in the background without needing manualcargo run. - Configures Windows Firewall for port 8765.
Verify all agents and subsystems:
# macOS / Linux
./target/release/agentdeck doctor
# Windows
.\target\release\agentdeck.exe doctorOutput:
βββββββββββββββββββββββββββββββββββββββββββββββββββ
AGENTDECK SYSTEM DOCTOR REPORT
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Checking AgentDeck Daemon (http://127.0.0.1:8765) ... [OK]
Checking Antigravity CLI (`agy`) ... [FOUND]
Checking Claude Code CLI (`claude`) ... [FOUND]
Checking Gemini CLI (`gemini`) ... [FOUND]
Checking Ollama (`ollama`) ... [FOUND]
Checking Git (`git`) ... [FOUND]
Checking GitHub CLI (`gh`) ... [FOUND]
Checking Tailscale ... [FOUND] (100.x.x.x)
Checking Local Storage & Permissions ... [OK]
βββββββββββββββββββββββββββββββββββββββββββββββββββ
System is READY for AgentDeck mobile connections!
- Ensure Tailscale is running on both your machine and your phone under the same Tailscale network.
- In the AgentDeck Mobile App, navigate to Settings or tap the Tailscale Mesh banner.
- Set the Daemon Endpoint to your machine's Tailscale IP:
http://100.x.x.x:8765 - Tap "Test Ping" and "Save Config".
π For full multi-node fleet setup, MagicDNS, and platform guides, see SETUP.md.
| Endpoint | Method | Description |
|---|---|---|
/health |
GET |
Daemon health & version check |
/api/device |
GET |
CPU, RAM, Disk, and Host telemetry |
/api/status |
GET |
Active sessions, approvals, and Tailscale info |
/api/diagnostics |
GET |
Comprehensive system & agent doctor diagnostics |
/api/system/browse |
GET |
Browse host machine directories |
/api/system/mkdir |
POST |
Create new directory on host machine |
/api/system/ping_workstation |
GET |
Ping workstation latency & health check |
/api/system/launch-app |
POST |
Launch remote desktop applications (VS Code, Terminal, etc.) |
/api/system/speak |
POST |
Broadcast mobile voice to workstation speakers via OS TTS |
/api/system/play-sound |
POST |
Play workstation locating audio alert |
/api/system/screenshot |
GET |
Capture high-speed workstation desktop frame |
/api/system/camera |
GET |
Capture workstation webcam frame / snapshot |
/api/system/camera/stop |
POST |
Stop webcam stream & release camera hardware LED |
/api/files/upload |
POST |
Upload media, code, and files into workspace directories |
/api/projects |
GET, POST |
List and register workspace directories |
/api/projects/scaffold |
POST |
Bootstrap/scaffold new project templates |
/api/projects/:id |
DELETE |
Unregister project directory |
/api/projects/:id/files |
GET |
Workspace file tree navigation |
/api/projects/:id/files/content |
GET |
View file contents with line range support |
/api/projects/:id/git/status |
GET |
Repository branch and modified files |
/api/projects/:id/git/diff |
GET |
Unified working tree diff |
/api/projects/:id/git/log |
GET |
Git commit history log |
/api/projects/:id/git/commit |
POST |
Stage and commit workspace changes |
/api/projects/:id/git/push |
POST |
Push current branch to remote |
/api/projects/:id/git/pull |
POST |
Pull remote changes into working branch |
/api/projects/:id/github |
GET |
GitHub repository metadata & PR status |
/api/agents |
GET |
Installed agent adapters & capabilities |
/api/accounts/antigravity |
GET |
Current Antigravity Google account profile |
/api/accounts/antigravity/switch |
POST |
1-tap switch active Google account profile |
/api/tokens/summary |
GET |
Gemini & Claude token quota usage summary |
/api/tokens/sync-ide |
POST |
Sync token quotas with active IDE instance |
/api/sessions |
GET, POST |
List and launch new agent sessions |
/api/sessions/:id |
GET |
Inspect active session state |
/api/sessions/:id/prompt |
POST |
Dispatch follow-up prompt to running agent |
/api/sessions/:id/continue |
POST |
Resume conversation with --continue |
/api/sessions/:id/stop |
POST |
Stop active agent process |
/api/approvals |
GET |
List pending high-risk approval requests |
/api/approvals/:id/approve |
POST |
Approve pending command execution |
/api/approvals/:id/deny |
POST |
Deny and cancel pending command |
/api/terminal/session |
POST |
Spawn interactive PTY shell |
/ws/events |
WS |
Real-time global event stream with replay |
/ws/sessions/:id |
WS |
Real-time session event stream |
/ws/terminal/:id |
WS |
Bidirectional PTY terminal stream |
/ws/screen |
WS |
Live workstation desktop screen video stream |
| Dashboard Hardware telemetry & Antigravity dispatcher |
Session Controller Live plan checklist & prompt input |
Interactive Terminal ANSI PTY shell with quick keys |
| Files & Git Diff File tree and unified syntax diffs |
Approvals Queue High-risk security action gates |
Activity Timeline Chronological event logs with replay |
- Local-First: All data, code, and session logs reside strictly on your local computer (
agentdeck.db). - Encrypted Transport: Communications between phone and Mac route exclusively through Tailscale WireGuard tunnels.
- Path Traversal Guard: Prevents agents from accessing directories outside registered project boundaries.
- Human-in-the-Loop Gate: Commands flagged with dangerous keywords (
rm -rf,format,drop,force) require explicit mobile authorization.
This project is licensed under the MIT License - see the LICENSE file for details.
