Self-hosted n8n agent that researches trending topics daily, generates niche-specific video scripts via Google Gemini, and runs an AI Judge layer for quality control. The predecessor to OpenClaw.
Manual trend research and creative writing is a daily bottleneck for content channels. I wanted a set-and-forget agent that produces production-ready scripts every day on a 1GB RAM VPS, so the unit economics worked.
Built a self-hosted n8n v2.0 workflow on a Linux VPS with Docker Compose. After an initial attempt to run Llama 3.2 locally OOM-crashed the box, I diagnosed the bottleneck via terminal resource monitoring and pivoted to a hybrid architecture: keep logic local, offload inference to Google Gemini. Refactored the entire pipeline from file-based to a RAM-only JSON object passing model after hitting EACCES errors on Docker volumes. Added a secondary AI Judge workflow to gate output for safety and relevance.
Daily generation pipeline running with parent/child workflow separation between scraper and generator. Cut potential server-upgrade costs by 400% and lifted generation speed 10x by going hybrid cloud. The architecture I worked out here grew into OpenClaw.