Agen AI hibrida dan infrastruktur VPSHybrid AI Agent & VPS Infrastructure
Agen AI hibrida untuk tugas latar 24/7 di VPS, dengan inferensi model yang dibatasi wilayah dilewatkan lewat proxy residensial lokal yang diizinkan.A production hybrid AI agent setup routing 24/7 background tasks on a cloud VPS while relaying geo-restricted model inference through an allowlisted local residential proxy.
HasilOutcome
Alur operasi AI tanpa biaya tambahan. Hermes dan 9Router jalan 24/7 di VPS, dan inferensi Google Antigravity lewat IP residensial lokal.A resilient, zero-added-cost AI operations pipeline. Hermes agent and 9Router operate 24/7 on the VPS, with Google Antigravity inference successfully routed through the local residential IP.
Masalah dan batasanThe Problem & Constraints
- API Google Cloud Code / Antigravity memblokir IP keluar pusat data (HTTP 403) dari Tencent Cloud AS132203.Google Cloud Code / Antigravity API blocks cloud datacenter egress IP ranges (HTTP 403 Forbidden) from Tencent Cloud AS132203.
- Proxy residensial komersial dihitung per gigabyte, jadi alur agen yang terus berjalan jadi berbiaya tetap.Commercial residential proxies charge per gigabyte, creating recurring costs for continuous coding agent workflows.
- Menjalankan agen hanya di laptop berarti mesin harus menyala 24/7, sehingga jadwal, cron, dan perawatan latar berhenti saat laptop tidur.Running the agent solely on a personal laptop requires the machine to stay awake 24/7, breaking scheduled automation, cron jobs, and background maintenance.
ProsesEngineering Process
- 01.OAuth berhasil di VPS, dan inferensi mengembalikan HTTP 403 dari alamat pusat data.Confirmed OAuth succeeded on the VPS and inference returned HTTP 403 from the datacenter address.
- 02.Proxy CONNECT berdaftar putih di laptop, tunnel SSH terbalik ke sana, dan strictProxy pada koneksi Antigravity.Ran an allowlisted CONNECT proxy on the laptop and a reverse SSH tunnel to it, with strictProxy on the Antigravity connection.
- 03.Tunnel dimulai saat login Windows, dan combo cadangan dipakai saat laptop mati.Started that tunnel at Windows login, and left fallback combos for when the laptop is off.
KeputusanKey Architectural Decisions
- Arsitektur hibrida: VPS menyala 24/7 untuk gateway Hermes, webhook, dan pemantauan. Laptop hanya jembatan keluar saat menyala.Hybrid architecture over pure local: VPS stays 24/7 for Hermes gateway, webhooks, and monitoring, while the laptop acts strictly as an egress bridge when active.
- strictProxy di 9Router dinyalakan agar 403 berulang dari IP awan tidak memicu kunci akun Google.Strict proxy enforcement: Configured strictProxy to true in 9Router to prevent repeated 403 errors on cloud IP from triggering Google account-level rate locks.
- Semua layanan (proxy, pemantauan, API 9router) hanya mengikat 127.0.0.1, dan dijangkau lewat tunnel SSH.Loopback-only binding: All services (proxy, monitoring, 9router API) bind to 127.0.0.1, reachable solely via authenticated SSH tunneling.
Yang saya pelajariWhat I Learned
- Kunci yang valid tidak cukup. OAuth lolos, dan panggilan inferensi tetap 403 untuk alamat pusat data.A valid key is not enough. OAuth passes and the inference call still returns 403 for a datacenter address.
- Di PowerShell, curl adalah alias. Pakai curl.exe. Tunnel kedua gagal selama port 18081 masih terpakai.In PowerShell, curl is an alias. Use curl.exe. A second tunnel fails while port 18081 is already taken.
- Satu 403 mengunci model itu di 9router sekitar 2 menit. Uji sekali, lalu tunggu.One 403 locks that model in 9router for about 2 minutes. Test once, then wait.
Deep dive and technical devlog into engineering a hybrid cloud-local AI agent architecture.
Run it
By hand, in a window that stays open:
powershell -ExecutionPolicy Bypass -File .\start-antigravity-proxy.ps1
Automatically at every Windows login, set up once:
powershell -ExecutionPolicy Bypass -File .\install-startup.ps1
Needs node and ssh on PATH, and ssh bot-vps must log in without a password prompt. The PC has to stay on; if it is off, Antigravity fails (Strict Proxy) and other providers are unaffected.
Check it
Local proxy, from the PC:
curl.exe -sS -m 15 -x http://127.0.0.1:18080 https://ipinfo.io/org
Through the tunnel, from the PC:
ssh bot-vps "curl -sS -m 15 -x http://127.0.0.1:18081 https://ipinfo.io/org"
Both should print Telkom Indonesia. Tencent means the tunnel is down.
If something breaks
- Proxy CONNECT aborted: the proxy on the PC is not running. Start the script again.
- Remote port forwarding failed: port 18081 is taken on the VPS. Change it in the script and in the 9Router proxy URL together.
- 403 is back: the tunnel is down. Run the check before testing again.
Limits
This is a stopgap. A lasting fix needs an always-on proxy at a normal ISP address. Antigravity through 9Router uses an unofficial OAuth session, so Google may limit or block the account. It is also not proven whether Google rejects the VPS because of the datacenter range or for another reason; the 403 body was never captured.