Architecting for AI-Native Platforms: RAG, LLM Orchestration, and Agentic Patterns An engineer outlined an architectural approach for evolving mature enterprise SaaS platforms into AI-native systems, arguing that AI capabilities such as RAG, LLM orchestration, and agents should inherit existing platform properties—auth, tenancy, data, audit, and APIs—rather than spawning a parallel stack. The writeup recommends treating retrieval as a reusable platform capability behind a Retrieval API, decoupling AI features from the underlying vector indexing implementation. AI adoption in an enterprise SaaS platform is rarely about adding an LLM API and calling it done. The difficult part is integrating AI into an existing platform without weakening the properties that made the platform trustworthy in the first place . A mature SaaS platform already has: AI should not create a parallel architecture that bypasses these capabilities. It should inherit them . That's the architectural principle I use when thinking about evolving a mature SaaS platform toward AI-native capabilities. The first architectural decision is where AI belongs. A tempting approach looks like this: Existing Platform │ └──────► AI Platform │ ├── Own data ├── Own permissions ├── Own workflows └── Own state This creates a dangerous divergence. Now there are effectively two systems that understand the business. The better model is: ┌─────────────────────┐ │ AI Capabilities │ │ │ │ RAG / LLM / Agents │ └──────────┬──────────┘ │ Platform APIs │ ┌──────────▼──────────┐ │ Canonical Domain │ │ Model │ └──────────┬──────────┘ │ ┌──────────▼──────────┐ │ Core Platform │ │ │ │ Auth / Tenancy / │ │ Data / Audit / APIs │ └─────────────────────┘ The core platform remains the source of truth. AI becomes another consumer and orchestrator of platform capabilities. This distinction becomes increasingly important as AI moves from simply generating answers to taking actions . Large language models are powerful, but they don't automatically know your organization's current data. For enterprise applications, the challenge is therefore often less: "Which model should we use?" and more: "How do we reliably provide the right context to the model?" That's where Retrieval-Augmented Generation RAG becomes useful. A simplified RAG pipeline looks like: Documents / Domain Data │ ▼ Chunking │ ▼ Embedding │ ▼ Vector Index │ │ ┌───▼────┐ │ Query │ └───┬────┘ │ ▼ Retrieval │ ▼ Relevant Context │ ▼ LLM │ ▼ Response The model isn't expected to remember everything. The application retrieves relevant information and supplies it as context. If you're building multiple AI features, one of the first reusable platform capabilities should be the vector pipeline: Ingest ↓ Normalize ↓ Chunk ↓ Embed ↓ Index ↓ Retrieve ↓ Rerank / Filter ↓ Generate The specific vector technology can change. For example, depending on the architecture and requirements, this could involve: The important architectural decision is to avoid coupling every AI feature directly to the indexing implementation. Instead: AI Features / | \ / | \ Search Assistant Agent \ | / \ | / ▼ ▼ ▼ Retrieval API │ ▼ Vector Pipeline │ ▼ Domain Data Once retrieval becomes a platform capability, multiple AI features can reuse it. One common mistake is to think of RAG as: Question ↓ Vector search ↓ Top 5 documents ↓ LLM Production systems usually need more controls. The retrieval layer may need to consider: For example: User Query │ ▼ Authorization Context │ ▼ Tenant / Scope Filter │ ▼ Semantic Retrieval │ ▼ Metadata / Permission Filtering │ ▼ Relevant Context │ ▼ LLM This is critical. Retrieving information that the user isn't authorized to access is still a security vulnerability—even if the LLM never intentionally exposes it. Enterprise data changes. A vector index can therefore become stale. Consider: Source updated │ ▼ Database = current │ └──────► Vector index = old The system now has two versions of reality. That's why a production RAG architecture should think about: A useful principle is: The vector index is a derived representation, not the source of truth. That makes lifecycle management much clearer. Once AI workflows become more sophisticated, a single model invocation isn't enough. A real enterprise workflow might look like: Request │ ▼ Authorize │ ▼ Retrieve │ ▼ Enrich │ ▼ Generate │ ▼ Validate │ ▼ Persist │ ▼ Audit This is where orchestration becomes important. For AWS-based architectures, workflow services such as Step Functions can provide explicit state management around multi-step operations. The key architectural idea is: Don't hide a distributed workflow inside one giant prompt or Lambda function. Model the workflow explicitly. Traditional distributed systems already taught us that asynchronous workflows need state. AI workflows need the same discipline. Instead of: AI Request → ??? → Response think: AI Workflow │ ┌──────────────┼──────────────┐ ▼ ▼ ▼ Retrieve Generate Validate │ │ │ └──────────────┼──────────────┘ ▼ Store │ ▼ Audit Each stage should have enough metadata to understand: AI systems need observability at both the application and model layers . Not every request needs the largest or most expensive model. A mature AI platform can route workloads according to their requirements. Request │ ▼ Classify Task │ ┌───────────┼───────────┐ ▼ ▼ ▼ Simple Complex Batch │ │ │ ▼ ▼ ▼ Fast/cheap Capable LLM Offline model model inference This introduces another important architectural metric: Cost per successful business outcome rather than simply: Cost per LLM request. The cheapest model isn't useful if it produces an answer that requires repeated retries or human correction. Not every AI workload is an LLM workflow. Traditional machine-learning workloads still matter. For use cases involving: a platform such as Amazon SageMaker can provide a different execution model. A useful architectural separation is: AI Platform │ ┌────────────┴────────────┐ │ │ ▼ ▼ Generative AI Predictive ML │ │ LLM / RAG / Agents Training / Inference │ │ ▼ ▼ Bedrock / LLM stack SageMaker The goal isn't to force every AI capability through the same technology. Agents introduce a fundamentally different capability. A traditional application does this: User ↓ API ↓ Business Logic ↓ Result An agent can potentially do: User ↓ Agent ↓ Decide next action ↓ Call tool ↓ Observe result ↓ Decide next action ↓ Call another tool ↓ Return result That introduces a new architectural concern: bounded autonomy. An agent should not automatically receive unrestricted access to the platform. Instead, define: What business problem is the agent allowed to solve? Which APIs or actions can it invoke? What can it read? What can it modify? How many actions can it perform? How much can it spend? Which actions require human confirmation? A useful mental model is: ┌───────────────┐ │ Agent │ └───────┬───────┘ │ Policy / IAM │ ┌────────────┼────────────┐ ▼ ▼ ▼ Tool A Tool B Tool C Read Read Write The agent doesn't get "platform access." It gets specific capabilities . For high-impact actions, autonomy shouldn't necessarily mean zero human involvement. Agent proposes action │ ▼ Policy evaluation │ ├── Low risk ──→ Execute │ └── High risk ─→ Human approval │ ▼ Execute The important question isn't: "Can the agent do this automatically?" It's: "What level of autonomy is appropriate for this action?" This is the same risk-based thinking we already use in distributed systems and security architecture. Once an AI system can take actions, logging the final response isn't enough. You need to understand the chain of execution. Request ↓ Agent decision ↓ Tool selected ↓ Tool parameters ↓ Authorization check ↓ Tool result ↓ Next decision ↓ Final action The exact implementation will depend on the platform and privacy requirements, but the architectural principle is straightforward: An action taken by an agent should be as auditable as an action taken by a human or traditional service. This becomes particularly important for regulated or enterprise environments. One of the most dangerous architectural mistakes is treating AI as a separate security domain. Your existing platform may already have: The AI layer should inherit these controls. Consider a multi-tenant SaaS application: User │ ▼ Authentication │ ▼ Tenant Context │ ▼ Authorization │ ┌─────┴─────┐ ▼ ▼ RAG Agent │ │ ▼ ▼ Retrieval Tools │ │ └─────┬─────┘ ▼ Domain APIs The AI system should not create a backdoor around the authorization model. This is especially important for RAG. Tenant isolation must exist in retrieval itself, not merely in the user interface. AI guardrails shouldn't be an afterthought added after the first production incident. They belong in the architecture. Examples include: A useful pipeline looks like: Input ↓ Validate ↓ Authorize ↓ Retrieve ↓ Generate ↓ Validate Output ↓ Business Rules ↓ Persist / Act ↓ Audit The LLM is one component inside the workflow. It shouldn't become the workflow itself. This is perhaps the most important design principle. An LLM should generally reason over authoritative data , not replace it. ┌───────────────┐ │ Source of │ │ Truth │ └───────┬───────┘ │ ▼ AI Context │ ▼ LLM │ ▼ Proposed Answer / Action │ ▼ Domain Validation │ ▼ Platform The model generates a result. The platform determines whether that result is valid. This distinction becomes critical when AI starts taking actions rather than simply answering questions. I use a simple rule when reviewing AI architecture: The AI layer should inherit the trust properties of the core platform. If your platform has strong: then AI should inherit those properties. If those properties are weak, introducing AI doesn't hide the weakness. It can amplify it. An AI system that can access ten times more data or execute ten times more actions can turn a small authorization mistake into a much larger incident. You don't need to build an autonomous agent platform on day one. A pragmatic evolution can look like this: Phase 1 Canonical data + APIs │ ▼ Phase 2 RAG / Retrieval │ ▼ Phase 3 LLM-powered workflows │ ▼ Phase 4 Tool-enabled assistants │ ▼ Phase 5 Bounded agentic workflows │ ▼ Phase 6 Selective autonomous actions Each phase builds on the previous one. This is important because the hardest part of AI adoption isn't usually the model. It's building the platform capabilities around the model . Before investing heavily in autonomous agents, establish the foundations. AI should consume well-defined domain APIs and data products. Build reusable ingestion, chunking, embedding, indexing, retrieval, and authorization capabilities. Centralize model access where practical so applications don't each implement their own: Use explicit workflows for multi-step AI operations. Expose controlled business capabilities as tools rather than giving agents unrestricted database or infrastructure access. Build repeatable evaluation datasets and quality metrics. An AI feature isn't production-ready simply because it works for ten manually tested prompts. You need to know: Does it work? How often does it fail? When does it fail? Which tenants/data types are affected? Did a model or prompt change make it worse? Traditional application metrics aren't enough. An AI-native platform should track several dimensions. The goal is to optimize business outcomes , not simply model metrics. RAG primarily changes how applications retrieve information . LLM orchestration changes how applications coordinate AI-powered workflows . Agents change how applications take actions . That means the risk profile evolves: RAG │ └── Information risk LLM workflows │ └── Information + workflow risk Agents │ └── Information + workflow + action risk The more autonomy you introduce, the stronger your controls need to become. AI-native architecture isn't about putting an LLM at the center of everything. It's about creating a platform where AI capabilities can evolve without bypassing the engineering disciplines that already protect the business . The architecture I want looks like: AI Applications │ ┌──────────────┼──────────────┐ ▼ ▼ ▼ RAG Workflows Agents │ │ │ └──────────────┼──────────────┘ ▼ AI Platform │ ┌─────────────┼─────────────┐ ▼ ▼ ▼ Retrieval Models Tools │ │ │ └─────────────┼─────────────┘ ▼ Core Platform │ ┌────────────────┼────────────────┐ ▼ ▼ ▼ Identity Domain Data Audit │ │ │ └────────────────┼────────────────┘ ▼ Source of Truth The goal isn't to make the platform "AI-powered." The goal is to make AI a first-class capability of the platform without making it a special exception to the platform's rules . That's the difference between adding AI features and building an AI-native platform . AI should inherit your platform's trust model—not replace it.