How I Built a Multi-Agent Micro-SaaS Orchestration Engine in n8n (Zero Cloud Subscriptions)
Описание и применение
Создана масштабируемая микросервисная система с несколькими агентами, реализованная полностью в n8n без подписок на облачные сервисы, с веб‑хуками, Tailwind‑фронтендом и самохостинг‑памятью.
Задача
Commercial AI orchestration platforms are expensive or fragile, and building custom backends in Python leads to technical debt.
Результат
The architecture allows instant deployment of a scalable micro‑SaaS agent farm without cloud orchestration subscriptions, keeping context within a VPC and controlling API costs.
Рабочий процесс
- 1. User submits JSON payload via lightweight HTML/Tailwind form to n8n webhook.
- 2. Master Agent webhook sanitizes payload, maps intent to target worker, generates session_id and timestamp.
- 3. Master Agent triggers Execute Workflow node to run selected worker sub‑workflow (e.g., research_agent, code_agent).
- 4. Worker sub‑workflow receives sanitized prompt and context, uses Python node to truncate history to max tokens, and forces LLM to output strict JSON.
- 5. Aggregator node compiles worker outputs and pushes structured data to CRM (HubSpot, Salesforce, Airtable).
- 6. Frontend polls status webhook with job_id to display results; webhook returns HTTP 202 Accepted immediately to avoid timeouts.
Доказательства
Building scalable, multi-agent AI systems usually means falling into one of two traps: drowning in the spaghetti code of Python-based orchestration libraries, or bleeding monthly recurring revenue to expensive, proprietary platforms like LangSmith or Vercel AI.
The solution is a Webhook-driven REST API sitting on top of an n8n Master/Worker architecture, hooked into a simple HTML/Tailwind frontend.
Set your initial n8n webhook to "Respond Immediately" and return an HTTP 202 Accepted with a job_id.
- Дата записи: 2026-10-17T19:41:11.163Z