← Back to writing

Technical excellence

Enterprise AI Agent Architecture: The Layers That Matter

Enterprise AI agent architecture is the set of layers around the model that make an agent safe to run on real systems. Two AWS reference architectures from November 2026 agree on the shape. Here is my plain map, and what a mid-size firm needs on day one.

Fakhar Khan 11 min read

Enterprise AI agent architecture is the set of layers around the model that make an agent safe to run on real systems: identity at the front door, scoped agents, a gateway in front of every tool call, knowledge and memory, model routing, approval gates, and tracing with ongoing evaluation. In one week this November, AWS published two reference architectures that land on the same shape.

Picture the meeting. Your agent pilot works. It answered the test questions, it pulled the right order, it drafted a decent refund note. Someone from operations leans back and asks the question that ends most pilots: "So can we turn it on for customers on Monday?"

The honest answer is usually "not yet," and the reason is almost never the model.

I've written before about what production AI systems need that demos don't. This piece is narrower. It's about agents specifically, and about the layer map you can draw on a whiteboard before anyone writes the next line of code.

Why architecture, not the model, decides whether an agent ships

Here's what happened in one week.

On November 9, the AWS Machine Learning Blog published the Pluggable Agentic AI Framework, a reference architecture "organized into seven layers, each with a distinct responsibility and a stable contract." Three days later, the AWS Architecture Blog published a separate post, Inside an enterprise AI agent: A governed, observable loop architecture, which cuts the same kind of system into five layers.

Those are two different posts with two different layer counts. They are AWS reference architectures, not an industry standard, and I'm not going to pretend they are one framework.

The same week at KubeCon North America, Solo.io announced general availability of enterprise releases of Agent Substrate and kagent, where each agent session runs with a sandbox that isolates execution and a gateway that governs who can reach it and what it can touch. Mirantis announced its Agent Platform, a self-hosted environment for running agents on Kubernetes that the company describes with policy-based governance, sandboxed isolation, spend caps, audit trails, and human-approved remediation.

Four vendors, four products, one picture. Scoped agents. A checkpoint in front of every tool. Isolation. Tracing. A person in the loop for the actions that matter.

When the cloud vendors and the Kubernetes vendors start drawing the same diagram, that's your signal. The diagram is the product now.

The layers, in plain terms

So which picture do you use, seven layers or five?

Neither, exactly. Both AWS posts slice the same system in different places. Below is my own merged map. It is my synthesis for a mid-size team, not AWS's, and you won't find this exact table in either post.

Layer Its job What breaks if it's missing
Entry, identity and policy Know who the agent is acting for and what that person may do The agent acts with its own broad power, not the user's
Orchestration and scoped agents Route work to one narrow agent or a supervisor with specialists One agent grows slow, confused, and hard to secure
Tools behind a gateway One checkpoint for every tool call: allowed, valid, in budget, logged Agents reach systems directly with standing credentials
Knowledge and memory Retrieval and state the agent can use, with access rules intact The agent sees data the user shouldn't, or forgets context
Models behind a router Choose the model by configuration, not by code changes Every model swap becomes a rewrite
Trust gates and approvals Guardrails, evaluations, confidence checks, human sign-off Risky actions run with nobody looking
Observability and evaluation Step-level traces, cost per request, regression tests on behavior You can't explain what happened, or prove a change didn't break it

Let me walk through them the way I'd explain it across a table.

Entry, identity and policy

Everything starts at the front door. Before an agent does anything, the system should know which user, which tenant, and which permissions it carries. The AWS seven-layer post says to authenticate every request and apply fine-grained access control before each tool call, using temporary, scoped credentials.

This is the layer people skip because the pilot only had one user: the developer.

Orchestration: one agent or a supervisor with specialists

For a simple, narrow task, one agent is fine. For anything that crosses teams or systems, AWS recommends a supervisor that delegates to specialists, each "tied to a specific set of tools." The line I'd put on the wall is theirs: "Avoid building one agent that does everything." As tools and instructions pile up, AWS notes, the context grows and latency rises.

Their reference example is retail support. A supervisor hands order questions to an Order agent and refunds to a Refund agent. Each one can only do its own job. AWS calls this bounded autonomy: "specialists should execute strictly within the tools they have been granted, and nothing more."

Tools behind a gateway

This is the layer I'd fight hardest for. Every tool call passes through one checkpoint that asks four questions. Who is this for? Is this tool allowed? Are the inputs valid? Is it within budget? Then it logs the answer.

The protocols matter here. MCP is how many agents now discover and call tools, and I've written a practical guide to the Model Context Protocol if you want the mechanics. AWS's seven-layer post also describes a central registry of tools, skills, and owners, with discovery through MCP or A2A. The protocol is the plug. The gateway is the guard standing next to it.

I won't repeat the permissions argument here. If you want the full case for scoped credentials and least privilege, read why AI agents need least-privilege permissions. And treat anything the agent reads from outside as untrusted, as both AWS and the OWASP Top 10 for LLM Applications warn.

Knowledge, memory and model routing

Retrieval has to respect the same access rules as the rest of your systems. If a user can't open a document in your drive, the agent acting for them shouldn't quote it.

On models, AWS's seven-layer post drives model choice through configuration with a routing layer, and names LiteLLM as an example proxy. The point isn't the tool. The point is that next quarter's better or cheaper model should be a config change, not a project.

