Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

1.3.2. AI Agents and Agentic Loops

💡 First Principle: An AI agent uses an FM as its reasoning engine but augments it with the ability to call external tools — APIs, databases, code interpreters — and use the results to inform subsequent reasoning steps. The FM doesn't just generate text; it generates decisions about what to do next.

Without agents, FMs are passive: you give them input, they give you output, and nothing changes in the external world. Agents break that limitation. An agent can look up your current order status, book a meeting, write and execute code, or trigger a deployment pipeline — all through an FM reasoning about which tool to call and with what parameters.

The ReAct reasoning loop:

Amazon Bedrock Agents manages this loop automatically — it handles session state, tool selection, error recovery, and response synthesis. AWS Strands Agents (open-source, announced 2025) provides a code-first framework for building agents with greater customization. AWS Agent Squad enables multi-agent coordination where a supervisor agent delegates to specialist sub-agents.

When to use agents vs. RAG:
ScenarioPatternWhy
"Answer questions about our documentation"RAGPassive retrieval only; no action needed
"Book a meeting based on calendar availability"AgentMust take action in external system
"Summarize this uploaded PDF"RAG (or simple FM call)Single-step, no tool use
"Research competitors, draft a report, email it"Agent (multi-step)Multi-step task requiring multiple tool calls
"Answer questions and update CRM with customer sentiment"Agent + RAGBoth retrieval and action required

⚠️ Exam Trap: Agents add latency, complexity, and failure surface area. The exam tests whether you recognize when NOT to use agents — a simple Q&A use case implemented as an agent introduces unnecessary overhead. Choose the simplest architecture that meets requirements.

Reflection Question: A team proposes using a Bedrock Agent to handle a use case where users upload a document and ask questions about it. No external API calls are needed. Would you approve this architecture? What would you propose instead, and why?

Alvin Varughese
Written byAlvin Varughese
Founder15 professional certifications