AgentDeck
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.
๐ฏ What is AgentDeck?
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.
๐๏ธ System Architecture
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
๐ Key Features
1. ๐ค First-Class Multi-Agent AI Engine Integration
- Google Antigravity (
agy) Core Integration:
- Native JSON stream execution (
--output-format stream-json).
- Interception of Chain of Thought (CoT) reasoning (
THINKING steps, planning milestones, subagent delegation).
- Real-time live transcript parser reading
~/.gemini/antigravity-ide/brain/<id>/.system_generated/logs/transcript.jsonl.
- Session continuation via
agy --continue or agy --conversation <id>.
- Interactive prompt dispatching and structured decision interception.
- Multi-Agent Ecosystem Support:
- Unified
AgentAdapter async 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.
- Automated System Doctor & Capability Matrix:
- CLI diagnostic tool (
agentdeck doctor) for binary detection, PATH verification, and daemon connectivity.
2. ๐ Remote Account Switcher & Auth Management
- 1-Tap Google OAuth Account Switcher:
- Remote management of active Google profiles in
~/.gemini/google_accounts.json and ~/.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.
3. ๐ Token Quota & Usage Rate Limit Monitor
- 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.
4. ๐ป Workstation Telemetry & Remote Hardware Control
- 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.
- 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 (
say on macOS, PowerShell SAPI on Windows, espeak on Linux).
- Dispatch voice prompts directly into active AI coding agent sessions.
- 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 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.
- Hardware Telemetry Dashboard:
- Real-time host CPU usage percentage, RAM utilization, and available Disk GB space.
5. โก Interactive Portable PTY Terminal Subsystem
- Full Pseudo-Terminal (
portable-pty):
- Persistent
/bin/zsh or PowerShell PTY instances streaming over WebSocket (/ws/terminal/:id).
- Windows
\r\n line ending normalization for cross-platform terminal compatibility.
- Mobile Touch Modifier Quick-Bar:
- Touch toolbar with
Ctrl+C, Tab, Esc, โ, โ, Enter, Clear, and modifier keys.
- ANSI Color Rendering:
- High-performance ANSI color code rendering and full output scrollback.
6. ๐ Git & GitHub Repository Management
- Working Tree & Branch Tracking:
- Real-time branch monitoring, modified files list, and git commit history (
/api/projects/:id/git/log).
- Syntax-Highlighted Unified Diff Viewer:
- File-by-file syntax diff inspection (
+ added, - removed lines) with line numbers and file breadcrumbs.
- 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).
7. ๐ Security, Sandboxing & Human-in-the-Loop Approvals
- 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).
- Mobile Push Approvals Queue:
- Suspends agent execution and pushes approval alert to mobile client with diff preview and 1-tap
Approve / Deny gates.
- Zero Open Public Ports:
- Local-first peer-to-peer WireGuard mesh encryption via Tailscale (
100.x.y.z).
8. โก 24/7 Persistent Daemon (agentdeckd) & Event Replay
- Background Service Installation:
- Auto-starting daemon via macOS
launchd plist or Windows Scheduled Task (AgentDeckDaemon).
- SQLite Persistent Event Store:
- Transactional event and log storage (
agentdeck.db) surviving network dropouts or phone reboots.
- Monotonic
event_id Replay:
- Mobile client automatically catches up on missed events sequentially upon reconnection.
9. ๐จ Obsidian Titanium Monochrome Design System
- Pure Black OLED Aesthetic:
- High-contrast
#000000 dark mode with white accents (#FFFFFF).
- Monospace & Typography:
- JetBrains Mono font, custom ASCII progress meters (
โโโโโโโโโโโโ 75%), micro-animations, and status radars.
๐ Quick Start Guide
Prerequisites
- macOS or Windows Workstation
- Rust 1.80+ (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh on macOS/Linux, or rustup.rs on Windows)
- Flutter 3.24+ (optional for building mobile client)
- Tailscale (free mesh VPN for secure remote phone access)
Step 1: Clone Repository
git clone https://github.com/darknecrocities/Agentdeck.git
cd Agentdeck
Step 2: Automated 24/7 Background Service Installation
๐ On macOS:
Run 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.sh
๐ช On Windows:
Run the automated PowerShell installer or double-click scripts\setup-windows.bat:
powershell -ExecutionPolicy Bypass -File .\scripts\install-windows-service.ps1
This automatically:
- Builds release binaries (
agentdeckd.exe and agentdeck.exe).
- Adds
~/.agentdeck/bin to your User PATH.
- Configures
.env and detects your Windows Tailscale IP (100.x.x.x).
- Registers a Windows Scheduled Task (
AgentDeckDaemon) that auto-starts agentdeckd on login silently in the background without needing manual cargo run.
- Configures Windows Firewall for port 8765.
Step 3: Run System Diagnostics
Verify all agents and subsystems:
# macOS / Linux
./target/release/agentdeck doctor
# Windows
.\target\release\agentdeck.exe doctor
Output:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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!
Step 4: Connect Mobile App via Tailscale WireGuard Mesh
- 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.
๐ก API Reference
| 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.) |