agy-profiles
This MCP server manages isolated Google Antigravity sandbox profiles, cross-account/quota handoff, health checks, and automatic session recovery.
List, inspect, create, update, launch, stop, repair, clone, rename, and delete sandbox profiles.
Build or remove macOS
.applauncher shims for profiles.Sync sanitized host configs, Automations, plugins, agents, skills, MCP JSON, sessions, and handoff into profiles.
Switch quota between host and profiles and generate read-only resume digests.
Run system doctor and live security-obligation checks.
Recover errored Antigravity Hub conversations caused by auth, model, stream, or quota failures.
Provides multi-profile sandbox management for Google Antigravity Hub and Antigravity IDE on macOS, including isolated launches, process tracking and stopping, sanitized config inheritance, stale Chromium lock repair, and a local web console.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-profiles launch the core-research profile for Antigravity Hub"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agy-profiles
Clean-room multi-account sandbox manager, 24/7 Rust watchdog (dev.agy-profiles.watchdog), 5-minute post-logout/login session auto-recovery, zero-Cmd+Q black-screen healer, and 18-tool stdio MCP server for Google Antigravity (Antigravity.app, Antigravity IDE.app, agy, and agy acp) on macOS.

Overview
Running multiple Google accounts, client workspaces, or untrusted repositories inside Google Antigravity Hub, IDE, or CLI risks cross-profile authentication bleed, shell login environment leakage, stale Chromium locks, black GPU compositor screens, and sudden Error Unknown: Agent execution terminated due to error. / unknown model key MODEL_PLACEHOLDER_* crashes whenever you log out and log back in after hitting weekly usage limits.
agy-profiles solves this in one zero-dependency package (pure Python 3.9+ stdlib plus an optional standalone Rust guardian agyp-guard):
Strict Multi-Account Sandbox Isolation:
0o700/0o600directories, immutable.zshenvHOMElocking, fail-closed MCP secret scrubbing, and exact--user-data-dirPID boundary matching.5-Minute and Post-Login Watchdog Recovery (
dev.agy-profiles.watchdog): Detects hiddenCORTEX_STEP_TYPE_ERROR_MESSAGEtermination steps via live Hub RPC (GetCascadeTrajectorySteps), waits forfetchAvailableModelsreadiness (clientModelConfigs), switches missing models safely, resets retry state on account change, and resumes stalled threads automatically every 5 minutes plus 6 seconds after login.Causal Watchdog RCA and Tamper-Evident Receipts: Collapses correlated crashes into
incident_stories(AUTH_LOGIN_MODEL_GAP,ACCOUNT_MODEL_MISSING,HTTP2_STREAM_DROP,FIVE_HOUR_QUOTA_PAUSE) and records0o600SHA-256 hash-chained receipts inlogs/recovery-audit.jsonl.Zero-
Cmd+QBlack-Screen Healer (agyp heal): Purges stale Metal/Dawn shader caches and recycles--type=gpu-processhelpers while keeping running agents and terminals alive.18-Tool MCP, CLI, TUI, and Aux Pane Console: Exposes
session_recover,profile_switch,host_handoff,system_doctor, andobligations_verifyacross CLI (agyp), stdio MCP, ASCII TUI (agyp top), and a CSRF-hardened Astryx Web Console (127.0.0.1:47920).
Related MCP server: local-mcp
Why agy-profiles vs Basic Account Switchers
Capability | Basic CLI Token Switchers |
|
Targets Supported | Single CLI binary | Antigravity Hub, Antigravity IDE, |
Logout/Login Crash Recovery | Manual prompt re-entry | 5m + 6s post-login auto-recovery ( |
Hidden RPC Error Detection | None | Inspects |
Causal RCA & Audit Trail | None |
|
GPU / Black-Screen Heal | Requires full |
|
CPU / Orphan PID Guardian | None | Native Rust |
Runtime Dependencies | Node / npm packages | Zero runtime PyPI or npm dependencies |
Post-Logout/Login Auto-Recovery (dev.agy-profiles.watchdog)
When switching accounts in Main Antigravity after exhausting weekly usage, active threads and /schedule crons frequently fail with failed to construct executor: unknown model key MODEL_PLACEHOLDER_*: model not found. Install the 24/7 watchdog or enable the bundled Antigravity Plugin so stalled threads recover automatically:
# Install 24/7 macOS launchd services (Rust agyp-guard + caffeinate + Web Console)
agyp daemon install --no-open --json
# Check live watchdog, lock, and Web Console health
agyp daemon status --json
# Inspect errored Desktop Hub threads without modifying state
agyp recover --dry-run --json
# Resume errored threads immediately after an account switch
agyp recover --reset-ledger --json
# Run agy ACP inside an isolated sandbox profile (compatible with pi-antigravity-acp-provider)
agyp agy core-research -- acpRead the full deep dive in Watchdog and Post-Logout Session Auto-Recovery.
Key Capabilities
Strict Sandbox Isolation: Provisions per-profile
data/,ide-data/,home/, andlogs/directories under/Volumes/Dev/.antigravity-profiles(when writable on macOS, or~/.antigravity-profiles, overridable viaAGY_PROFILES_DIRor--root). Writes an immutable0o600.zshenvpinningHOMEandZDOTDIRinside the profile so macOS login shell environment discovery never pulls host credentials.Dual Target Support (
hubandide): Launches and tracks both/Applications/Antigravity.app(Antigravity Hub) and/Applications/Antigravity IDE.app(Antigravity IDE) inside isolated--user-data-dirand--extensions-dirpaths, automatically settingapp_storage.jsonand IDEsettings.jsonflags to disable background auto-updaters.Fail-Closed Secret Sanitizer, Automations Migration, and Bidirectional Handoff: Copies host
projects/,sidecars/(Automations),plugins/,agents/,skills/,hooks.json,GEMINI.md,settings.json,trustedFolders.json, andmcp_config.jsonvia default--inherit-configoragy-profiles syncwhile redacting secrets, rewriting.geminipaths inside Automations to the sandbox, pruning deleted Host items, and defaulting Automations topausedstandby (activeon quota switchover orstripto omit). Reads SQLite conversations strictly read-only in both directions (--from hostor--from <profile>) to writeHANDOFF_CONTEXT.md.Symlink Allowlist and Blocklist: Rejects and strips symlinks pointing to sensitive host locations (
.ssh,.gnupg,.aws,.kube,.npmrc,.netrc,.pypirc,Library/Keychains,.gemini, shell startup dotfiles). Offers opt-in link policies (none,minimal,devdefault on CLI) for benign runtime binaries,.agentsshared rules underdev, and fonts.Exact Process Boundary Matching: Tracks and stops processes only when
--user-data-dir=<resolved_path>matches at strict token boundaries, including descendant child processes discovered via parent-PID traversal. Escalates cleanly fromSIGTERMtoSIGKILLand repairs stale Chromium locks (SingletonLock,SingletonSocket,SingletonCookie,DevToolsActivePort).Evidence, Accounts, and Obligation Ledgers: Detects signed-in Host and sandbox Google account emails without leaking tokens, emits structured
EvidenceRecordmetadata (evidence_id,authority,confidence,facts,limitations) on inspections, verifies.appcode signatures on Apple Silicon, and exposes six executable security self-checks viaagy-profiles obligations.Zero-Dependency Local Surfaces and Antigravity Plugin: Includes an
argparseCLI (agy-profiles/agyp) with one-commandswitchandrecover, a stdio JSON-RPC 2.0 MCP server exposing 18 tools (agy-profiles mcp), ad-hoc signed macOS.applaunchers (agy-profiles launcher build), a native Antigravity Hub Aux Pane plugin (antigravity-plugin/installed via./install.sh --with-pluginwith a built-in 5-minute recovery loop), and an Astryx Design System Web Console (agy-profiles web) withGothic Studio,Gothic, andNeutralthemes.
Installation
Install agy-profiles and its short alias agyp into ~/.local/bin via symlink:
git clone https://github.com/harrymove-ctrl/agy-profiles.git /Volumes/Dev/agy-profiles
cd /Volumes/Dev/agy-profiles
./install.shUseful installer options:
./install.sh --dry-run
./install.sh --prefix ~/.local/bin --with-skill --with-plugin
./install.sh --uninstall --with-skill --with-pluginYou can also run directly from the repository without modifying PATH:
./bin/agy-profiles doctor --jsonQuick Start
Check host Antigravity bundles and sandbox health:
agy-profiles doctorVerify built-in security and isolation invariants:
agy-profiles obligationsCreate an isolated profile (defaults to
--links dev --inherit-configwith Automations synced in paused standby):
agy-profiles create core-research --label "Core Research" --target hubRe-sync sanitized host customizations, control Automations mode (
paused,active,strip), read bidirectional handoff digests, or run one-command quota takeover:
agy-profiles sync core-research --automations paused --restart
agy-profiles handoff --from host
agy-profiles switch core-research --copy-prompt
agy-profiles switch host --from core-research --copy-promptLaunch Antigravity Hub or IDE for that profile:
agy-profiles launch core-research
agy-profiles launch core-research --target ide --workspace /Volumes/Dev/my-repoBuild a native Spotlight and Dock
.appbundle launcher:
agy-profiles launcher build core-research --target hubOpen the local Web Console on
127.0.0.1:
agy-profiles webConnect an AI coding client to the stdio MCP server:
{
"mcpServers": {
"agy-profiles": {
"command": "agy-profiles",
"args": ["mcp"]
}
}
}Web Console and Frontend Build
The local Web Console (agy-profiles web) is built with React 19, TypeScript, @astryxdesign/core, and @stylexjs/stylex from web-ui/, then pre-compiled with Vite into src/agy_profiles/web_static/ (index.html, styles.css, app.js, mark.svg, fonts/*.woff2) so end users install and run agy-profiles with zero Node or PyPI runtime dependencies.
Astryx Design System & Themes: Uses the customized
Gothic Studiodark theme by default (built with the Astryx Theme Editor extendingGothicwith crisp obsidian surfaces, hairline borders, medium scale, and small corners) alongsideGothicandNeutral(with Light and Dark mode switching), plus six profile accent presets.Self-Hosted Typography: Bundles
Fustat Variable,Manufacturing Consent,UnifrakturMaguntia,Figtree Variable, andJetBrains Mono Variable.woff2font files directly insidesrc/agy_profiles/web_static/fonts/with zero externalfonts.googleapis.comrequests.Interactive Console Workflows: Provides
TopNavandSideNavswitching acrossProfiles,Handoff,Obligations, andDoctor, signed-in Host and profile Google account badges,LayoutHeaderaction bars with one-clickSync Setup, copyable cross-account resume prompts inHandoff,Avatar+AvatarStatusDotidentity indicators, a profile creationDrawer, confirmation controls, and keyboard shortcuts (/to filter profiles,nto open Create Profile,rto refresh live state).Loopback & CSP Hardening: Binds strictly to
127.0.0.1or::1, authenticates requests via 365-day sliding signed session cookies backed by0o600.web-secrets.jsonplusX-AGY-CSRF, enforcesscript-src 'self'andfont-src 'self', and isolates/fonts/static serving with single-segment extension checks.Rebuilding Frontend Assets (Optional Dev Only):
cd web-ui
npm install
npm run buildThis updates src/agy_profiles/web_static/ directly for packaging and verification (docs/assets/web-console-overview.png).
CLI Command Reference
Command | Purpose |
| List all profiles, runtime states, disk sizes, and detected host targets. |
| Provision a new sandbox profile with strict directory modes. |
| Inspect permissions, symlinks, live PIDs, and |
| Update label, accent color, default target, symlink policy, or auth mode. |
| Sync sanitized host projects, Automations, plugins, agents, skills, rules, MCP JSON, and handoff while pruning removed Host items. |
| Check git cleanliness, sync setup and handoff, activate Automations, copy resume prompt, and launch target profile. |
| Read recent Host or profile Antigravity conversations strictly read-only for bidirectional quota handoff. |
| Launch Hub or IDE inside the profile sandbox. |
| Stop verified profile processes with |
| Clean stale Chromium lock files and reconcile |
| Clone a stopped profile while excluding transient locks and optionally stripping OAuth tokens ( |
| Rename a profile slug and display label while keeping OAuth credentials intact. |
| Delete a profile sandbox safely inside root boundaries. |
| Compile and ad-hoc sign (or remove) a macOS |
| Inspect host Antigravity binaries, |
| Execute and report all six live security obligation checks. |
| Serve 18 tools over line-delimited JSON-RPC 2.0 stdio ( |
| Inspect Desktop Hub trajectories via live RPC for auth, model, stream, or quota errors and resume them. |
| Start the CSRF-guarded local web console or Antigravity Aux Pane sidecar service. |
| Install and manage persistent 24/7 macOS |
| Inspect or run the zero-dependency native Rust CPU, GPU, unified memory, and orphan PID guardian ( |
| Recover black Antigravity windows without |
| Poll active logs and automatically switch quota, clickable sessions, and Automations onto the standby profile on exhaustion. |
| Run terminal |
| Run the zero-dependency SRCL and WebTUI inspired ASCII terminal telemetry dashboard or export dark-mode SVG cards for X and GitHub. |
Verification and Testing
Run the full zero-dependency test suite across Python 3.9 and 3.14, Rust guardian tests, and the secret and contamination scanner:
python3 -m unittest discover -s tests -v
cargo test --manifest-path rust/agyp-guard/Cargo.toml
python3 scripts/check_secrets.pyDocumentation and Architecture References
Watchdog and Post-Logout Session Auto-Recovery:
dev.agy-profiles.watchdoginternals,GetCascadeTrajectoryStepsRPC detection, causal RCA stories, and hash-chainedrecovery-audit.jsonlreceipts.Architecture Overview: Five-layer clean-room module design, shell isolation rationale, and lock lifecycle.
Reconstruction Obligations: Live invariant definitions verified on every release.
Security Model: Threat model, CSP/CSRF controls, symlink jail, and fail-closed redaction guarantees.
External Research and Ecosystem Context: Built with inspiration from independent watchdog design (
arXiv:2608.21841), Datadog Watchdog causal RCA grouping, NVIDIA Open Agent Safety Platform out-of-band audit guarantees, and ACP (agy acp/pi-antigravity-acp-provider) multi-account isolation.
License
MIT License. See LICENSE.
Available Tools
18 toolshost_handoffC
Read active Host or sandbox Antigravity conversations read-only to generate a resume digest.
Inputs: limit, source.
launcher_buildC
Compile a macOS Spotlight/Dock .app shim for launching a sandboxed profile.
Inputs: name (required), dest, target.
launcher_removeC
Remove the macOS .app launcher shim associated with a sandbox profile.
Inputs: name (required), dest, target.
obligations_verifyB
Run live security self-checks across isolation, MCP scrubbing, PID matching, and CSRF guards.
Inputs: no named parameters.
profile_cloneC
Clone a stopped sandbox profile to a new profile slug with freshly locked .zshenv HOME.
Inputs: source (required), target (required), label, fresh_auth.
profile_createB
Create a hardened isolated profile directory with 0700/0600 permissions and optional sanitized config inheritance.
Inputs: name (required), label, accent, auth_mode, +4 more.
profile_deleteC
Delete a sandbox profile and its macOS launchers after unlinking managed symlinks safely.
Inputs: name (required), confirm (required), force_stop.
profile_inspectB
Inspect one sandbox profile, its permissions, symlinks, runtime PIDs, and Evidence record.
Inputs: name (required).
profile_launchC
Launch Antigravity Hub or IDE strictly sandboxed inside the profile directory.
Inputs: name (required), target, workspace.
profile_listA
List all isolated Antigravity sandbox profiles, host binaries, and live status.
Inputs: no named parameters.
profile_renameC
Rename a sandbox profile slug and display label while preserving login credentials and relocking .zshenv HOME.
Inputs: source (required), target (required), label, restart.
profile_repairC
Clean stale Chromium locks when stopped and reconcile sandbox .zshenv and permissions.
Inputs: name (required), launch, target.
profile_stopB
Stop verified running processes owned by a sandbox profile using staged SIGTERM then SIGKILL.
Inputs: name (required), target, timeout_sec.
profile_switchB
Switch active quota onto a profile (or back to 'host') by checking git status, syncing clickable sidebar sessions, setup, handoff, and automations, and launching.
Inputs: name (required), limit, launch, target, +6 more.
profile_syncC
Sync sanitized host projects, automations, plugins, agents, skills, rules, MCP JSON, optional clickable sidebar sessions, and handoff into a profile.
Inputs: name (required), limit, restart, from_source, +5 more.
profile_updateC
Update profile metadata, auth mode, or symlink policy and reconcile sandbox directories.
Inputs: name (required), label, accent, auth_mode, +3 more.
session_recoverB
Inspect running Antigravity Desktop Hub instances for conversations terminated by auth logout/login, model lookup, stream, or quota errors and automatically resume them.
Inputs: scope, dry_run, reset_ledger, lookback_hours.
system_doctorB
Inspect host Antigravity bundles, sandbox root permissions, launcher signatures, stale locks, and isolation state.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Several tools have overlapping inspection or reconciliation scopes: profile_inspect, system_doctor, and obligations_verify all inspect security/isolation state, while profile_repair, profile_update, and profile_sync all reconcile profile contents. profile_switch also bundles sync, handoff, setup, and launch behavior that overlaps with individual tools, though the descriptions do help distinguish intent.
All tools use predictable lowercase snake_case, and most follow an entity_action pattern such as profile_create, launcher_build, and session_recover. Minor deviations like host_handoff and system_doctor break the verb pattern slightly but remain readable and consistent.
At 18 tools, the server is slightly above the ideal 3–15 range, but the domain is broad: profile lifecycle, launchers, syncing, security verification, and session recovery. Most tools appear to earn their place, though the surface is somewhat heavy.
The set covers a full profile lifecycle with create, list, inspect, update, rename, clone, stop, delete, repair, launch, and switch operations, plus launchers, syncing, handoff, and security checks. Explicit export/backup/archive operations are not present, but the core workflows appear covered.
Maintenance
Related MCP Connectors
Create, run and manage Homemade dev VMs and projects from your AI agent.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Run 30+ pre-installed DevSecOps, OpenAPI, Rego, AST & SQL CLIs in isolated Linux microVMs.
Related MCP Servers
- AlicenseAqualityBmaintenanceWraps Google Antigravity CLI into 11 typed MCP tools, enabling any MCP client to invoke agy for code review, prototyping, execution, and long-running tasks.1177 PyPI25MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to securely inspect, modify, and manage local projects with trusted filesystem access, safe Git operations, controlled task execution, and developer runtime process management over stdio or HTTP.4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables STDIO-compatible AI assistants to queue coding work onto the official Google Antigravity CLI and track status, read reports or patches, query capabilities, or cancel running tasks without blocking. Supports trusted direct execution plus optional isolated or read-only modes depending on the platform.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex or Claude Code to orchestrate persistent Antigravity CLI workers as independent implementers and testers within restricted workspace roots. It supports asynchronous task dispatch, progress polling, result inspection, follow-up messages, and cancellation with bounded, audited local event logging.5MIT