Orchestrated Agentic AI: Why Control Beats Chaos
How I stopped hitting Claude's usage limits with a priority routing bot — and the same pattern scales surprisingly well beyond a personal setup.

1 · The Problem — and Why I Built This
I found myself hitting Claude’s monthly usage ceiling faster than expected — often mid-morning. When I looked honestly at my chat history, the pattern was obvious: 60–80% of my queries had no business going to a frontier model. Summarising a Slack thread. Drafting a quick reply. These didn’t need Claude’s depth — they just needed an answer.
The fix is an architecture fix: stop relying on a single model for everything and build a system that decides which model a task deserves. What started as a side project to recover usage headroom turned into a surprisingly robust personal AI infrastructure — a Slack bot connected to a self-hosted n8n instance. Worth noting: n8n itself is free to self-host — you only pay your hosting provider.
Key Principle: Orchestration turns every guardrail, routing rule, and model choice into an explicit, auditable pipeline step — not an implicit hope buried in a system prompt.
2 · What You Need to Know Before Starting
-
Reading API responses and JSON. Most of what flows through this workflow is JSON. Know which field to reference — that’s it.
-
Python at the basics level. If you can iterate over a for loop, you’re covered. Intermediate knowledge only needed for custom extensions.
-
Basic Docker. Run
docker compose up, read a Compose file, restart a container. -
n8n — buildable on the fly. No prior experience needed. The visual interface is intuitive; you’ll learn as you build.
3 · How I Built It — Self-Hosted n8n on a VPS
Any message I send to a designated Slack channel gets triaged, routed to the right model, and replied to — all without me thinking about which AI to open. It runs on a Hostinger VPS (₹999/month ($12)). n8n is open-source, self-hosted, code-friendly, with native LLM node support. Every node’s input/output is inspectable, and the execution log is right there when something goes wrong.

A · Slack Trigger + Input Guardrail
The workflow fires on every Slack message via an Event Subscription webhook. Before any LLM sees the text, an Input Guardrail screens for prompt injection, jailbreaks, PII, and off-topic requests. Only clean input clears the gate — anything that fails gets a polite rejection with no model spend incurred.



B · Intent Extraction + Session Memory
Raw Slack messages are terse. The Extract Intent node rewrites them into complete, self-contained prompts. A Python node generates a fixed arbitrary hex session ID that keys a Shared Session Memory buffer. This buffer is shared across both the frontier and low-tier branches — so whichever model handles your follow-up always has the same conversation history.

C · Priority Classification
A Structured Output Parser forces the classifier to return clean JSON: {"priority": 1, "reason": "..."}. P1 = complex / high-stakes → frontier model. P2/P3 = routine → fast, cheap model. An IF node splits the flow. Tune with concrete examples per tier — ambiguous inputs default to P2, never fail outright.

D · Frontier vs. Low-Tier Routing
P1 → Frontier Model (currently Claude Sonnet). P2/P3 → Low-Tier agent — currently Ollama, swappable to Gemini Flash, GPT-4o-mini, or a local model with a single dropdown change and no downstream impact. Both agents share the same Session Memory, so context is seamless across branches. In practice, 75% of queries never hit a paid API — that alone is why I stopped hitting usage limits.

E · Output Guardrail + Reply
Both branches converge at an Output Guardrail — screening the model’s response for leaked PII, exposed secrets, and hallucinated content before it surfaces to the user. Only cleared responses reach the Reply to Slack node.

4 · Deployment — VPS + Self-Hosted n8n
The VPS orchestrates; the LLM APIs do the compute. Single Docker Compose file, domain pointed at your VPS, SSL handled by the host — n8n on HTTPS within an hour.

Where You’ll Hit Friction
-
Slack webhook setup. Slack requires a public HTTPS URL before verifying your endpoint. Budget time for OAuth scopes (
channels:history,chat:write) and Event Subscriptions. -
Python in Docker. Requires a small Docker extension — well-documented, but expect a restart or two.
-
Classifier edge cases. Tune with concrete examples per tier. Ambiguous inputs should route to P2, never fail outright.
Honest caveat: The Python node is the only step I wouldn’t call plug-and-play. Everything else installs without ceremony.
5 · Why Orchestrators Still Matter
“Access for every team. Guardrails built in.”
There’s a fashionable narrative that explicit pipelines are the old world — that agentic loops have made them redundant. It’s a seductive but expensive misconception. Any system that touches real tasks, real data, or real budget needs deterministic, auditable, interruptible execution. That truth doesn’t change because a node now contains an LLM.
-
Cost control. Routing 75% of queries to Ollama cut my API spend to near zero with no quality loss on routine tasks.
-
Auditability. Full input/output per node, per run — in regulated industries this is the difference between a deployable system and a liability.
-
Structural governance. Guardrails live in the workflow, not a system prompt. Control is enforced in code, not assumed from model behaviour.
-
Data sovereignty. Conversation data and logs never leave your VPS.
Orchestrators aren’t competing with agentic AI. They’re what makes agentic AI safe to run at scale.
6 · Can Pure Agentic Systems Deliver This?
Before going fully autonomous, four questions worth sitting with honestly:
Can you see every step? Full input/output per node, per run — not just a model response.
Can you enforce which tools fire and when? Structurally, in code — not via a system prompt a crafted input can override.
When something breaks, where do you look? In n8n: open the execution, find the node. In an agent loop — good luck.
Can you swap a model without touching code? Here it’s one dropdown.
The question was never orchestration vs. agents — it was always: have you built the scaffolding that lets you trust your agents when they run unsupervised on real data with real consequences?
7 · Why This Matters for Your SAP Landscape
At SAP Sapphire 2026 — held in Orlando and Madrid — SAP announced a strategic investment in n8n at a $5.2 billion valuation, more than double its previous round. The plan is to embed n8n’s technology directly into Joule Studio by Q3 2026.
What SAP confirmed: n8n gives SAP a way to connect business context with automation workflows across SAP and non-SAP systems — making Joule Studio a place where customers can extend, orchestrate, and govern agentic processes across complex enterprise landscapes.
For enterprises, this is the moment to think seriously about governance-first agentic design — not as an afterthought, but as the foundation. Every pipeline step is an opportunity to enforce a regulation, log an action, or keep a human in the loop before an agent acts on real data. Deploying AI agents at scale without that scaffolding isn’t bold — it’s a liability. The organisations that get this right will be the ones that treat auditability, accountability, and staged autonomy as design constraints from day one — not features bolted on after something goes wrong.
#AgenticAI #n8n #WorkflowOrchestration #AIEngineering #LLMSecurity #Guardrails #PromptInjection #EnterpriseAI