Platform · Architecture

Six Layers, Clean Contracts, No Lock-In.

Modular and upgrade-safe by design - swap any layer without touching the rest. The model you use today won't be the model you use next year. LuMay's architecture absorbs that without rewriting agents, flows, or governance.

Overview

LuMay's architecture is a six-layer reference model with strict contracts between layers. Each layer has a single responsibility, an internal API, and defined inputs and outputs. When you change a model, replace a connector, add a new channel, or swap an observability backend, only that layer changes. Everything above and below it continues to work.

This matters because AI infrastructure changes faster than enterprise procurement cycles. The model you deploy today will be superseded in six to twelve months. The CRM connector you start with might not be the one you scale with. The observability tool your team uses today might be replaced. LuMay's architecture absorbs all of those changes without rewriting agents, flows, or governance.

Layered stack - platform spine highlighted
01InterfaceVoice, chat, Teams, web portal, REST API
02IntelligenceRAG, reasoning, classification, structured outputs
03OrchestrationWorkflows, multi-agent, HITL, versioning
04IntegrationConnectors, adapters, OAuth, MCP servers
05GovernanceRBAC, RLS, audit, PII controls, guardrails
06AnalyticsKPIs, cost, quality, traces, sentiment
Change one layer, preserve the rest
Model providerIntelligence
New channelInterface
CRM migrationIntegration
New policyGovernance
Deployment shiftRuntime shell

This is what 'platform, not project' means in practice.

The Six Layers

#LayerResponsibilityComponents
01InterfaceChannels agents are reached throughVoice (Twilio WebSocket), Chat, Microsoft Teams, Web portal, REST API
02IntelligenceReasoning and understandingRAG, LLM reasoning (OpenAI / Anthropic), intent classification, structured outputs
03OrchestrationWorkflow execution and multi-agent coordinationConversation flows, multi-agent delegation, HITL gates, versioning, NL builder
04IntegrationConnecting agents to external systemsConnectors (CRM, ticketing, email, docs), OAuth vault, MCP servers
05GovernanceTrust, compliance, and controlRBAC, Row-Level Security, audit logs, PII controls, guardrails, secrets management
06Analytics & ROIMeasurement and value demonstrationKPIs, cost tracking, ROI dashboard, sentiment, quality scores, OTel traces, Prometheus metrics

What You Can Swap Without Breaking Anything

Because each layer has clean contracts, changes are contained to the layer being modified:

You want to…Layer affectedEverything else
Change LLM provider (OpenAI → Anthropic)02 IntelligenceUnchanged - agents, flows, connectors unaffected
Add a new channel (e.g. WhatsApp)01 InterfaceUnchanged - reasoning, flows, connectors unaffected
Replace a CRM connector (HubSpot → Salesforce)04 IntegrationUnchanged - agent flows reference tool names, not vendor names
Move from SaaS to on-premInfrastructure (below all layers)All six layers unchanged - same code, same behaviour
Add a new governance rule05 GovernanceUnchanged - enforcement is added at the layer without touching application code
Switch observability backend06 AnalyticsUnchanged - OTel instrumentation is vendor-agnostic

Runtime Architecture

The platform runs as two cooperating services that share one library:

  • Management API - FastAPI, port 8080. Handles agent configuration, flow authoring, connector management, RBAC, and all administrative operations. 35+ feature routers with JWT/RBAC middleware on every route.
  • Voice Agent Engine - Pipecat AI, port 8001. Handles WebSocket connections from Twilio for inbound and outbound calling. Scales independently based on concurrent active calls.

Both services share the following infrastructure:

  • PostgreSQL with Row-Level Security - tenant isolation enforced at the database layer.
  • Redis - configuration cache; degrades gracefully if unavailable.
  • RabbitMQ - event bus for cache invalidation, async workflows, and outbound scheduling.
  • OpenTelemetry Collector - exports to Grafana Tempo (traces), Prometheus (metrics), and Loki (logs).

Want a walkthrough of how it maps to your stack?

Book a 30-minute architecture review. We'll map the six layers to your existing systems, identify where LuMay slots in, and plan the integration sequence.

Hi there! I'm MyLu!
Your Autonomous AI Guide