Reference architecture
The five-layer AI operations stack
Most businesses run on a dozen disconnected dashboards: analytics, ads, CRM, email, reviews, accounting, projects, helpdesk, reporting, and spreadsheets. The five-layer architecture gives each layer one job, makes each one replaceable, and puts the whole business on one screen.
The five layers
Source of truth
One structured database for customer records, lead events, workflow history, AI outputs, approvals, and metrics. Every other layer reads from and writes to it, with an audit trail on every write so you keep the why behind the what.
Automation engine
Where the operating logic runs: lead routing and enrichment, inbound classification, cross-system syncs, scheduled reports, and multi-step AI workflows, with retries, dead-letter queues, alerts, and replayable executions.
App connector
Prebuilt integrations for the obvious connections, such as form to CRM or payment to accounting, that non-technical staff can own. Anything that needs branching or real transformation graduates to the automation engine.
AI reasoning
Turns emails, calls, documents, and images into structured actions: intent classification, entity extraction, lead scoring, drafted replies, and retrieval over your own knowledge base. Every model call is treated like an API call, with structured output, evaluation, cost tracking, and guardrails.
Human control panel
One screen for the operator: an approval inbox for drafted actions, a failed-workflow monitor, cost tracking, department dashboards, an AI activity log, and a kill switch that halts every workflow at once.
Decoupled, not monolithic
Each layer can be swapped without rebuilding the rest. You keep your data in your own database, plug in new models when they ship, write any custom logic you need, and design the audit schema yourself.
Typical tools by layer
Source of truth
- Supabase
- PostgreSQL
- Custom app database
- Airtable (early stage only)
Automation engine
- n8n (self-hosted or cloud)
- Python and Node workers
- Cron and AWS EventBridge
- Webhooks
App connector
- Zapier
- Make
- Pipedream
- Native app integrations
AI reasoning
- OpenAI
- Anthropic Claude
- Google Gemini
- pgvector, Pinecone, Weaviate
- LangChain, LlamaIndex
- Instructor and guardrails
Human control panel
- Custom Next.js dashboard
- Retool
- Supabase read layer
- Slack and email alerts
The order we build the layers
01
Source of truth
Database stood up with a schema for the first three workflows and an audit log table from day one.
02
Automation engine
First workflows wired up, typically instant lead response, a daily report, and one cross-system sync.
03
AI reasoning and app connector
Model APIs added for scoring and drafted replies with structured output and an evaluation harness, while simple SaaS-to-SaaS connections go into the app connector for the team to maintain.
04
Human control panel
A dashboard on the source of truth with the approval inbox, failed-workflow monitor, kill switch, and the first department views.
05
Compound
New workflows added on the same foundation. A lead that arrives, gets enriched, scored, drafted a reply, approved, and sent is fully logged and queryable, and every later workflow follows that pattern.
Questions
Why not buy one all-in-one platform like HubSpot or Salesforce?
For some businesses that is the right answer. All-in-one platforms define the operating model for you, though, and the first workflow they did not anticipate leaves you stuck. Layers trade a little upfront wiring for lasting flexibility: you own the logic and the data and can replace any component on its own.
What if we already use a CRM?
Keep it. The CRM stays the system of record for sales data, the source of truth holds what it does not (workflow logs, AI outputs, approvals, and audit trails), and the automation engine syncs both directions.
Do we need engineers on staff to maintain this?
Not for the app connector layer, which non-technical staff can own. The other four layers need an in-house engineer or an ongoing support relationship with a partner such as STRAVYNT.
Can we self-host the stack for compliance?
Yes. n8n and Supabase can be self-hosted, the AI layer can run on Azure OpenAI, AWS Bedrock, or self-hosted open models, and the dashboard runs anywhere. That gives regulated teams in healthcare, financial services, government, and legal a self-host path for every layer.
How is this different from just building software?
It is building software, with a clear pattern aimed at automating business operations. The pattern keeps an AI operations project from turning into a tangle of one-off scripts and automations nobody can maintain later.
Related services
Want this architecture for your business?
We will review your current stack, map your data flows, and lay out a layer-by-layer build plan you can use either way.
