Agentic AI Architecture
A layered blueprint for agents that plan, use tools, remember context, enforce policy, and safely execute work — with reference flows for commerce, healthcare drug e-commerce, and multi-agent orchestration.
Four layers, top to bottom
Every agentic system is a stack: an experience surface on top, reasoning beneath it, tools under that, and a control plane that governs all of it. The control layer is where safety lives — identity, policy, approval, and rollback.
Three flows through the stack
The same layered blueprint, walked end to end for three real scenarios. Amber nodes are the deterministic control checkpoints — the agent can only propose; policy and humans decide what executes.
E-commerce shopping agent
A controlled shopping agent should search, compare, build a cart, and ask for approval — never silently execute risky actions.
Customer intent
Natural language goal, budget, constraints, loyalty context, and consent scope.
Planner
Breaks the shopping goal into search, compare, promotion, cart, and approval steps.
Tool gateway
Calls catalog, inventory, pricing, promotions, reviews, cart, and checkout APIs.
Policy guard
Checks substitution limits, payment authorization, return rules, and brand policy.
Human approval
Shows final cart, trade-offs, price, delivery promise, and asks before purchase.
Healthcare drug e-commerce agent
Drug commerce agents need identity, consent, clinical routing, pharmacist escalation, and stronger audit than general retail.
Patient request
Refill, OTC product question, order status, copay issue, or delivery exception.
Identity & consent
Verifies user, permission scope, prescription ownership, and communication channel.
Clinical policy router
Separates safe commerce tasks from pharmacist, prescriber, or payer-required actions.
Pharmacy tools
Checks Rx status, formulary, inventory, interactions, delivery windows, and copay.
Escalation or action
Submits eligible refill, routes prior auth packet, or escalates clinical decisions.
Multi-agent orchestration
Use a supervisor agent when specialists must coordinate across search, service, merchandising, fulfillment, and compliance.
Supervisor agent
Owns goal state, risk score, task decomposition, and final response assembly.
Specialist agents
Search, merchandising, service, fulfillment, compliance, and analytics agents.
Shared memory
Stores session state, user preferences, retrieved facts, tool results, and audit log.
Evaluation loop
Scores accuracy, policy compliance, tool success, latency, cost, and override rate.
Controlled execution
Runs approved writes through permissions, idempotency, rollback, and monitoring.
Implementation examples
Use these to decide which tools, policies, and approval gates belong in the first implementation slice.
Commerce · gift basket agent
- 01User asks for a birthday gift basket under $120 delivered by Friday.
- 02Planner searches products, checks inventory by ZIP code, applies promo and delivery constraints.
- 03Guardrail blocks unavailable substitutions and requires approval before checkout.
- 04Agent presents two baskets, trade-offs, final price, and asks whether to place the order.
Drug commerce · refill & delivery agent
- 01Patient asks to refill a maintenance medication and ship it before travel.
- 02Agent verifies identity, prescription ownership, refill eligibility, copay, and inventory.
- 03If refill is valid, agent prepares the order; if prior authorization is missing, it routes the packet.
- 04Pharmacist review is required for substitutions, interaction concerns, or clinical ambiguity.
Operations · fulfillment exception agent
- 01Carrier event indicates delivery risk for a temperature-sensitive product.
- 02Agent checks shipment status, temperature data, replacement policy, and inventory.
- 03It drafts customer notification and escalation summary for operations approval.
- 04Approved action triggers replacement, refund, or pharmacist/customer outreach.
Start read-only, add writes last
Begin with read-only recommendations, then add approved writes, then automate low-risk actions. For healthcare drug commerce, keep pharmacist, prescriber, or payer checkpoints in place for regulated decisions.
Deeper architecture reading
Useful for deeper choices around patterns, memory, tools, multi-agent coordination, governance, and platform options.
Agentic AI architecture guides
Architecture guide index covering component selection, design patterns, and reference architectures for agentic AI systems.
Choose your agentic AI architecture components
Useful breakdown of agent frameworks, memory, tool integration, deployment, and architecture trade-offs.
Multi-agent reference architecture
Reference design for orchestrators, registries, memory, knowledge bases, MCP/tool integration, observability, and governance.
Agentic AI frameworks, platforms, protocols, and tools on AWS
Framework and platform guide for autonomous agents that reason over goals and integrate with enterprise tools.
What is agentic AI?
Concise explainer for perceive, reason, act, and reflect loops in agentic systems.