Sequence diagrams · GenAI and agentic AI, input to output

How GenAI and agentic AI requests move through a system

Nine production patterns, each as a clickable sequence diagram. Pick a pattern, then click any step to see what happens, what it protects against, and what happens when it fails. Purple steps are where a human approves, confirms, takes over or reviews. Switch the view to AWS, Google Cloud or Azure to see the services behind each step.

Pick a pattern

Model step Human in the loop Safety control Data / action Click any step, or use ← → keys

Failure paths

Pattern map

Same building blocks every time: input checks, context, a model, tools, output checks, feedback. What changes is who controls the flow and where the human sits.

PatternWho controls the flowMain riskKey controlWhere the human sitsSeen in

Which RAG? Steps 5–6 of the assistant pattern

The bill-pay example uses Hybrid + rerank for policy documents, plus a memory lookup. The live balance is not RAG: it comes from a tool call in steps 11–12. Pick a type to see how steps 5–6 change.

Human in the loop: four ways people stay in control

Every pattern keeps a person on the steps where a mistake is expensive or irreversible. Purple arrows in the diagrams mark these steps.

Approve before acting

The agent pauses and shows the exact action. Nothing runs until the person confirms. Bill pay, purchases, risky shell commands.

Clarify or take over

The person sets scope up front, or takes control mid-task: CAPTCHA and logins in a browser, a human agent on a hard call.

Review exceptions

Automation handles the confident cases; people see only what is uncertain or breaks a rule. Invoices, low-confidence form fields.

Final sign-off

A person reviews before anything ships: PR review and merge, advisor approval, legal review of ads.

Same flow on AWS, Google Cloud and Azure

The building blocks match across clouds. Use the view switch above the diagram to see each cloud's service on every lane and step. Google renamed Vertex AI to Gemini Enterprise Agent Platform in 2026, and Azure AI Foundry is now Microsoft Foundry; the page uses the current names.

Building blockAWSGoogle CloudAzure

On AWS: where Bedrock and SageMaker sit

Every pattern above runs on the same AWS building blocks. Amazon Bedrock is where you use models and managed agent parts. Amazon SageMaker AI is where you build, tune and host your own models. Switch the diagram view to AWS to see the service behind each lane and step.

Use models · serverless API Amazon Bedrock

Foundation models (Claude, Llama, Mistral, Amazon Nova and more) behind one API, plus managed building blocks.

  • Converse API: model calls with tool use, streaming, prompt caching, Intelligent Prompt Routing, batch inference
  • Knowledge Bases: managed RAG (chunk, embed, hybrid search, rerank, GraphRAG, text-to-SQL)
  • Guardrails: prompt-attack, content and PII filters, contextual grounding check, Automated Reasoning checks
  • AgentCore (any framework, e.g. LangGraph, LangChain, CrewAI, Strands; any model, in or outside Bedrock): managed harness, Runtime, Gateway (tools as MCP), Identity, Memory, Policy, Code Interpreter, Browser, Observability. Bedrock Agents is now “Agents Classic”, closed to new customers
  • Data Automation, Nova 2 Sonic, Stability AI models: documents, speech-to-speech, image generation
  • Evaluations, customization: LLM-as-judge and RAG evals, fine-tuning, distillation, Custom Model Import
Build and run your own models Amazon SageMaker AI

Train, fine-tune, evaluate, host and monitor models you control: open-weight, fine-tuned or fully custom.

  • JumpStart + endpoints: deploy open models; real-time, async and serverless inference on chosen instances
  • Training jobs + HyperPod: fine-tuning to large-scale training
  • Pipelines, Model Registry, managed MLflow: retrain-and-release loop
  • Ground Truth, Clarify, Model Monitor, A2I: labeling, evals, drift alerts, human review. In maintenance mode since Jul 30, 2026: existing customers only, no new features

Rule of thumb: start on Bedrock. Move one step to SageMaker AI when you need custom weights, a model Bedrock doesn't host, specific hardware or latency, or full control of serving. Small custom models (injection classifier, reranker, embeddings) are the usual first SageMaker endpoints.

Step in the flowAmazon BedrockAmazon SageMaker AIAround them

The one line for interviews

“The model proposes. The orchestrator disposes. Every tool call passes a policy check, runs with the user's scoped credentials, needs human approval for irreversible actions, and gets a grounding check on the way out.”

What changed