AWS Agentic AI Architecture – Bedrock Agents, MCP & Multi-Agent Patterns

AWS Agentic AI Architecture — Overview

Agentic AI is the fastest-growing topic on the AIP-C01 exam (Domain 2: 26%). Agents extend foundation models with the ability to reason, plan, use tools, and take actions autonomously. This post covers Bedrock Agents, Strands Agents SDK, Model Context Protocol (MCP), and multi-agent orchestration patterns.

Agentic AI — Architecture Patterns
User Request
Agent (Reasoning Loop — ReAct Pattern)
Think
Analyze task
Plan steps
Select tools
Act
Call tool/API
Execute action
Get result
Observe
Process result
Update plan
Decide next step
Respond
Final answer
Or loop back
to Think
↓ Tool Calls ↓
Knowledge Bases
(RAG retrieval)
Action Groups
(Lambda functions)
MCP Servers
(External tools)
Code Interpreter
(Python sandbox)
Other Agents
(Multi-agent)
Bedrock Agents
Managed, no-code/low-code
Built-in session memory
OpenAPI action groups
Strands Agents SDK
Code-first (Python)
Full control
Custom orchestration
AWS Agent Squad
Multi-agent coordination
Specialist routing
Hierarchical teams

Bedrock Agents vs Strands Agents SDK

Feature Bedrock Agents Strands Agents SDK
Approach Managed service (console/API configuration) Open-source Python SDK (code-first)
Tool definition OpenAPI schema → Lambda Action Groups Python decorators (@tool) or MCP servers
Memory Built-in session memory (DynamoDB) Custom memory (you implement)
Knowledge Base Native integration (attach KB to agent) Use as MCP server or direct API call
Multi-agent Agent collaboration (supervisor + sub-agents) AWS Agent Squad for multi-agent orchestration
Guardrails Native Bedrock Guardrails integration Custom middleware or Bedrock Guardrails API
Best for Quick deployment, managed infrastructure, enterprise Full control, custom logic, complex orchestration

Model Context Protocol (MCP)

  • What: Open standard for connecting AI agents to external tools and data sources. Defines a client-server protocol for tool discovery, invocation, and resource access.
  • MCP Server: Exposes tools (functions), resources (data), and prompts. Runs as a separate process (Lambda, ECS, local).
  • MCP Client: The agent runtime that discovers and calls MCP servers. Strands SDK has built-in MCP client support.
  • Why it matters: Write a tool once → any MCP-compatible agent can use it. Separates tool logic from agent logic.
  • AWS deployment: Stateless MCP servers → Lambda. Stateful MCP servers → ECS/Fargate. Complex tools → ECS with persistent connections.

Action Groups (Bedrock Agents)

  • Definition: OpenAPI schema (JSON/YAML) describing available actions, parameters, and responses
  • Execution: Lambda function receives the agent’s action request, executes logic, returns result
  • Return of Control: Alternative to Lambda — agent returns action to your application, you execute and return result (for client-side execution)
  • User Confirmation: Agent can pause and ask user for confirmation before executing destructive actions

Multi-Agent Patterns

Pattern How Use Case
Supervisor + Specialists Supervisor agent routes tasks to specialist agents (coding, research, analysis) Complex tasks requiring different expertise
Sequential Pipeline Agent A output → Agent B input → Agent C (chain) Document processing: extract → analyze → summarize
Parallel Execution Multiple agents process simultaneously, results aggregated Research across multiple data sources simultaneously
Debate/Consensus Multiple agents propose solutions, debate, reach consensus Decision-making, code review, quality assurance

Safety & Control Mechanisms

  • Stopping conditions: Max iterations, max tokens, timeout (prevent infinite loops)
  • Resource boundaries: IAM policies on Lambda, scoped API access, no internet unless needed
  • Circuit breakers: Step Functions patterns — if tool fails N times, degrade gracefully
  • Human-in-the-loop: Pause agent for approval on critical actions (financial transactions, deletions)
  • Guardrails: Apply to both input AND output of each agent step (not just final response)
  • Tracing: Bedrock agent trace shows reasoning steps — essential for debugging and auditing

Exam Tips

Exam Key Points
AIP-C01 “Agent takes actions autonomously” → Bedrock Agents or Strands SDK. “Connect to external tools” → MCP servers or Action Groups (Lambda). “Multi-agent coordination” → AWS Agent Squad. “Agent reasoning trace” → Bedrock agent tracing. “Prevent infinite loops” → stopping conditions (max iterations, timeout). “Agent needs database access” → Action Group with Lambda. “Standardized tool interface” → MCP. “Code-first agent with full control” → Strands Agents SDK.

AWS Certification Exam Practice Questions

Question 1:

A company wants to build an AI agent that can search their knowledge base, query a database, and create tickets in Jira. The agent should reason about which tools to use based on the user’s request. They want a managed solution with minimal infrastructure. Which approach fits?

  1. Step Functions orchestrating Lambda functions with if/else logic for each tool
  2. Bedrock Agent with Knowledge Base attached + Action Groups for database query and Jira API (Lambda-backed)
  3. Single Lambda function with hardcoded logic to call each service sequentially
  4. SageMaker endpoint hosting a custom model with tool-use training
