AWS Builder Center
Day 9 - Build a Multi-Agent AI System with Strands Agents and Amazon Bedrock

Day 9 - Build a Multi-Agent AI System with Strands Agents and Amazon Bedrock

Build a multi-agent application using Strands Agents SDK. Create an orchestrator that delegates tasks to specialist AI agents, connect them to Amazon Nova Lite through Amazon Bedrock, and integrate the application into the AWS Lambda function from Day 8.

Series: 30 Days of AI Engineering on AWS (17 articles)

  1. …
  2. 10
    Day 9 - Build a Multi-Agent AI System with Strands Agents and Amazon Bedrock This article
AWS SBG Tech Lead ’25 • Founding Member of Keralam’s First AWS SBG • AWS Certified
In Day 8, we deployed a Python AI agent using Strands Agents SDK on AWS Lambda.
That agent could answer questions and execute a custom Python tool.
But what happens when an application needs to perform different kinds of work?
Imagine building an AWS development assistant that needs to:
  • Review Python code.
  • Evaluate AWS architecture decisions.
  • Identify security problems.
  • Suggest improvements to serverless applications.
One general-purpose agent could attempt all these tasks. However, as the application grows, its instructions, tools, and responsibilities can become difficult to manage.
Instead, we can divide the work between specialized agents.
This is the idea behind a multi-agent architecture.
Each specialist has a specific responsibility. A central agent decides which specialist should handle a request and combines the results when necessary.
With Strands Agents SDK, we can build this architecture using the Agents as Tools pattern.

1. Understand the architecture

For today's exercise, we will create three agents.
Agent
Responsibility
Orchestrator
Understands the user's request and chooses the appropriate specialist
AWS Architecture Specialist
Reviews AWS service choices, infrastructure, and architecture
Python Security Reviewer
Reviews Python code, security, error handling, and reliability
The architecture looks like this:
User Request
|
v
Amazon API / Lambda
|
v
Orchestrator
|
Understand the Task
|
+----------+----------+
| |
v v
AWS Architecture Python Security
Specialist Reviewer
| |
v v
Architecture Code Review
Analysis Findings
| |
+----------+----------+
|
v
Orchestrator
|
Final Response
|
v
User
Both specialist agents use Amazon Bedrock as their model provider.
The orchestrator does not need to know the implementation details of every specialist. It only needs clear descriptions of their responsibilities.
This separation makes the application easier to extend and maintain.

2. Understand the Agents as Tools pattern

Strands supports several ways to coordinate agents.
For this exercise, we will use Agents as Tools.
The idea is straightforward:
  1. Create a specialist agent.
  1. Give that agent a focused system prompt.
  1. Convert it into a callable tool using  .as_tool() .
  1. Attach that tool to the orchestrator.
  1. Let the orchestrator decide when to invoke it.
For example:
orchestrator = Agent(
tools=[
aws_architecture_agent.as_tool(
name="aws_architecture_specialist",
description="Review AWS architecture decisions."
)
]
)
The orchestrator sees the specialist as a tool that it can call.
It does not require us to write a traditional Python routing function with multiple  if  statements.
The model chooses whether to delegate based on the user's request, the system instructions, and the available tool descriptions.
An important distinction: These agents are not separate servers or independent AWS Lambda functions. In this exercise, they are separate agent instances running inside the same Python application. Their model requests are still made through Amazon Bedrock.

3. Prerequisites

Make sure you have:
  • An AWS account.
  • AWS CLI configured.
  • Amazon Bedrock model access.
  • Python 3.12 or later.
  • Basic knowledge of Python and AWS Lambda.
We will continue using the Mumbai Region:
ap-south-1
Our model will be:
apac.amazon.nova-lite-v1:0
This is the APAC geographic inference profile for Amazon Nova Lite.
Regional consideration: Mumbai supports this model through geographic cross-Region inference, not an in-Region-only endpoint. The profile can route requests to supported APAC destinations. Do not treat this configuration as a guarantee that all inference processing stays inside Mumbai.
Amazon Nova Lite supports client-side tool calling through Amazon Bedrock Runtime, which makes it suitable for this exercise.

4. Create the project

Create a directory:
mkdir strands-multi-agent
cd strands-multi-agent
Create a Python virtual environment:
py -3.12 -m venv .venv

.venv\Scripts\Activate.ps1
For reproducibility, we will pin the Strands SDK to version  1.65.0 .
This version was published on November 13, 2026, and is the latest published Python SDK release I verified for this article on November 15, 2026.
Create  requirements.txt :
strands-agents==1.65.0
boto3
Install the dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txt
The SDK requires Python 3.10 or later, so Python 3.12 is compatible.

5. Configure Amazon Bedrock

