Skip to content

Conversation

@vedamtamssp
Copy link

@vedamtamssp vedamtamssp commented Nov 17, 2025

The Parallel Agent Early Stopping pattern uses AWS Step Functions and Amazon Bedrock to run multiple AI agents simultaneously on the same problem, with different approaches, and automatically terminates unnecessary processes once a high-confidence solution is discovered. The workflow coordinates Worker Agents that either retrieve information from the AWS Documentation MCP Server or generate responses using Amazon Bedrock models, while an Evaluation Agent continuously assesses confidence levels and triggers early stopping when a predetermined threshold is met. This design optimizes both performance and cost through parallel exploration, intelligent termination, and resource optimization techniques including agent tiering, token optimization, and Lambda memory tuning.

#408

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

aws_services = [
"EC2", "S3", "Lambda", "DynamoDB", "RDS", "Aurora", "ECS", "EKS",
"SQS", "SNS", "API Gateway", "CloudFormation", "CloudFront", "Route 53",
"2PC", "IAM", "CloudWatch", "Step Functions", "EventBridge", "Cognito",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is 2PC?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo - its VPC, updated

Comment on lines 38 to 39
"repoURL": "https://github.com/aws-samples/step-functions-workflows-collection/tree/main/dynamodb-transfer/",
"templateDir":"dynamodb-transfer",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to update the folder name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

"repoURL": "https://github.com/aws-samples/step-functions-workflows-collection/tree/main/dynamodb-transfer/",
"templateDir":"dynamodb-transfer",
"templateFile": "template.yaml",
"ASL": "statemachine/statemachine.asl.json"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use correct filename

{
"name": "Dave Horne",
"image": "https://d2908q01vomqb2.cloudfront.net/9e6a55b6b4563e652a23be9d623ca5055c356940/2025/04/07/me.jpeg",
"bio": "Dave is a senior solutions architect supporting Federal System Integrators at AWS. He is based in Washington, DC, and has 15 years of experience building, modernizing, and integrating systems for public sector customers. Outside of work, Dave enjoys playing with his kids, hiking, and watching Penn State football.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bio": "Dave is a senior solutions architect supporting Federal System Integrators at AWS. He is based in Washington, DC, and has 15 years of experience building, modernizing, and integrating systems for public sector customers. Outside of work, Dave enjoys playing with his kids, hiking, and watching Penn State football.",
"bio": "Dave is a senior Solutions Architect supporting Federal System Integrators at AWS. He is based in Washington, DC, and has 15 years of experience building, modernizing, and integrating systems for public sector customers. Outside of work, Dave enjoys playing with his kids, hiking, and watching Penn State football.",

{
"name": "Satya Vedamtam",
"image": "",
"bio": "Satya is a senior solutions architect supporting US Federal customers at AWS. He is passionate about serverless technologies and everyday is an opportunity to solve customer challenges.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"bio": "Satya is a senior solutions architect supporting US Federal customers at AWS. He is passionate about serverless technologies and everyday is an opportunity to solve customer challenges.",
"bio": "Satya is a senior Solutions Architect supporting US Federal customers at AWS. He is passionate about serverless technologies and everyday is an opportunity to solve customer challenges.",

Comment on lines 82 to 83
- You'll see the workflow spawn multiple parallel agents with different specialized approaches
- Watch as some agents complete successfully while others are terminated early
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's that visual. I would talk more about the map state and how to check the state of each iteration

aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"
```
----
Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Properties:
CodeUri: functions/
Handler: awsdocmcpserver.handler
Runtime: python3.12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the latest runtime version everywhere

- Effect: Allow
Action:
- states:StopExecution
Resource: "*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please scope this down further

MemorySize: 256
Environment:
Variables:
MODEL_ID: us.anthropic.claude-3-5-haiku-20241022-v1:0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason why Haiku 3.5? Anyway, add a blurb regarding model selection to the README please

@vedamtamssp
Copy link
Author

vedamtamssp commented Nov 22, 2025 via email

Copy link
Contributor

@bfreiberg bfreiberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you for your contribution. There might be a delay in merging it to the site due to re:Invent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants