I built an AI agent that runs on a VPS and uses Syncthing to bidirectionally sync files with my local machine.
The motivation: local agents have full file access but are a security risk (one hallucination away from rm -rf). VPS agents are isolated but can't access your files. I wanted both, safety and file access.
The approach is simple: Syncthing handles P2P encrypted file sync between your computer and VPS. The agent works on the synced folder on the VPS. Results appear on your local machine automatically.
Since it runs on a VPS, it's available 24/7. I control it via Telegram or Feishu (a Chinese Slack-like app). It has tools for bash execution, file read/write, web search, and sync awareness.
Tech details:
- Uses LiteLLM for multi-model support (Qwen, Gemini, Claude, DeepSeek)
- Prompt caching for cost efficiency
- Channel-based architecture — adding a new IM takes ~3 methods
- Syncthing REST API integration for sync status awareness
- ~2000 lines of Python, runs on a 2 vCPU / 2GB VPS
This started as a learning project for agent loops and grew from there. I haven't seen this file-sync approach elsewhere, so I'm curious what HN thinks about this direction.
luli_y•1h ago
The motivation: local agents have full file access but are a security risk (one hallucination away from rm -rf). VPS agents are isolated but can't access your files. I wanted both, safety and file access.
The approach is simple: Syncthing handles P2P encrypted file sync between your computer and VPS. The agent works on the synced folder on the VPS. Results appear on your local machine automatically.
Since it runs on a VPS, it's available 24/7. I control it via Telegram or Feishu (a Chinese Slack-like app). It has tools for bash execution, file read/write, web search, and sync awareness.
Tech details: - Uses LiteLLM for multi-model support (Qwen, Gemini, Claude, DeepSeek) - Prompt caching for cost efficiency - Channel-based architecture — adding a new IM takes ~3 methods - Syncthing REST API integration for sync status awareness - ~2000 lines of Python, runs on a 2 vCPU / 2GB VPS
This started as a learning project for agent loops and grew from there. I haven't seen this file-sync approach elsewhere, so I'm curious what HN thinks about this direction.