Before creating the agents, configure the model provider.
Set the environment variables:
$env:AWS_REGION = "ap-south-1"
$env:BEDROCK_MODEL_ID = "apac.amazon.nova-lite-v1:0"
Verify that AWS CLI can identify your credentials:
aws sts get-caller-identity
Next, verify the inference profile:
aws bedrock get-inference-profile `
--inference-profile-identifier apac.amazon.nova-lite-v1:0 `
--region ap-south-1
Your AWS identity needs permission to invoke the selected Bedrock inference profile and its destination foundation models.
Because the example uses streaming inference, review permissions for:
bedrock:InvokeModel
bedrock:InvokeModelWithResponseStream
Scope these permissions to the relevant inference profile and destination model ARNs rather than granting unrestricted access.
You can reuse the Bedrock permissions configured for Day 8.

6. Create the AWS Architecture Specialist

Create a file named:
multi_agent_app.py
Start by importing the required classes:
import os
import json
import logging

from strands import Agent
from strands.models import BedrockModel
Configure the model:
REGION = os.getenv(
"BEDROCK_REGION",
os.getenv("AWS_REGION", "ap-south-1")
)

MODEL_ID = os.getenv(
"BEDROCK_MODEL_ID",
"apac.amazon.nova-lite-v1:0"
)

def create_model():

return BedrockModel(
model_id=MODEL_ID,
region_name=REGION,
temperature=0.2,
max_tokens=1200
)
Now create the first specialist:
def create_aws_architecture_agent(model):

return Agent(
model=model,

system_prompt="""
You are an AWS Architecture Specialist.

Your responsibility is to analyze AWS architecture
and provide practical engineering recommendations.

Focus on:

1. AWS service selection.
2. Serverless architecture.
3. IAM and least-privilege design.
4. Reliability and scalability.
5. Service integration and architecture trade-offs.

Separate verified information from assumptions.

Do not invent current AWS pricing, quotas,
regional availability, or API behavior.

If a recommendation depends on current AWS
documentation, explicitly say it needs verification.

Do not claim that you deployed or tested anything.
""",

callback_handler=None
)
This agent is not intended to handle every type of programming request.
Its responsibility is to evaluate architecture decisions and explain AWS-specific design trade-offs.
Notice the focused system prompt. It tells the specialist what it should do and what it should avoid claiming.

7. Create the Python Security Reviewer

Now create the second specialist.
def create_python_security_agent(model):

return Agent(
model=model,

system_prompt="""
You are a Python Security and Code Review Specialist.

Your responsibility is to analyze Python code
provided by the user.

Focus on:

1. Python correctness and potential bugs.
2. Input validation.
3. Exception handling.
4. Security vulnerabilities.
5. Sensitive information in logs.
6. AWS SDK usage and error handling.
7. Reliability and maintainability.

Prioritize your findings by severity:

CRITICAL
HIGH
MEDIUM
LOW

For every finding, explain:

- What the problem is.
- Why it matters.
- How to improve it.

Never claim that you executed or tested code
unless an actual execution tool was used.
""",

callback_handler=None
)
We now have two specialist agents with separate responsibilities.
The Python reviewer focuses on code-level issues, while the AWS specialist focuses on infrastructure and service design.
This is useful because a security review and an architecture review are related, but they are not the same task.

8. Build the Orchestrator Agent

Now comes the central part of this exercise.
We will expose the two specialist agents as tools using  .as_tool() .
def create_orchestrator():

model = create_model()

# Create specialist agents
aws_architecture_agent = (
create_aws_architecture_agent(model)
)

python_security_agent = (
create_python_security_agent(model)
)

# Create the orchestrator
orchestrator = Agent(

model=model,

system_prompt="""
You are the main orchestrator of an AI engineering
assistant.

You coordinate specialized agents.

Available specialists:

1. aws_architecture_specialist

Use this specialist for AWS architecture,
service selection, IAM, reliability,
scalability, and serverless design.

2. python_security_reviewer

Use this specialist for Python code reviews,
security vulnerabilities, error handling,
and maintainability.

Routing instructions:

- For AWS architecture questions, use the
AWS architecture specialist.

- For Python code reviews, use the
Python security reviewer.

- For requests involving both AWS architecture
and Python security, use both specialists
when appropriate.

- For simple general questions, answer directly.

After receiving specialist results, summarize
the important findings in a clear response.

Do not invent tool results or claim that code
has been tested or infrastructure deployed.
""",

tools=[
aws_architecture_agent.as_tool(
name="aws_architecture_specialist",
description=(
"Analyze AWS infrastructure, service "
"selection, IAM, serverless architecture, "
"reliability, and scalability."
)
),

python_security_agent.as_tool(
name="python_security_reviewer",
description=(
"Review Python code for bugs, security "
"issues, input validation, error handling, "
"and maintainability."
)
)
],

callback_handler=None
)

