Implementation and Integration · Topic 1 of 8

Agents, Memory, Tools and MCP Servers

Build agents with Strands Agents, AWS Agent Squad and Bedrock AgentCore, give them memory and tools, and host MCP servers on Lambda or Amazon ECS.

  • 6 min
  • Includes a diagram
In a nutshell
  • Strands Agents is an open source, model driven SDK; tools come from decorated functions, and it supports agents as tools, swarm, graph and workflow patterns.
  • AWS Agent Squad routes each turn to one specialized agent through a classifier and keeps conversation context.
  • AgentCore hosts and operates agents from any framework: Runtime, Memory, Gateway, Identity and Observability.

What it is

An agent is an FM in a loop. The model reads the goal, decides which tool to call, reads the tool result and repeats until it can answer.

The exam tests the framework that runs the loop, the memory that keeps state, the tools the model calls, and the Model Context Protocol (MCP) that standardizes tool access.

UsergoalrequestAgent loopFM plans next steptool callToolLambda, API, MCP serverresultAgent loopfinal answerUser

How it works

Agent frameworks on AWS

OptionWhat it isPick it when
Amazon Bedrock AgentsManaged agent with action groups, knowledge bases and session memoryYou want a fully managed agent configured in Bedrock with little code
Strands AgentsOpen source SDK from AWS (Python and TypeScript), model driven agent loopYou want code first control over prompts, tools, hooks and multi agent patterns
AWS Agent SquadOpen source framework (formerly Multi-Agent Orchestrator) with a classifier that routes each turn to the best specialized agentMany specialized agents behind one entry point, with shared conversation context
Amazon Bedrock AgentCoreManaged services to run and operate agents built with any framework: Runtime, Memory, Gateway, Identity, Observability, plus Code Interpreter and Browser toolsYou built the agent in Strands or another framework and need secure, scalable hosting

Strands Agents supports several multi agent patterns: agents as tools, swarm, graph and workflow. In agents as tools, an orchestrator agent calls specialist agents the same way it calls any other tool.

Agent Squad's classifier reads the user input, agent descriptions and conversation history, then sends the turn to one agent. A SupervisorAgent can coordinate a team of agents in parallel and combine their answers.

Memory and state

An FM is stateless, so every call must carry its context. Agents split memory into layers.

  • Short term memory is the conversation history of the current session. Strands manages it with conversation managers that trim or summarize old turns so the context window does not overflow.
  • Long term memory stores facts, preferences and summaries across sessions. AgentCore Memory provides both short term and long term memory as a managed service.
  • Session state such as a shopping cart belongs in an external store like DynamoDB, keyed by session ID, so any instance can resume it.
Exam tip

When a scenario says the agent "forgets earlier turns after a restart" or "must remember user preferences next week", the answer is persistent memory outside the compute, not a bigger context window.

Tool integration

Tool call loop: the model sees only the tool definition (name, description, JSON input schema), sends a toolUse with parameters to a Lambda handler that validates them and checks business rules, gets back a result or a structured error it can correct, then answers the user. A tool is a function with a name, a description and an input schema. The model sees only that definition, so clear descriptions and strict JSON schemas make tool selection reliable.

  • In Strands Agents (Python), a function becomes a tool with the @tool decorator; its docstring and type hints build the definition.
  • In Bedrock Agents, an action group defines tools with an OpenAPI schema or function details, and a Lambda function runs them. Return of control hands the call back to your application instead.
  • In the Converse API, tools are passed in toolConfig, and the model answers with a toolUse block that your code executes.

The model can send wrong or missing parameters. A Lambda handler should validate every parameter against the schema, check business rules such as a refund limit, and return a structured error the model can correct.

Strands hooks add custom behavior around the loop, such as logging tool calls or asking for confirmation before a write.

MCP servers and clients

MCP is an open protocol between an MCP client in the agent and an MCP server that exposes tools, resources and prompts. Any compliant client works with any server, so tools are reusable across frameworks.

AgentMCP clientlist tools, call toolMCP serverLambda, statelesscallsSimple APIlookupAgentMCP clientStreamable HTTPMCP serverAmazon ECS, long runningcallsComplex tooldatabase, sessions
HostingFitsWhy
AWS LambdaStateless, lightweight tools that answer quicklyPay per call, scales to zero, no servers
Amazon ECS (often on Fargate)Complex tools with long runs, large dependencies or connection stateContainers run continuously and hold state and connections
AgentCore GatewayTurning existing APIs and Lambda functions into MCP toolsManaged MCP endpoint with built in authentication

Use the official MCP client libraries instead of hand written HTTP calls, so every agent shares one discovery and call pattern.

Advanced orchestration patterns

Bigger applications combine these pieces: Strands or Agent Squad for the conversation, Step Functions for fixed multi step agent patterns, and Bedrock for prompt chaining, where one prompt's output feeds the next.

RequestclassifyRouterAgent Squad classifierbillingBilling agentStrandsRoutertechnicalSupport agentStrandsneeds approvalStep Functionsfixed workflow

Pick Step Functions when the order of steps is known and must be auditable. Pick an agent loop when the path depends on what the model discovers.

How the exam asks about this

  • "Several specialized agents must sit behind one chat entry point and keep context when the topic changes" -> AWS Agent Squad with its classifier, or a Strands orchestrator using agents as tools.
  • "A Strands agent must run in production with session isolation and managed memory" -> Amazon Bedrock AgentCore Runtime and AgentCore Memory.
  • "Many teams want to share the same internal tools across different agent frameworks" -> expose them as MCP servers and use MCP client libraries in each agent.

Common mistakes

Trusting tool arguments from the model. The model can invent an order ID or exceed a limit. Validate in the tool and return a readable error instead of failing silently.

Keeping memory in the compute instance. Lambda environments and container tasks are replaced at any time, so store state outside them.

Using an agent for a fixed process. If the steps never change, a Step Functions workflow is cheaper and easier to audit.

What to remember for the exam

  • Strands Agents is an open source, model driven SDK; tools come from decorated functions, and it supports agents as tools, swarm, graph and workflow patterns.
  • AWS Agent Squad routes each turn to one specialized agent through a classifier and keeps conversation context.
  • AgentCore hosts and operates agents from any framework: Runtime, Memory, Gateway, Identity and Observability.
  • MCP separates clients from servers; Lambda for stateless light tools, Amazon ECS for complex or stateful tools.
  • Tool reliability comes from clear definitions, strict schemas and validation in the tool code.

Check yourself

  • Where should an agent keep user preferences that must survive across sessions?

    In long term memory outside the compute, such as AgentCore Memory or a database keyed by user ID.

  • When is Amazon ECS a better host than Lambda for an MCP server?

    When the tool runs long, needs large dependencies or keeps state or connections between calls.

  • What makes a Lambda tool reliable when the model sends bad parameters?

    It validates parameters against the schema and business rules and returns a structured error the model can act on.

Topic 1 of 8 in Implementation and Integration

Test yourself on Implementation and Integration

The full AWS AIP-C01 question bank has 827 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.