Skip to content
All work

AI systems

Agent Farm

Hub-and-spoke agent farm with isolated RAG workspaces

TypeScriptNode.js 20FastifyBullMQgrammYPostgreSQL (RLS)Docker ComposeTailscaleCaddy
5
rollout stages
0
shell tools given to the model

Problem

Several LLM agents across several VPS boxes is first an isolation problem, not an orchestration one. Context leaking between workspaces — or an agent holding a shell tool — turns convenience into an incident.

System

The hub (VPS-0) runs the Telegram bot, a Fastify orchestrator, BullMQ, Postgres and Redis; the spokes (VPS-N) run workers with a RAG pipeline, one workspace each. Isolation is enforced in the database, not in application code: workers connect to Postgres as role worker, and RLS demands SET LOCAL app.workspace_id — forgetting the workspace filter is physically impossible. The only public surface is the Telegram webhook through Caddy; Postgres and Redis listen on a Tailscale mesh with its own ACL. Privileged actions require an inline Yes/No in chat, and the model is never handed a shell or exec tool.

Role

Solo build: architecture, security invariants, infrastructure.

Outcome

MVP with a five-stage rollout plan, heartbeat collection and alerting. The safety invariants are written into the README as a contract, not an aspiration.