---
title: "Inside an enterprise AI agent: A governed, observable loop architecture"
description: "A reference architecture for enterprise AI agents on AWS organizes the system into five layers: an API gateway enforcing identity and policy, a five-phase agent runtime (Understand, Plan, Retrieve, Reason, Act and Observe), a knowledge and state tier, platform services for models and tools, and a cross-cutting trust and control framework."
url: "https://swe.quest/articles/inside-an-enterprise-ai-agent-a-governed-observable-loop-architecture-3ec28e31cea77465"
canonical: "https://aws.amazon.com/blogs/architecture/inside-an-enterprise-ai-agent-a-governed-observable-loop-architecture/"
source: "AWS Architecture Blog"
published: "2026-11-12"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 20
tags: ["ai-agents","system-design","cloud","rag","observability"]
---

# Inside an enterprise AI agent: A governed, observable loop architecture

A post on [AWS Architecture Blog](https://swe.quest/sources/aws-architecture.md), published 2026-11-12, 20 min read, Deep dive. Original: [https://aws.amazon.com/blogs/architecture/inside-an-enterprise-ai-agent-a-governed-observable-loop-architecture/](https://aws.amazon.com/blogs/architecture/inside-an-enterprise-ai-agent-a-governed-observable-loop-architecture/)

## Summary

A reference architecture for enterprise AI agents on AWS organizes the system into five layers: an API gateway enforcing identity and policy, a five-phase agent runtime (Understand, Plan, Retrieve, Reason, Act and Observe), a knowledge and state tier, platform services for models and tools, and a cross-cutting trust and control framework. Each layer maps to AWS services such as API Gateway, Cognito, Bedrock, Bedrock Knowledge Bases, OpenSearch Serverless, DynamoDB and ElastiCache. Design principles drawn from the Well-Architected Generative AI Lens include zero trust, defense in depth, observable-by-default step tracing and fail-safe escalation to humans. Tool calls pass through a policy gateway, and the RAG pipeline runs query rewriting, ANN search, reranking and access filtering.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)

## Prerequisites

- LLM basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Retrieval-augmented generation
- AWS core services ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- OAuth 2.0/OIDC ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Amazon Bedrock, Amazon Bedrock Guardrails, Amazon Bedrock Knowledge Bases, Amazon API Gateway, Amazon Cognito, Amazon OpenSearch Serverless, ReAct, AWS Well-Architected Generative AI Lens

## Related posts

- [How to Secure AI Agents: A Practical Overview for Development Teams](https://swe.quest/articles/how-to-secure-ai-agents-a-practical-overview-for-development-teams-8ef3e4fd91efa459.md): Docker · 2026-06-02 · Easy · 9 min read · AI agents, Sandboxing & isolation, Identity & auth, Security, Observability
  AI agents need a different security model than traditional services because they select tools, chain actions and act on credentials autonomously, widening the blast radius of prompt injection or tool poisoning.
- [The Trust Layer: Securing Agentic AI with Docker AI Governance](https://swe.quest/articles/the-trust-layer-securing-agentic-ai-with-docker-ai-governance-9c89f9faf160a05d.md): Docker · 2026-11-18 · Easy · 8 min read · AI agents, Sandboxing & isolation, Identity & auth, Supply chain security, Security
  Docker AI Governance secures AI agents by enforcing controls around their runtime rather than trusting model behavior, across three layers: Sandbox Policies, MCP Tool Governance, and Audit + Visibility.
- [A new security baseline for enterprise agentic adoption](https://swe.quest/articles/a-new-security-baseline-for-enterprise-agentic-adoption-e01702f9b0769350.md): Docker · 2026-08-12 · Easy · 5 min read · AI agents, Security, Identity & auth, Sandboxing & isolation
  Agent Baseline, an open v1.0 draft from Docker, Snyk and Keycard, defines 35 controls across six security outcomes for enterprise AI agents: Discover, Constrain, Authorize, Observe, Validate and Respond.
- [17,600 Actions: Agent Security Is a Systems Problem](https://swe.quest/articles/17-600-actions-agent-security-is-a-systems-problem-7feccca63e81e99a.md): Docker · 2026-08-18 · Medium · 11 min read · AI agents, Sandboxing & isolation, Identity & auth, Supply chain security, AI safety
  The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review).
- [The five components of building a "company harness"](https://swe.quest/articles/the-five-components-of-building-a-company-harness-32441ca325d05592.md): LangChain · 2026-11-17 · Easy · 5 min read · AI agents, Identity & auth, Sandboxing & isolation
  Internal company agents at LangChain (GTM Agent, OpenSWE, Content Studio) converge on five primitives for a multiplayer "company harness": living in Slack (with thread breakouts and a custom UI for backlogs), identity handled per tool as either on-behalf-of the user or fixed service credentials, two-tier global and per-user memory, sandboxed code execution with a secret proxy for authenticated requests, and scheduled or event-triggered runs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
