Skip to content

New pattern - sfn-agentcore-bedrock-cdk#3066

Open
NithinChandranR-AWS wants to merge 2 commits intoaws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-sfn-agentcore-bedrock-cdk
Open

New pattern - sfn-agentcore-bedrock-cdk#3066
NithinChandranR-AWS wants to merge 2 commits intoaws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-sfn-agentcore-bedrock-cdk

Conversation

@NithinChandranR-AWS
Copy link
Copy Markdown

Step Functions + Bedrock AgentCore Multi-Agent Orchestration

Orchestrates multiple Bedrock AgentCore agents in parallel using SFN Map state, then aggregates responses via Bedrock Converse API.

Architecture: Trigger Lambda → SFN → Map (parallel AgentCore invocations) → Aggregate Lambda (Bedrock Converse) → Summary

Key decisions:

  • Bundled @aws-sdk/client-bedrock-agentcore via NodejsFunction (not in Lambda runtime)
  • Lambda intermediary for AgentCore streaming responses (SFN SDK integration times out)
  • Retry with backoff for AgentCore cold starts (60-120s)

Deployed and tested — SFN orchestrated 2 AgentCore agents in parallel, produced aggregated summary via Bedrock Converse.

TypeScript / AWS CDK

…estration pattern

Step Functions state machine orchestrates multiple Bedrock AgentCore
agents in parallel using Map state, then aggregates responses via
Bedrock Converse API. Uses NodejsFunction with bundled SDK since
@aws-sdk/client-bedrock-agentcore is not in Lambda runtime.

Key features:
- Parallel multi-agent invocation via SFN Map state
- Lambda intermediary handles AgentCore streaming responses
- Bedrock Converse aggregation of multi-agent outputs
- Configurable agent runtime ARNs and model ID
- Retry logic for AgentCore cold starts
- Scope bedrock:InvokeModel to inference profile ARN + foundation-model/*
- Scope bedrock:ApplyGuardrail to account guardrails instead of wildcard
- Add comment explaining agentcore wildcard (dynamic user-provided ARNs)
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.

3 participants