return orchestrator
Let's understand what happens here.
The specialist agents
We create the AWS and Python agents independently. Each receives its own system prompt and agent context.
The  .as_tool()  method
This is where we expose each specialist to the orchestrator as a callable tool.
We specify:
  •  name : The tool name exposed to the orchestrator.
  •  description : The responsibilities of that specialist.
The orchestrator uses these descriptions to understand when each specialist should be called.
The orchestrator
The main agent receives both tools and the routing instructions.
It can invoke a specialist, receive its response, and synthesize the findings into a final answer.
We also use:
callback_handler=None
This prevents specialist agents from independently printing their responses to the console. The application can handle the orchestrator's final result instead.

9. Execute the multi-agent system

Add a function that runs the orchestrator:
def run_multi_agent(prompt: str) -> str:

if not isinstance(prompt, str) or not prompt.strip():
raise ValueError("A non-empty prompt is required.")

orchestrator = create_orchestrator()

result = orchestrator(prompt.strip())

return str(result)
Now add a local execution block:
if __name__ == "__main__":

question = input(
"Enter your AI engineering request: "
).strip()

try:

answer = run_multi_agent(question)

print("\nMULTI-AGENT RESPONSE\n")
print(answer)

except Exception:

logging.exception(
"Multi-agent execution failed."
)
Run the application:
python multi_agent_app.py
Your application is now ready to receive requests.

10. Test the multi-agent application

Let's test three different situations.

Test 1: AWS architecture question

Enter:
I want to build a serverless application that processes
uploaded documents and invokes an AI model.

Recommend an AWS architecture and explain the
responsibilities of each service.
Expected routing:
User
|
v
Orchestrator
|
v
AWS Architecture Specialist
|
v
Architecture Recommendations
|
v
Orchestrator
|
v
Final Response
The orchestrator should recognize that this request requires AWS architecture expertise.

Test 2: Python code review

Enter:
Review this Python Lambda handler for security issues:

def lambda_handler(event, context):
user_id = event["user_id"]

response = s3.get_object(
Bucket="customer-records",
Key=f"users/{user_id}.json"
)

content = response["Body"].read().decode("utf-8")

print(content)

return content

Identify security and reliability problems.
Expected routing:
User
|
v
Orchestrator
|
v
Python Security Reviewer
|
v
Code Review Findings
|
v
Orchestrator
|
v
Final Response
The Python specialist should evaluate the code and identify relevant concerns, including input validation, sensitive information in logs, error handling, and access controls.
These are expected evaluation targets, not guaranteed model outputs.

Test 3: A request requiring both specialists

Now try a more complex question:
I am building a Python AWS Lambda application
that reads customer documents from Amazon S3
and sends the extracted text to Amazon Bedrock.

Review the security of this design.

Also suggest improvements to the Python implementation,
IAM permissions, logging, and reliability.
This request involves both architecture and code-level concerns.
The orchestrator should recognize that multiple specialists may be useful.
The intended execution becomes:
User Request
|
v
Orchestrator
|
+--------+--------+
| |
v v
AWS Specialist Python Reviewer
| |
v v
AWS Findings Code Findings
| |
+--------+--------+
|
v
Orchestrator
|
v
Combined Review
The orchestrator can use the specialist outputs to produce one consolidated response.

11. Integrate the application into AWS Lambda

In Day 8, we deployed a single-agent application using AWS Lambda.
We can now replace the single-agent creation logic with our multi-agent orchestrator.
Add the following Lambda handler to  multi_agent_app.py :
logger = logging.getLogger()
logger.setLevel(logging.INFO)

def lambda_handler(event, context):

try:

payload = event

# Support JSON requests through a
# Lambda Function URL or API Gateway.
if isinstance(event, dict) and "body" in event:

body = event["body"]

if isinstance(body, str):
payload = json.loads(body)
else:
payload = body

if not isinstance(payload, dict):
return {
"statusCode": 400,
"body": json.dumps({
"error": "Invalid request body."
})
}

prompt = payload.get("prompt")

if not isinstance(prompt, str) or not prompt.strip():

return {
"statusCode": 400,
"body": json.dumps({
"error": "A non-empty prompt is required."
})
}

# Build a fresh orchestrator and its specialists
# for this Lambda invocation.
answer = run_multi_agent(prompt)

return {
"statusCode": 200,
"headers": {
"Content-Type": "application/json"
},
"body": json.dumps({
"answer": answer
})
}

except (ValueError, json.JSONDecodeError) as error:

return {
"statusCode": 400,
"body": json.dumps({
"error": str(error)
})
}

