Skip to content

New Workflow Submission: sfn-agentcore-bedrock-cdk#413

Open
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:sfn-agentcore-bedrock-cdk
Open

New Workflow Submission: sfn-agentcore-bedrock-cdk#413
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:sfn-agentcore-bedrock-cdk

Conversation

@NithinChandranR-AWS
Copy link
Copy Markdown

New Workflow: Step Functions with Bedrock AgentCore Multi-Agent Orchestration

Description

This workflow uses AWS Step Functions to orchestrate multiple Amazon Bedrock AgentCore agents in parallel via a Map state, then aggregates their responses into a unified summary using the Bedrock Converse API.

How it works:

  1. A trigger Lambda starts the state machine with a prompt and list of AgentCore agent runtime ARNs
  2. The Map state fans out to invoke each agent in parallel via a bundled Lambda intermediary
  3. An aggregate Lambda uses Bedrock Converse to synthesize all agent responses into a unified summary

Key architectural decisions:

  • The @aws-sdk/client-bedrock-agentcore SDK is not available in the Lambda runtime and must be bundled using NodejsFunction
  • InvokeAgentRuntime returns a streaming response, requiring a Lambda intermediary rather than direct Step Functions SDK integration
  • Map state enables parallel fan-out across any number of agents with configurable concurrency

Pattern Details

Field Value
Language TypeScript
Framework CDK
Type Standard
Level 400
Simplicity 3 - Application
Services Step Functions, Lambda, Bedrock (AgentCore + Converse)

Files

  • example-workflow.json — Pattern metadata
  • statemachine/statemachine.asl.json — ASL definition
  • resources/statemachine.png — Workflow diagram
  • lib/sfn-agentcore-bedrock-stack.ts — CDK stack
  • src/invoke-agent.ts — Lambda: invokes AgentCore agent (bundled SDK)
  • src/aggregate.mjs — Lambda: aggregates responses via Bedrock Converse
  • src/trigger.mjs — Lambda: triggers the state machine
  • README.md — Full documentation with deploy/test/cleanup instructions

Testing

Deployed and tested on AWS account with multiple AgentCore agents. The pattern correctly:

  • Fans out to N agents in parallel
  • Collects streaming responses from each agent
  • Aggregates into a coherent summary via Bedrock Converse

Checklist

  • Pattern follows the model template
  • example-workflow.json includes all required fields
  • README.md sections completed in full
  • State machine diagram exported as PNG
  • Code tested and working

Author

Nithin Chandran R — Technical Account Manager at AWS
LinkedIn

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

Step Functions workflow that orchestrates multiple Bedrock AgentCore
agents in parallel via Map state, then aggregates responses using
Bedrock Converse API.

- CDK (TypeScript) infrastructure
- Bundled Lambda for AgentCore SDK (not in runtime)
- Parallel agent invocation with Map state
- Response aggregation via Bedrock Converse
@NithinChandranR-AWS
Copy link
Copy Markdown
Author

Related issue: #414

@NithinChandranR-AWS
Copy link
Copy Markdown
Author

Hi 👋 Friendly nudge — this Step Functions + Bedrock AgentCore multi-agent orchestration workflow is ready for review. It's the first AgentCore pattern in this repo. Deployed and tested end-to-end. Would appreciate a review when you get a chance. Thank you!

@NithinChandranR-AWS
Copy link
Copy Markdown
Author

Hi 👋 Friendly follow-up — this is the first AgentCore pattern in this repo. Shows Step Functions orchestrating multiple Bedrock AgentCore agents in parallel. Deployed and tested end-to-end. Would appreciate a review!

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.

1 participant