Amazon Bedrock AgentCore を用いた AWS 上の高スケーラブルなサーバーレス LangGraph マルチエージェントシステムの構築
AWS は、LangGraph をオーケストレーターとして活用し、Lambda や Step Functions と組み合わせたサーバーレス基盤上で、Amazon Bedrock AgentCore のメモリと可視化機能を統合したスケーラブルなマルチエージェントシステム構築手法を提案している。
キーポイント
サーバーレスアーキテクチャの活用
AWS Lambda と Step Functions を組み合わせることで、インフラ管理不要かつ自動スケール可能な基盤上で、バースト性の高いエージェントワークロードを処理可能にする。
LangGraph の明示的グラフ実行モデル
決定論的な調整、並列処理、条件分岐を実現し、複雑なマルチツールワークフローのデバッグと監査経路の明確化を可能にする。
AgentCore によるメモリと可視化
Amazon Bedrock AgentCore Memory でセッションを超えた文脈維持を実現し、AgentCore Observability で推論プロセスやレイテンシの詳細な監視を提供する。
重要な引用
Building high-performance AI agents today requires more than powerful models and demands an implementation that can deliver consistent performance, preserve context across interactions, and provide deep observability into how agents reason and behave in production.
LangGraph's explicit graph-based execution model enables deterministic coordination, parallelism, and conditional routing between agents, making complex multi-agent workflows more straightforward to reason and debug.
影響分析・編集コメントを表示
影響分析
この記事は、生成 AI エージェントの本番環境展開における「管理コスト」と「信頼性」の壁を打破する具体的なアーキテクチャパターンを示しており、企業による大規模マルチエージェントシステムの導入加速に寄与します。特に、サーバーレス技術と高度なオーケストレーションフレームワークを組み合わせることで、開発者がインフラの詳細に囚われずにビジネスロジックに集中できる環境を提供し、AI エージェントの実用化スピードを劇的に高める可能性があります。
編集コメント
本稿は、単なるツールの紹介に留まらず、生成 AI エージェントを大規模かつ信頼性高く運用するための具体的なアーキテクチャ設計指針を提供しており、実務レベルの知見として非常に価値が高いです。
生成 AI は、実験的なプロトタイプから、本番環境において大規模かつ現実的なパフォーマンス制約下でも確実に動作することが求められるシステムへと急速に進化しました。組織がデモや概念実証の段階を超えて進むにつれ、推論レイテンシ、スケーラビリティ、状態管理、運用上の可視性に関連する課題に直面する機会が増えています。今日、高性能な AI エージェントを構築するには、強力なモデルを持つだけでなく、一貫したパフォーマンスを提供し、対話間で文脈を維持し、本番環境におけるエージェントの推論や振る舞いについて深い可視性を提供できる実装が求められます。
本稿では、オーケストレーターとして LangGraph Agents を使用し、Amazon Bedrock AgentCore Memory および Amazon Bedrock AgentCore Observability と統合することで、AWS 上で非常にスケーラブルでサーバーレスなマルチエージェント生成 AI システムを構築するためのソリューションを提供します。
スケーラブルなサーバーレス型マルチエージェントオーケストレーションを構築するための当社のアプローチは、AWS Lambda や AWS Step Functions といったサーバーレス技術を組み合わせたものです。これらのサービスを利用すれば、開発者は自動的にスケールし、リアルタイムでイベントに対応し、インフラ管理が不要な LangGraph エージェントを構築できます。これにより、動的かつバースト性の高いエージェントワークロードに最適な環境が整います。これらのサービスを組み合わせることで、永続的な状態管理、リトライ機能、細粒度のコスト制御を備えた複雑なマルチツール型エージェントワークフローをオーケストレーションすることが可能になります。
LangGraph の明示的なグラフベースの実行モデルは、エージェント間の決定論的な調整、並列処理、条件付きルーティングを可能にし、複雑なマルチエージェントワークフローの推論とデバッグをより容易にします。オーケストレーションロジックとエージェントの振る舞いを分離することで、LangGraph を用いて、明確で監査可能な実行パスを維持しながら、専門的なエージェントを追加・削除・進化させることが独立して行えます。これは、予測可能な動作、拡張性、マルチエージェント推論に対する構造化された制御を必要とする本番環境システムにおいて特に価値があります。
AgentCore Observability は、各呼び出しの詳細な可視性を提供することでこれらの機能を拡張し、分散型サーバーレスコンポーネント全体にわたるモデルの入力/出力、レイテンシ、ツールチェーンメトリクスをキャプチャします。AgentCore Memory から統合されたメモリサービスにより、エージェントはセッション間で短期的な会話の文脈と長期的な知識を維持できます。
ソリューション概要
当社のサーバーレス LangGraph および AgentCore に基づくマルチエージェントオーケストレーションシステムソリューションは、生成 AI を活用したマルチエージェントキャンペーンレビューシステムです。これは、多様なペルソナを用いて人間のレビューをオーケストレートし、マーケティングキャンペーンがターゲットオーディエンスに本物らしく響くと同時に、法的整合性とブランド基準を維持できるようにするものです。このシステムは、3 つの専門化された AI エージェントで構成されており、これらはマーケティングキャンペーンを並列分析します。1 つ目はペルソナレビューアエージェントで、多様な人口統計学的視点からコンテンツを検証し、共鳴スコアを提供します。2 つ目はバリデーターエージェントで、法的整合性とブランドガイドラインへの準拠を確認します。3 つ目はファイナライザーエージェントで、フィードバックを実行可能な推奨事項に統合します。ユーザーは React フロントエンドを通じてキャンペーンドキュメントをアップロードし、同フロントエンドは結果をポーリングして、レビューが利用可能になると随時表示します。
LangGraph を用いて、システムを状態実行グラフとしてモデル化することで、オーケストレーターと専門エージェントを実装します。各ノードは個別のエージェント機能(具体的にはペルソナレビュー、コンプライアンス検証、フィードバック合成)を表し、エッジはこれらのステップ間の制御フローを定義します。オーケストレーターは、実行のルーティングを行い、専門エージェントのための並列ブランチをトリガーし、それらの出力を集めて最終的な集約を行う監督グラフとして実装されています。LangGraph オーケストレーターと専門エージェントは合わせて Docker コンテナとしてパッケージ化されます。
Strands エージェントに対して AWS Lambda をサーバーレス管理ランタイムとして使用し、自動スケーリング、リアルタイムイベントへの対応、インフラストラクチャ管理の不要化を実現しています。オーケストレーターエージェントは、Amazon API Gateway が提供する REST インターフェースとしてその機能を表示します。
本エージェント実装では AgentCore Observability を使用して、エージェントワークフローの各ステップの詳細な可視化を提供し、開発者が実行パスを検査したり、中間出力を監査したり、パフォーマンスのボトルネックをデバッグしたりできるようにしています。AgentCore Observability 内では、Amazon CloudWatch 内にリアルタイムでの可視性を提供し、トレース、セッション数、レイテンシ、期間、トークン使用量、エラーレートなどの主要メトリクスに関する運用パフォーマンスダッシュボードとテレメトリーを提供します。
私たちは、AgentCore Memory をエージェント実装内の 2 つの主要なユースケースで使用しています。具体的には、独立したエージェント実行間でのコンテキストと共有メモリを提供するためのマルチエージェント共有メモリとして機能させること、および多ターン会話へのサポートを提供することです。この実装は、AgentCore Memory を使用して会話の状態と履歴を保存するビルトインサポートを提供しているため、AI アシスタントの自然言語インターフェースとして拡張することができます。以下のアーキテクチャ図は、当社のソリューションのさまざまな構成要素を示しています。
前提条件
以下の前提条件を満たしてください:
- Amazon Bedrock でのモデルアクセスを確認します。本ソリューションでは、Amazon Bedrock 上で Anthropic の Claude 4.5 Sonnet を使用します。
- AWS Command Line Interface (AWS CLI) をインストールします。
- AWS SAM CLI v1.100.0+ をインストールします。
- Docker v20.x+ をインストールします。
- Node.js v18.x+ をインストールします。
- Docker v20.x+ をインストールします(重複項目)。
- Python v3.11+ をインストールします。
依存関係
当社の Strands Agents 実装には、Dockerfile にパッケージ化されている以下の依存関係があります:
- langchain>=0.2.0
- langgraph==0.3.31
- langgraph-prebuilt~=0.1.8
- langgraph-sdk~=0.1.61
- langchain-aws>=0.2.18
- langchain_tavily
- requests
- bedrock-agentcore
- boto3
ソリューションのデプロイ
ソリューションは、当社の GitHub リポジトリ からダウンロードできます。AWS 環境でこのソリューションをデプロイしてアクセスするには、GitHub リポジトリの README に正確に記載されている以下のステップバイステップガイドを使用してください:
Step 1: リポジトリのクローン git clone
cd aws-genai-campaign-review-langgraph
Step 2: AWS 認証情報の設定
*AWS CLI の設定:*
aws configure
*認証情報の確認:*
aws sts get-caller-identity
Step 3: Amazon DynamoDB ペルソナテーブルのセットアップ
*スクリプトの実行権限付与:*
chmod +x scripts/setup_persona_table.sh
*セットアップスクリプトの実行:*
./scripts/setup_persona_table.sh
Step 4: AWS SAM アプリケーションのビルド
sam build
Step 5: インフラストラクチャのデプロイ
*ガイド付きデプロイを使用し、プロンプトに従ってスタック名、エージェント名、AWS リージョンを入力し、その他の項目についてはデフォルト値を受け入れます。*
sam deploy --guided
Step 6: デプロイ出力の取得
*API エンドポイントの取得:*
aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs' --output table
*これらの値を保存:*
- ApiEndpoint – API URL
- CampaignOrchestratorApi – エージェント API URL
- CloudFrontURL – フロントエンド URL
- FrontendBucket – フロントエンド用の S3 バケット
Step 8: フロントエンド環境の設定
*CloudFormation 出力から値を取得:*
API_URL=$(aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==ApiEndpoint].OutputValue' --output text)
AGENT_API_URL=$(aws cloudformation describe-stacks --stack-name -review --query 'Stacks[0].Outputs[?OutputKey==CampaignOrchestratorApi].OutputValue' --output text)
*Create .env file:*
cat > .env
VITE_API_URL=$API_URL
VITE_AGENT_API_URL=$AGENT_API_URL
VITE_AWS_REGION=
EOF
Step 9: Build and deploy front end
*Install dependencies:*
npm install
*Build frontend:*
npm run build
*Get frontend bucket name:*
FRONTEND_BUCKET=$(aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==FrontendBucket].OutputValue' --output text)
*Deploy to S3:*
aws s3 sync dist/ s3://$FRONTEND_BUCKET --delete
*Invalidate CloudFront cache (optional, for updates):*
DISTRIBUTION_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Origins.Items[0].DomainName=='${FRONTEND_BUCKET}.s3.us-west-2.amazonaws.com'].Id" --output text)
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"
Step 10: Access the application
*Get CloudFront URL:*
aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==CloudFrontURL].OutputValue' --output text
ブラウザで URL を開いてアプリケーションにアクセスしてください。この campaign_brief.md ファイルをサンプルキャンペーンドキュメントとして使用し、左側のパネルにアップロードしてください。その後、右側のパネルでマルチエージェントオーケストレーションからのキャンペーンレビュー出力を確認できるようになります。
Bedrock AgentCore 観測性コンソール に移動し、エージェントを選択して、以下に示すように、エージェントワークフローの各ステップの詳細な可視化を行ってください。
クリーンアップ
再発する課金を避けるために、ソリューションを試した後はアカウントをクリーンアップしてください。
- CloudFormation スタックの削除
sam delete --stack-name
- DynamoDB テーブルの削除
aws dynamodb delete-table --table-name PersonaTable --region
結論
本記事では、LangGraph、Amazon Bedrock AgentCore、およびサーバーレス AWS サービスを組み合わせることで、チームが非常にスケーラブルで本番環境対応型のマルチエージェント生成 AI システムを構築する方法を示しました。オーケストレーションには LangGraph の明示的なグラフベースの実行モデルを、実行には AWS Lambda ベースのランタイムを使用することで、開発者は複雑な並列エージェントワークフローを、決定論的な制御フロー、自動スケーリング、最小限の運用オーバーヘッドで調整できます。統合された AgentCore Memory と観測機能は、実世界のエージェント展開における最も一般的な課題である状態管理と可視性の 2 つに対処し、エージェント実行間での共有かつ永続的なコンテキストと、エージェントの動作・パフォーマンス・コストに関する深い洞察を提供します。
これらの機能を組み合わせることで、AWS 上でエンタープライズグレードの AI エージェントを構築するための反復可能なアーキテクチャパターンが形成されます。キャンペーンレビューシステムの導入、デジタルアシスタントの実装、あるいはその他のマルチエージェント推論ワークフローの実行において、このアプローチによりオーケストレーションと実行を分離し、需要に応じて弾力的にスケーリングし、エージェントがどのように推論し相互作用するかについて完全な透明性を維持することが可能になります。構造化されたオーケストレーションには LangGraph を、管理されたランタイム・メモリ・観測機能には Amazon Bedrock AgentCore を使用することで、実験的なプロトタイプから信頼性が高くスケーラブルな本番環境の生成 AI システムへと自信を持って移行できます。
著者について
Kanishk Mahajan氏は、AWS Professional Servicesのシニアアーキテクト(AI/ML)です。この役職において、彼はテレコムおよびメディア・エンターテインメント分野におけるAWS最大規模の顧客向けに、生成AIおよびエージェント型システムの変革を主導しています。
Akshay Parkhi氏は、Amazon Web Servicesで機械学習エンジニアとして勤務しており、SAP、クラウド、DevOps、AI/MLにわたる企業変革を16年以上にわたり率いてきました。彼は複雑な実世界環境において重要なビジネス成果を実現する、本番グレードのAIおよびエージェント型システムのアーキテクチャ設計とスケーリングを担当しています。
原文を表示
Generative AI has rapidly evolved from experimental prototypes into systems that are expected to operate reliably in production, at scale, and under real-world performance constraints. As organizations move beyond demos and proofs of concept, they increasingly encounter challenges related to inference latency, scalability, state management, and operational visibility. Building high-performance AI agents today requires more than powerful models and demands an implementation that can deliver consistent performance, preserve context across interactions, and provide deep observability into how agents reason and behave in production.
In this post, we provide a solution to build highly scalable, serverless multi-agent generative AI systems on AWS using LangGraph Agents as orchestrators integrated with Amazon Bedrock AgentCore Memory and Amazon Bedrock AgentCore Observability.
Our approach for building highly scalable serverless multi-agent orchestrations combines serverless technologies such as AWS Lambda and AWS Step Functions. These services can be used by developers to build LangGraph agents that scale automatically, respond to events in real time, and remove infrastructure management. This makes them ideal for dynamic, bursty agent workloads. By combining these services, you can orchestrate complex multi-tool agent workflows with durable state management, retries, and fine-grained cost control.
LangGraph’s explicit graph-based execution model enables deterministic coordination, parallelism, and conditional routing between agents, making complex multi-agent workflows more straightforward to reason and debug. By separating orchestration logic from agent behavior, you can use LangGraph to add, remove, or evolve specialized agents independently while maintaining a clear, auditable execution path. This is especially valuable for production systems that require predictable behavior, extensibility, and structured control over multi-agent reasoning.
AgentCore Observability extends these capabilities by providing detailed visibility into each invocation, capturing model inputs/outputs, latency, and tool-chain metrics across distributed serverless components. Integrated memory services from AgentCore Memory enable agents to maintain short-term conversational context and long-term knowledge across sessions.
Solution overview
Our serverless LangGraph and AgentCore based multi-agent orchestration system solution is a generative AI-powered multi-agent campaign review system that orchestrates human reviews using diverse personas that enable marketing campaigns to resonate authentically with target audiences while maintaining legal alignment and brand standards. It consists of three specialized AI agents that analyze the marketing campaign in parallel – a persona reviewer agent reviews content from diverse demographic perspectives and provides resonance scoring, a validator agent verifies legal alignment and brand guideline adherence, while a finalizer agent then synthesizes feedback into actionable recommendations. Users upload campaign documents through a React frontend that also polls for results and displays reviews as they become available.
We use LangGraph to implement the orchestrator and specialized agents by modeling the system as a stateful execution graph. Each node represents a discrete agent function specifically persona review, compliance validation, and feedback synthesis—and edges define the control flow between these steps. The orchestrator is implemented as the supervising graph that routes execution, triggers parallel branches for specialized agents, and collects their outputs for final aggregation.The LangGraph orchestrator and specialized agents are together packaged as a Docker container.
We use AWS Lambda as the serverless managed runtime in AWS for our Strands agents to scale automatically, respond to events in real time, and remove infrastructure management. Our orchestrator agent displays its functionality as REST interfaces provided by Amazon API Gateway.
Our Agent implementation uses AgentCore Observability to provide detailed visualizations of each step in the agent workflow, enabling developers to inspect execution paths, audit intermediate outputs, and debug performance bottlenecks. Within AgentCore Observability, we provide real-time visibility within Amazon CloudWatch into operational performance dashboards and telemetry for key metrics such as traces, session count, latency, duration, token usage, and error rates.
We use AgentCore Memory for two key use cases within our Agent implementation specifically for multi-agent shared memory to provide both context and shared memory across independent agent runs and to provide support for multi-turn conversations. You can extend this implementation to provide an AI assistant natural language interface as our implementation using AgentCore Memory provides built-in support for storing conversational state and history. The following architecture diagram illustrates the various components of our solution.
Prerequisites
Complete the following prerequisites:
- Verify model access in Amazon Bedrock. In this solution, we use Anthropic’s Claude 4.5 Sonnet on Amazon Bedrock.
- Install the AWS Command Line Interface (AWS CLI).
- Install the AWS SAM CLI v1.100.0+
- Install Docker v20.x+.
- Install Node.js v18.x+
- Install Docker v20.x+
- Install Python v3.11+
Dependencies
Our Strands Agents implementation has the following dependencies that are packaged in the Dockerfile:
- langchain>=0.2.0
- langgraph==0.3.31
- langgraph-prebuilt~=0.1.8
- langgraph-sdk~=0.1.61
- langchain-aws>=0.2.18
- langchain_tavily
- requests
- bedrock-agentcore
- boto3
Deploy the solution
You can download the solution from our GitHub repo. Use the following step-by-step guidance also outlined exactly in the README of the GitHub repo to deploy and access the solution in your AWS environment:
Step 1: Clone the repository** git clone
cd aws-genai-campaign-review-langgraph
Step 2: Configure AWS credentials
*Configure AWS CLI:*
aws configure
*Verify credentials:*
aws sts get-caller-identity
Step 3: Set up an Amazon DynamoDB persona table
*Make script executable:*
chmod +x scripts/setup_persona_table.sh
*Run setup script:*
./scripts/setup_persona_table.sh
Step 4: Build the AWS SAM application
sam build
Step 5: Deploy infrastructure
*Use a guided deployment and follow the prompts to provide your stack name, agent name, AWS region and accept the default values for other areas.*
sam deploy --guided
Step 6: Get deployment outputs
*Get API endpoints:*
aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs' --output table
*Save these values:*
- ApiEndpoint – API URL
- CampaignOrchestratorApi – Agent API URL
- CloudFrontURL – Front-end URL
- FrontendBucket – S3 bucket for front end
Step 8: Configure front-end environment
*Get values from CloudFormation outputs:*
API_URL=$(aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==ApiEndpoint].OutputValue' --output text)
AGENT_API_URL=$(aws cloudformation describe-stacks --stack-name -review --query 'Stacks[0].Outputs[?OutputKey==CampaignOrchestratorApi].OutputValue' --output text)
*Create .env file:*
cat > .env VITE_API_URL=$API_URL`
VITE_AGENT_API_URL=$AGENT_API_URL
VITE_AWS_REGION=
EOF
Step 9: Build and deploy front end
*Install dependencies:*
npm install
*Build frontend:*
npm run build
*Get frontend bucket name:*
FRONTEND_BUCKET= $(aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==FrontendBucket].OutputValue' --output text)
*Deploy to S3:*
aws s3 sync dist/ s3://$FRONTEND_BUCKET --delete*Invalidate CloudFront cache (optional, for updates):*
DISTRIBUTION_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Origins.Items[0].DomainName=='${FRONTEND_BUCKET}.s3.us-west-2.amazonaws.com'].Id" --output text)
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*"
Step 10: Access the application
*Get CloudFront URL:*
aws cloudformation describe-stacks --stack-name --query 'Stacks[0].Outputs[?OutputKey==CloudFrontURL].OutputValue' --output text
Open the URL in your browser to access the application. Use this campaign_brief.md file as the sample campaign document and upload it on the left panel. You will then be able to view the campaign review output from the multi-agent orchestration in the right panel. Navigate to the Bedrock AgentCore Observability console and select your agent for a detailed visualization of each step in your agent workflow as shown below
Clean up
To avoid recurring charges, clean up your account after trying the solution.
- Delete CloudFormation stack
sam delete --stack-name
- Delete DynamoDB table
aws dynamodb delete-table --table-name PersonaTable --region
Conclusion
In this post, we showed how combining LangGraph, Amazon Bedrock AgentCore, and serverless AWS services helps teams to build highly scalable, production-ready multi-agent generative AI systems. By using LangGraph’s explicit graph-based execution model for orchestration and AWS Lambda based runtimes for execution, developers can coordinate complex, parallel agent workflows with deterministic control flow, automatic scaling, and minimal operational overhead. Integrated AgentCore Memory and Observability address two of the most common challenges in real-world agent deployments—state management and visibility—by providing shared, durable context across agent runs and deep insight into agent behavior, performance, and cost.
Together, these capabilities form a repeatable architectural pattern for building enterprise-grade AI agents on AWS. Whether you’re implementing campaign review systems, digital assistants, or other multi-agent reasoning workflows, this approach allows you to decouple orchestration from execution, scale elastically with demand, and maintain full transparency into how agents reason and interact. By using LangGraph for structured orchestration and Amazon Bedrock AgentCore for managed runtime, memory, and observability, you can confidently move from experimental prototypes to reliable, scalable generative AI systems in production.
About the authors
Kanishk Mahajan** is Principal – AI/ML with AWS Professional Services. In this role, he leads GenAI and agentic transformations for some of AWS largest customers in Telco and Media & Entertaintment.
Akshay Parkhi is a Machine Learning Engineer at Amazon Web Services with over 16 years of experience leading enterprise transformation across SAP, cloud, DevOps, and AI/ML. He architects and scales production-grade AI and agentic systems that power critical business outcomes in complex, real-world environments.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み