except Exception:

logger.exception(
"Multi-agent Lambda invocation failed. Request ID: %s",
getattr(context, "aws_request_id", "unknown")
)

return {
"statusCode": 500,
"body": json.dumps({
"error": "Multi-agent execution failed."
})
}
Configure your Lambda handler as:
multi_agent_app.lambda_handler
For the deployment:
  1. Use a supported Python runtime such as Python 3.12.
  1. Package  strands-agents==1.65.0  and its dependencies, or use a compatible layer that contains that exact SDK version.
  1. Keep the Lambda execution role's required Bedrock model permissions.
  1. Use an appropriate timeout and memory configuration for multiple model invocations.
  1. Retain the IAM-authenticated Function URL or API Gateway configuration from Day 8.
Packaging warning: Do not assume the Strands Lambda layer used in Day 8 automatically contains SDK version 1.65.0. Verify the published layer's actual SDK version before reusing it. Alternatively, package dependencies using a Lambda-compatible Linux build environment.
For requests that invoke both specialists, expect more model calls and potentially higher execution times than the single-agent version.

12. Understand the important engineering trade-offs

A multi-agent architecture is not automatically better than a single-agent application.
There are several considerations.

A. More model calls mean higher costs

A typical delegated request can involve:
  1. An orchestrator model call to choose a specialist.
  1. A specialist model call to complete its task.
  1. Another orchestrator model call to synthesize the specialist's response.
A request involving both specialists can require additional model invocations.
The actual number depends on the agent's execution path and tool calls.
This means a multi-agent application can consume more tokens and introduce more latency than a single-agent application.
Use specialist delegation when it provides a meaningful improvement, not simply because multiple agents are available.

B. Keep specialist responsibilities narrow

Avoid building multiple agents with identical responsibilities.
For example, having three agents all described as general AWS experts does not automatically produce a better architecture.
Instead, give each specialist a clear responsibility.
Good examples:
  • AWS architecture reviewer.
  • Python security reviewer.
  • Database performance analyst.
  • Infrastructure-as-code reviewer.

C. Keep context isolated

Strands resets an agent-as-tool specialist's conversation context between invocations by default.
This is useful for ensuring that a specialist starts with a clean context for each delegation.
If you use  preserve_context=True , the specialist retains its context within the orchestrator session. In that case, you should manage its session state explicitly.
For a Lambda application, create fresh agent instances for each request unless you have deliberately designed a persistent session architecture.
Do not store one user's conversation history in shared global state.

D. Understand when to use other multi-agent patterns

Strands provides additional coordination patterns.
Pattern
Best suited for
Agents as Tools
One orchestrator delegates to specialists
Graph
Explicit workflows with dependencies and branches
Swarm
Agents autonomously hand work between themselves
Workflow
A fixed task graph with reusable execution steps
Agent-to-Agent (A2A)
Connecting agents running as separate services
For today's exercise, Agents as Tools is the simplest appropriate option.
When workflows become more complicated, explore Graph or Workflow rather than adding unnecessary complexity to the orchestrator.

E. Specialist agents do not automatically have current knowledge

The specialists in this exercise use Amazon Nova Lite and their configured system prompts. They do not automatically have access to live AWS documentation, your AWS account, or external search.
Their answers are model-generated recommendations.
For current AWS service details, pricing, quotas, and regional availability, connect your agents to trusted documentation through a retrieval system or an appropriately configured documentation tool.
This is especially important for production architecture and security reviews.



What you accomplished today

You expanded the single-agent implementation from Day 8 into a multi-agent system.
By completing this exercise, you have:
  • Created two specialized agents using Strands.
  • Built an orchestrator agent.
  • Exposed specialist agents through  .as_tool() .
  • Connected the agents to Amazon Nova Lite through Amazon Bedrock.
  • Tested single-specialist and multi-specialist requests.
  • Integrated the orchestrator with an AWS Lambda handler.
  • Examined context isolation, latency, cost, and coordination trade-offs.
The most important concept is that multi-agent engineering is about separating responsibilities and coordinating their execution, not simply creating more agents.
A well-designed orchestrator with two focused specialists can be easier to maintain than one agent with a large collection of unrelated responsibilities.

Day 9 task

Build your own AWS development assistant using Strands Agents.
Create an orchestrator with at least two specialists:
  1. An AWS architecture specialist.
  1. A Python security reviewer.
Test a request that requires both specialists and inspect whether the orchestrator combines their findings correctly.
Try deploying the application through your Day 8 Lambda setup.

Series: 30 Days of AI Engineering on AWS (17 articles)

  1. …
  2. 10
    Day 9 - Build a Multi-Agent AI System with Strands Agents and Amazon Bedrock This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article