Show Answer

Answer: B — Bedrock Agents provide the managed reasoning loop (ReAct pattern). The agent autonomously decides which tools to use: Knowledge Base for retrieval, Action Groups (Lambda) for database queries and Jira API calls. No hardcoded orchestration logic needed — the FM reasons about tool selection. Step Functions (A) requires you to predefine the flow (not autonomous). Single Lambda (C) is hardcoded, not reasoning-based.

Question 2:

A development team is building an agent using the Strands Agents SDK. They have existing tools written as REST APIs. They want any future agent to reuse these tools without modification. Which integration approach provides this portability?

  1. Write custom Python wrapper functions for each REST API
  2. Deploy each REST API as an MCP server, use the MCP client in Strands to discover and call tools
  3. Create OpenAPI schemas and use Bedrock Agent Action Groups
  4. Package tools as Lambda layers shared across functions
Show Answer

Answer: B — MCP (Model Context Protocol) is the open standard for agent-tool communication. Deploy each tool as an MCP server → any MCP-compatible agent can discover and use it without modification. This provides portability across agent frameworks. Custom wrappers (A) are agent-specific. Bedrock Action Groups (C) are Bedrock-specific, not portable to Strands. MCP is the interoperability standard.

Question 3:

An agent occasionally enters infinite reasoning loops when faced with ambiguous queries, causing high token costs. What combination of controls prevents this while allowing the agent to complete complex tasks?

  1. Set maximum token output to 100 tokens per response
  2. Configure max iterations (e.g., 10 reasoning steps), a timeout (e.g., 60 seconds), and a circuit breaker that escalates to human after 3 consecutive tool failures
  3. Remove complex tools so the agent can only do simple tasks
  4. Use a smaller, cheaper model that responds faster
Show Answer

Answer: B — Defense in depth: max iterations prevents infinite loops (hard stop after N steps). Timeout prevents runaway execution time. Circuit breaker detects repeated failures and escalates gracefully instead of continuing to fail. These controls allow complex tasks (many steps needed) while preventing runaway scenarios. Token limits (A) would cut off responses mid-sentence. Simpler models (D) may increase loops (less capable reasoning).

Question 4:

A company needs multiple specialized AI agents: one for customer support, one for technical documentation, and one for billing inquiries. When a user’s request doesn’t clearly fit one specialist, a coordinator should route it. Which architecture provides this?

  1. Single Bedrock Agent with three action groups
  2. AWS Agent Squad with a supervisor agent that classifies intent and routes to specialist agents
  3. API Gateway with Lambda routing based on keywords
  4. Three separate chatbots with manual user selection
Show Answer

Answer: B — AWS Agent Squad implements the supervisor + specialist pattern. The supervisor agent uses an FM to understand the user’s intent and dynamically routes to the appropriate specialist agent. Each specialist has domain-specific tools and knowledge bases. Ambiguous requests can be handled by the supervisor asking clarifying questions. Single agent with three action groups (A) works but doesn’t scale well as domains grow and gets complex system prompts.

Question 5:

A Bedrock Agent needs to execute a financial transfer when the user confirms. Before execution, the agent must show the transfer details and get explicit user approval. Which Bedrock Agent feature enables this?

  1. Guardrails with content filtering on financial amounts
  2. User confirmation configuration on the Action Group — agent pauses and requests confirmation before executing the Lambda
  3. Step Functions human approval task before the agent starts
  4. Return of Control — agent sends details back to application, application shows UI confirmation, then returns approval
Show Answer

Answer: D — Return of Control is the Bedrock Agent feature for human-in-the-loop. The agent decides to execute a tool, but instead of calling Lambda directly, it returns the action details to your application. Your application shows a confirmation UI. User approves → application sends confirmation back → agent proceeds. This provides full application-level control over critical actions. User confirmation (B) is a simpler built-in prompt-based confirmation within the chat, not a UI flow.

Related Posts

References

Frequently Asked Questions

What is MCP and why does it matter for agents?

Model Context Protocol (MCP) is an open standard defining how AI agents communicate with external tools. An MCP server exposes tools (functions) with typed schemas. Any MCP client (agent) can discover and call them. Benefits: write a tool once, use from any agent framework. Decouple tool development from agent development. AWS supports MCP in Strands SDK and Bedrock Agents.

Bedrock Agents vs Strands SDK — when to use which?

Use Bedrock Agents when you want managed infrastructure, built-in session memory, and quick setup (console or API). Use Strands Agents SDK when you need full Python code control, custom orchestration logic, or plan to use MCP extensively. Both can use the same foundation models. Strands is more flexible; Bedrock Agents is faster to deploy.

How do I prevent agents from taking harmful actions?

Multiple layers: (1) IAM policies on Lambda/tools — agent can only access scoped resources. (2) Guardrails — filter both input and output at each step. (3) Stopping conditions — max iterations, timeout. (4) Human-in-the-loop — Return of Control for critical actions. (5) Action validation — Lambda validates parameters before execution. (6) Tracing — audit reasoning steps for review.

Posted in Uncategorised

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.