Trust gates: guardrails, evaluations, confidence, human approval

Here's the part the demo never shows.

The five-layer AWS post defines four trust gates: guardrails, evaluations, confidence scoring, and human approval. It also sorts actions by risk. Responding is low. Writing to a system is medium, with a policy gate and logging. Triggering a workflow is high and needs human approval. Escalating to a person is the path when the agent isn't sure.

That tiering is the most useful thing in either post for a team like yours. It turns "should the agent be allowed to do that?" from an argument into a table.

Observability and continuous evaluation

If you can't trace it, you can't trust it. AWS's seven-layer post calls for observability from day one, with traces plus cost and token usage per request, and continuous evaluation with a regression gate. In plain terms: you keep a set of test conversations, and no change ships if the agent gets worse on them.

Three mistakes I see in pilots

The five-layer AWS post names its anti-patterns directly, and three of them match what I'd warn any team about.

The monolithic agent. One agent with every tool and every instruction. It works in the demo because the demo is short.

The unbounded loop. An agent that keeps retrying, reasoning in circles, and spending tokens. AWS's fix is a hard ceiling: "A common production setting is 3 to 5 iterations against a total token budget." Past that, the agent summarizes where it got to and asks the user or escalates.

Trust-later architecture. This is the one that hurts. AWS puts it plainly: governance, guardrails, and observability "must be primitives from day one," because bolting them onto an agent already in production "costs more and introduces more defects."

Have you seen that last one? I'd bet you have. It's the plan that says "we'll add logging after launch."

What a mid-size firm needs on day one, and what can wait

You don't have an AWS-sized platform team. You don't need one. AWS itself says the services in its reference implementation are "not mandatory choices," and that the sample "is not a substitute for production security hardening, testing, and review."

So here's my judgment on what's non-negotiable and what can start light. This is my opinion, not a source claim.

Day one, no exceptions:

  • Identity on every request, so the agent acts as a known user with that user's rights.
  • A tool gateway with scoped, short-lived credentials. No shared admin keys.
  • Step-level tracing, so you can replay what the agent did and why.
  • Human approval for anything that writes, sends, pays, or deletes.
  • Loop caps and a token budget, with a clean handoff to a person when the cap hits.

Can start light and grow:

  • A formal agent registry. A well-kept list works until you have more than a handful of agents.
  • Multi-model routing. Start with one model behind a thin config switch.
  • A full evaluation pipeline. Start with a small set of real test conversations and run it before every change.

AWS describes a pattern called graduated autonomy: start agents read-only and widen write access "a step at a time as they earn trust." That's the right posture for a first production agent. Let it answer before you let it act.

Where the runtime lives: cloud, Kubernetes, or n8n

The layers don't care where they run. You can build them on AWS with Bedrock AgentCore, which is what the AWS posts show. You can run them on Kubernetes, which is the bet Solo.io and Mirantis made this month. Or you can cover them in a smaller stack, as long as each layer's job has an owner.

At Soft Pyramid we also build agents on n8n, through our n8n AI agent development work, and the same map applies there.

FAQ

What is an enterprise AI agent architecture? It is the set of layers around a language model that let an agent act on real systems safely: identity and policy at the entry point, scoped agents, a gateway in front of tools, knowledge and memory, model routing, approval gates, and tracing with ongoing evaluation.

Should I build one agent or several? Start with one agent for a simple, narrow task. For complex or cross-team work, AWS recommends a supervisor that delegates to specialist agents, each limited to its own tools. One agent that does everything tends to get slower, less accurate, and harder to secure as tools and context pile up.

What is a tool gateway for AI agents? A tool gateway is the single checkpoint every tool call passes through. It checks who the agent is acting for, whether that tool is allowed, whether the inputs are valid, and whether the call fits the budget, then logs it. It keeps agents from reaching systems directly with broad credentials.

How do you stop an AI agent from looping forever? Cap the loop. AWS describes a common production setting of 3 to 5 iterations against a total token budget. When the agent hits the cap, it should summarize its progress and either ask the user or escalate to a person instead of retrying.

Do I need AWS or Kubernetes to follow this architecture? No. AWS says the services in its reference implementation are not mandatory choices. The layers are a design pattern. Teams can apply them on AWS, on Kubernetes platforms such as those Solo.io and Mirantis released in November 2026, or in a smaller stack, as long as each layer's job is covered.

Key takeaways

  • The model is the easy part. Whether an agent ships depends on the layers around it.
  • Two AWS reference architectures from November 2026, one with seven layers and one with five, agree on the shape: scoped agents, a gateway in front of tools, trust gates, and tracing from day one.
  • For a mid-size firm, identity, the tool gateway, tracing, human approval for writes, and loop caps are the day-one minimum. The rest can grow with you. The same map sits under how Soft Pyramid approaches agentic AI development.

So back to that meeting. When someone asks whether the agent can go live on Monday, you don't have to answer with a feeling. Put the seven rows on the whiteboard and check them off together.

Fakhar Khan

Fakhar Khan

Founder & CEO, Soft Pyramid LLC

If this is the problem you are staring at, let's talk about it.

Architecture, AI operations, and delivery for US small and mid-size companies — outcomes first.