Amazon Bedrock AgentCore を用いたマルチテナントエージェントの構築
AWS は、SaaS プロバイダー向けのマルチテナント型エージェントアプリケーション構築において、テナント分離やコスト最適化といった課題を解決するための設計パターンと「Amazon Bedrock AgentCore」の提供を開始した。
キーポイント
マルチテナント環境特有のアーキテクチャ課題
セキュリティやガバナンスに加え、テナント分離(Isolation)、アイデンティティ管理、観測性、データ隔離、コスト帰属、およびノイジーネイバー対策が、本番環境での実装における主要な障壁として挙げられている。
3 つのテナント分離パターンと設計トレードオフ
Silo(サイロ)、Pool(プール)、Bridge(ブリッジ)の 3 つのパターンから選択する必要があり、それぞれ強固な分離性と運用効率・コスト最適化の間でバランスを取る必要がある。
ランタイムデプロイメント戦略:専用 vs 共有
テナントごとに実行環境を分ける「専用(Dedicated)」ランタイムはコンプライアンスとノイジーネイバー対策に優れる一方、全テナントでリソースを共有する「共有(Shared)」ランタイムはコスト削減に寄与するが、厳格な文脈管理が必要となる。
Amazon Bedrock AgentCore の役割
AWS は、これらの複雑なアーキテクチャを簡素化するために、アイデンティティ管理、メモリ、観測性、評価機能を組み込んだマネージド・サーバーレスサービス「Bedrock AgentCore」を提供し、SaaS 向けエージェント開発を支援する。
影響分析・編集コメントを表示
影響分析
このニュースは、生成 AI エージェントが単なる実験段階から本番の SaaS サービスとして展開される際の最大の障壁である「マルチテナント管理」に対する具体的な解決策を示すものです。AWS が提供する Bedrock AgentCore は、開発者がセキュリティやコスト最適化といった複雑なインフラ課題に直面することなく、堅牢なエージェントアーキテクチャを迅速に構築・運用できる基盤を提供し、企業向け AI アプリケーションの普及速度を加速させる可能性があります。
編集コメント
AI エージェントの実用化において、技術的な機能性だけでなく、SaaS としての多テナント管理やコスト最適化といったインフラ面の課題解決が急務となっています。AWS のこのアプローチは、開発者がこれらの複雑な基盤構築から解放され、ビジネスロジックに集中できる環境を整える重要な一歩と言えます。
ソフトウェア・アズ・ア・サービス(SaaS)プロバイダーがマルチテナント型エージェントアプリケーションを構築する際、セキュリティ、ガバナンス、応答精度といった典型的な懸念事項を超えたアーキテクチャ上の課題に対処する必要があります。これらには、テナントの分離、テナントアイデンティティ、テナントの可観測性、データ分離、コスト帰属、およびノイジーネイバー(混在する他のテナントによる干渉)の緩和が含まれます。動作するデモと本番環境への展開との間のギャップを埋めるには、マルチテナント環境向けに構築されたインフラストラクチャが必要です。
Amazon Bedrock AgentCore は、AWS 上でエージェントアプリケーションを構築、展開、そして安全に運用するための管理型サーバーレスサービスです。エージェントのデプロイや MCP サーバーのホスティングのためのコンストラクトを提供し、アイデンティティ管理、メモリ機能、可観測性、評価機能に対する組み込みサポートを備えています。これらはすべて、マルチテナント型エージェントアーキテクチャの構築を容易にするために設計されています。
本記事はブログシリーズ第 1 部として、Amazon Bedrock AgentCore を用いて SaaS アーキテクチャ上の課題に対処するためのフレームワークとともに、マルチテナント型エージェントアプリケーションをアーキテクチャする際の設計考慮事項を探ります。
マルチテナントエージェント構築のための設計考慮事項
強力な分離を備えたセキュアなマルチテナント型エージェントアプリケーションを構築するには、図 1 に示すように、特定の主要コンポーネント全体にわたる慎重なアーキテクチャ上の判断が必要です。各コンポーネントは、セキュリティとコンプライアンス基準を維持しつつ、テナント分離、運用効率、コスト最適化のバランスを取る必要があります。これらの設計考慮事項は、サイロ、プール、ブリッジ の 3 つのテナント分離パターンを中心に展開され、それらを選択する際の重要な検討事項としてティアリング戦略が挙げられます。

*図 1: マルチテナントエージェントの設計考慮事項*
次のセクションでは、マルチテナンシーがこれらの各コンポーネントにどのように影響を与えるかを詳しく解説します。
1. エージェントランタイムのデプロイ:専用型と共有型の比較
マルチテナント型エージェントアーキテクチャにおける重要な意思決定は、テナントに対してエージェントランタイムをどのようにプロビジョニングするかです。各テナントに *dedicated*(専用)ランタイムを設定すると、それぞれのテナント用に独立した実行環境が作成され、独自のコンテナイメージ、プロセス空間、ライフサイクルが割り当てられます。このサイロ型アプローチは、ノイジー・ネイバー問題に対する最も強力な保護を提供し、コンプライアンス監査の簡素化にも寄与します。一方、*shared*(共有)ランタイムでは、すべてのテナントのエージェントを同じコンテナイメージとプロセスプール内でホストするため、インフラコストや運用オーバーヘッドを低減できますが、厳格なプロセス内でのテナント文脈伝播が必要となります。
Amazon Bedrock AgentCore Runtime は、セッションごとに隔離されたマイクロ VM ベースのコンピューティングを通じてこの緊張関係を解消します。AgentCore Runtime は、各テナントに対してフルサイズの仮想マシンを起動するコストや遅延を伴わずに、セッション単位で軽量なマイクロ VM を起動します。各セッションには独自の永続ファイルシステムが割り当てられるため、エージェントはセッションスコープのファイルの読み書きが可能となり、中間計算成果物を保持し、多段階の対話 across して状態を維持できます。これにより、セッション間でのデータ漏洩リスクを低減できます。このアーキテクチャは、マルチテナント対応 MCP サーバー、エージェント、AG-UI サーバーのホストに適しています。
テナントコンテキストは、カスタム HTTP ヘッダーを通じて隔離された実行環境に流れます。SaaS プラットフォームがリクエストを AgentCore Runtime セッションに転送する際、テナント識別子、ティア、地域設定、機能フラグ、権限などのテナント固有のメタデータを標準的な認証トークンとともに付与したヘッダーを添付します。エージェントは呼び出し時にこれらのヘッダーを読み取り、完全なテナント認識状態を確立するため、そのテナントのビジネスロジックに最適化されたワークフローを実行し、ライセンスされたツールのみを呼び出し、ハードコードされたルーティングロジックなしでテナント固有の API エンドポイントを呼び出すことができます。
2. 共有モデルとティア固有モデル、およびファインチューニング済みモデルの比較
共有基盤モデル(FMs)は、ほとんどのマルチテナント展開における推奨される出発点であり、単一のモデル管理による運用の簡素化を提供します。テナントは通常、各テナントごとのカスタマイズを必要とせず、自動的にモデルが更新される恩恵を受けます。テナントのティア(Tier-specific model)に基づいてモデルを選択するオプションにより、テナント間のコスト、パフォーマンス、精度のバランスを保ちつつ柔軟性を確保できます。特定の用語や規制コンプライアンス、またはパフォーマンス SLA に対応した専門的なユースケースでは、テナント固有でファインチューニングされたモデルが必要となりますが、これには運用複雑性の増大と各テナントごとのパイプライン構築という課題が生じます。標準的なティアには能力の低いモデルを、プレミアムエンタープライズ顧客にはファインチューニング済みまたはより高機能なモデルを使用するハイブリッドアプローチにより、コスト効率性とカスタマイズのニーズのバランスを図ることができます。
Amazon Bedrock は、主要プロバイダーからの大規模言語モデル(LLMs)を選択可能にすることで、SaaS プロバイダーがテナントおよびティア固有の要件に適したモデルを選定できるようにしています。Amazon Bedrock のファインチューニング機能では、独自のラベル付きデータセットを使用して基盤モデルをカスタマイズし、ドメイン固有タスクにおけるパフォーマンスを向上させることが可能です。また、Amazon Bedrock Custom Model Import を利用すれば、独自にファインチューニングしたモデルを持ち込み、Amazon Bedrock が提供する管理型インフラ上でデプロイすることができます。
3. Workflows: Silo, Pool, and Bridge patterns
マルチテナント型エージェントアプリケーションでは、各テナントの要件とビジネスロジックに基づいて各エージェントが異なるステップシーケンスを実行する柔軟なワークフロー管理が必要です。ワークフローは、段階的なプロセスをカプセル化する MCP ツールとして、またはビジネスロジックの流れを定義する API エンドポイントとして、あるいはドメイン固有のワークフローパターンを組み込んだエージェントスキルとして、複数のメカニズムを通じて実装できます。
テナント固有のワークフローを管理する主要なパターンは 3 つあります。サイロ(Silo)パターンでは、各テナント専用のスキルが使用され、各テナントの完全なワークフロー(すべてのビジネスロジック、バリデーションルール、統合ステップを含む)が孤立したエージェントスキルに埋め込まれます。これにより最大限のカスタマイズと完全な独立性が得られますが、テナントごとに個別のスキルメンテナンスが必要となります。プール(Pool)パターンでは共有されたエージェントスキルを使用します。一方、ブリッジ(Bridge)パターンでは、認証、ログ記録、エラー処理などの共通ワークフローステップを共有されたエージェントスキルに埋め込み、実行時にビジネス上重要なロジックのためにテナント固有のスキルを呼び出します。その結果、再利用可能なインフラストラクチャがテナント固有のカスタマイズと共存することになります。
4. マルチテナント RAG
検索拡張生成 (RAG) システムでは、データの分離に関する判断が必要です。サイロパターンは、各テナントごとに専用のベクトルデータベースを使用し、最大限のセキュリティと完全なデータ分離を提供します。これは、規制業界や専用インフラを必要とするエンタープライズ顧客に対して推奨されます。一方、プールパターンは、メタデータに基づくテナントフィルタリングとネームスペースベースのアクセス制御を備えた共有ベクトルデータベースを使用し、多数の小規模から中規模のテナントを対象とする SaaS プラットフォームにおいてコスト効率の高い運用をサポートします。検索操作には、自動的なテナントフィルタ注入と結果のサニタイズを含めることで、テナント間でのデータ漏洩を防ぐ必要があります。
Amazon Bedrock Knowledge Bases は、FM(ファウンデーションモデル)をデータソースに接続し、データの取り込み、チャンキング、埋め込み生成、ベクトルストレージを自動的に処理する、完全に管理された RAG 機能を提供します。複数のベクトルデータベースをサポートしており、メタデータフィルタリングを使用してサイロ化されたベクトルデータベースまたは共有ベクトルデータベースを作成する能力も備えています。
Amazon Bedrock Knowledge Bases を用いたマルチテナント RAG アーキテクチャの実装に関する詳細なガイドについては、サイロ、プール、ブリッジのデプロイメントパターンについては Multi-tenant RAG with Amazon Bedrock Knowledge Bases を、共有されたナレッジベース内でのメタデータに基づくテナント分離については Multi-tenancy in RAG applications in a single Amazon Bedrock knowledge base with metadata filtering をご覧ください。
5. テナントコンテキスト、代理実行パターン、およびトークンの伝播
マルチテナントのアイデンティティ管理では、サービスチェーン全体を通じてテナントコンテキストを慎重に扱う必要があります。完全なアイデンティティとリクエスト固有の状態を表すテナントコンテキストは、信頼性が高く安全なメカニズムを用いて、すべてのアーキテクチャ層を流れる必要があります。予測可能な実行パスを持つ決定論的なソフトウェア API とは異なり、AI エージェントは非決定論的であり、潜在的に自律的であるため、セキュリティ上の考慮事項には重要な違いがあります。悪意のあるまたは乗っ取られたエージェントが、下流のサービスに対して許可されていない呼び出しを行う可能性があり、その結果、認証情報の窃取、権限昇格、および「混乱した副官(Confused Deputy)」問題が発生する可能性があります。エージェントが完全なユーザー資格情報(なりすまし)で動作する場合、単一のエージェントが乗っ取られると、下流のすべてのシステムにおけるすべてのユーザー権限への完全なアクセスを一度に取得してしまいます。このリスクは、エージェントがより自律的になり、どのツールをいつ、どのようなパラメータで呼び出すかについて独立した判断を下すようになると増大します。代理実行パターンが重要なのは、ユーザーとエージェントの間に明確な区別を設け、各特定の操作に対して明示的に制限されたスコープ付き権限で、エージェントがユーザーに代わって呼び出しを行うことを確立するからです。
JSON Web Tokens (JWT) 内にテナントコンテキストをエンコードし、3 つの次元を捉えます:セキュリティコンテキスト(標準的クレーム:iss, sub, exp, aud)、テナントコンテキスト(tenant_id およびテナント固有のスコープ)、およびリクエストコンテキスト(ビジネスロジックのためのドメイン固有属性)。このようにテナントコンテキストをエンコードすることは、マルチテナント運用に対する堅牢かつ柔軟な基盤を提供します。
セキュリティ上の影響が異なる2つのパターンから選択してください。Impersonation(なりすまし)では、エージェントが完全なユーザーIDと権限で動作するため実装は単純ですが、最小権限の原則に違反し、セキュリティリスクを生じます。推奨されるアプローチであるAct-on-Behalf(代理実行)では、各サービス境界でトークンが変換され、スコープ制限付きの認証情報とエージェントを識別するact claim(OAuth 2.0 RFC 8693準拠)を持つ真正な委任が実装されます。AgentCore IdentityにおけるOn-behalf-of トークン交換機能を使用することで、MCP サーバーなどの他のワークロードと共に、エージェントは受信したユーザーアクセストークンを、下流のリソースサーバーを対象とした新しいスコープ制限付きのアクセストークンに交換できます。この交換により、あるオーディエンス向けに発行されたトークンが直接異なる下流のオーディエンス向けのトークンに変換されるため、認証済みユーザーに代わって保護リソースへのアクセスが可能となり、追加の同意フローをトリガーすることはありません。交換されたトークンには、エージェント自身のIDと元の呼び出し元のIDの両方が含まれており、リソースサーバーは各ホップで微細粒度のゼロトラスト権限管理を適用するために必要なシグナルを受け取ることができます。
MCP ツールおよび API に対するきめ細かいアクセス制御
マルチテナント型エージェントアプリケーションでは、ポリシーを用いた MCP サーバーへのアクセス制限、ツール呼び出し層におけるきめ細かいアクセス制御、データアクセス層でのテナント分離が必要です。認可層においては、ポリシーがランタイム時にテナントコンテキストを評価し、現在のテナント状態に基づいてツールの呼び出しを許可するかどうかの決定を行い、トークンに埋め込まれた静的な権限のみを頼りにするのではなく、テナントクォータ、ティアベースの権限、使用制限を評価します。分離され集中化されたポリシーストアにより、再デプロイなしで動的な更新が可能となり、ポリシーのバージョン管理は監査証跡とロールバック機能をサポートします。AgentCore Policy は、ツールのアクセスを許可する前に定義されたポリシーに対してすべてのエージェントリクエストをインターセプトして評価し、ユーザーID およびツール入力パラメータに基づいたきめ細かい制御を提供します。ポリシーは自然言語で記述するか、Cedar で直接作成することができます。
呼び出し層では、MCP サーバーは、エージェントがツールを呼び出す前に、テナントの階層、機能フラグ、クォータ制限に基づいて利用可能なツールをフィルタリングすることで、きめ細かいアクセス制御を実行します。ツールインタセプターは JWT クレームを検証し、要求元の主体が特定の操作に対して適切な権限を持っていることを確認します。スキーマ変換機能は、テナントの設定と権限に基づいてツールインターフェースを適応させます。AgentCore Gateway は、API や AWS Lambda 関数をエージェント対応のツールに変換し、既存の MCP サーバーに接続することで、エージェントが安全にツールにアクセスできるようにします。Amazon API Gateway、OpenAPI スキーマ、Smithy モデル、Lambda 関数、および MCP サーバーへのサポートを提供しています。カスタムロジックにはゲートウェイインタセプターを通じてアクセス制御を実装するか、標準的な AWS スタイルのアクセス制御にはリソースベースポリシーを使用できます。
データアクセス層では、属性ベースのアクセス制御(ABAC)ポリシーが、JWT クレームを通じたテナント識別により、データアクセスにおけるテナント分離を強制します。ABAC ポリシーは、AWS Identity and Access Management (IAM) の条件を使用して、主体タグと属性に基づいてデータアクセスを制限するため、エージェントは行レベルのセキュリティまたはストレージポリシーを通じて、自身のテナントコンテキストに一致するリソースのみをクエリできます。
7. メモリ:階層的名前空間分離
マルチテナントのメモリ管理には、エージェントが文脈や学習した情報を維持しつつ、テナント間のデータ漏洩を防ぐために慎重なアーキテクチャ設計が必要です。メモリシステムは以下の5つの論理レベルを実装すべきです:
- グローバル(テナント横断型の共有知識)
- ストラテジー(エージェント種別固有のパターンと振る舞い)
- テナント(テナントスコープの会話履歴と設定)
- ユーザー(テナント内の個々のユーザー文脈)
- セッション(アクティブな会話のための一時的な短期メモリ)
アクセス制御は、属性ベースポリシーを通じて分離を強制し、要求された名前空間パスに対してプリンシパルIDを検証します。これにより、エージェントは許可されたスコープ内でのみメモリを読み書きできます。プールパターンでは、運用とコスト効率のために階層的な名前空間ベースの論理分離を持つ共有インフラストラクチャを使用し、すべてのテナントデータを共通データストアに格納しますが、名前空間プレフィックスに基づく厳格なフィルタリングを行います。一方、サイロパターンでは、最大限の分離を実現するために各テナントごとに専用のメモリストアをデプロイします。これはテナント間のアクセスリスクを低減しますが、運用コストは高くなります。
実装には、テナント情報とユーザー情報から複合識別子(例:tenant_123:user_456)を構築し、テナントコンテキストをクレームまたはタグとして持つスコープ付き認証情報で認証を行い、すべてのメモリ操作に適切な名前空間パスをプレフィックスとして付与することが含まれます。
AgentCore Memory は、グローバル、戦略、テナント、ユーザー、セッションの各レベルにわたる階層的な名前空間分離を提供し、多回対話のための短期記憶とセッションを跨ぐ長期記憶の両方をサポートする文脈認識型エージェント体験を実現します。また、リソースベースポリシー と 属性ベースアクセス制御 をサポートし、きめ細やかなアクセス制御を可能にしています。
8. エージェントのアイデンティティ、信頼、および発見
エージェントアプリケーションが組織の境界を超えて外部のエージェントと相互作用する際、3 つの基盤となる懸念が生じます。それは、エージェントのアイデンティティ、エージェントの信頼、そしてエージェントの発見です。これらは関連し合っていますが、それぞれが異なる課題に対応しています。
エージェントのアイデンティティは、「このエージェントは誰か、またそれを証明できるか?」という問いに答えるものであり、組織に紐付けられた検証可能で一意なアイデンティティを確立します。
エージェントの信頼は、「このエージェントを信頼すべきか?」という問いに答えるものであり、単一の資格情報ではなく、複数のシグナルを組み合わせて信頼性を評価します。
エージェントの発見は、「適切なエージェントをどのように見つけるか?」という問いに答えるものであり、エンドポイントに関する事前知識なしに、機能や所属に基づいてエージェントを検索します。
AgentCore Identity を用いたエージェントのアイデンティティ
Amazon Bedrock AgentCore Identity は、クラウドネイティブセキュリティにおいて確立されたパターンであるワークロードアイデンティティとしてエージェントのアイデンティティを実装しています。各エージェントは、組織の AWS アカウントおよび IAM インフラストラクチャにアンカーされた暗号学的に検証可能なアイデンティティを受け取ります。エージェントは OAuth 2.0 フローを使用して、ユーザーに代わって AWS リソースやサードパーティ製ツールを安全にアクセスできます。また、AgentCore Identity は、既存の企業向けアイデンティティプロバイダー(Okta、Microsoft Entra ID、Amazon Cognito など)と統合可能であり、ユーザーの移行は不要です。
エージェントの信頼性
アイデンティティがあるだけでは、エージェントを信頼すべきかどうかという問いには答えられません。業界はこの問題に対して積極的に取り組んでいます。Agent Naming Service (ANS) v2 は現在、IETF インターネットドラフト(作業中)として策定されており、すべてのエージェントアイデンティティを DNS ドメイン名にアンカーします。クライアントは、取引リスクに応じて適切な保証レベルを選択でき、3 つの検証ティア(Bronze: PKI、Silver: PKI + DANE、Gold: PKI + DANE + Transparency Log)が用意されています。
AWS Agent Registry を用いたエージェントの発見
Amazon Bedrock AgentCore を通じて利用可能な AWS Agent Registry は、組織全体にわたるエージェント、スキル、MCP サーバー、およびカスタムリソースを発見するための中央集権型カタログを提供します。チームは再利用可能なエージェント機能を公開し、バージョン管理を行い、共有することができます。消費者は、識別子やエンドポイントに関する事前知識を必要とせず、自然言語または構造化された検索を通じてエージェントを発見できます。組み込まれたガバナンス制御により、消費者がレジストリにアクセスする方法や、レコードが発見可能になる前に承認が必要かどうかを決定します。
要約すると、AgentCore Identity はアイデンティティの基礎的な証明を提供し、Agent Registry は発見の問題を解決し、ANS などの新興する信頼フレームワークは、マルチシグナルによる信頼評価のギャップを埋めることを目指しています。
9. テナントごとのコスト追跡と観測機能
正確なマルチテナントのコスト帰属には、エージェント呼び出しごとにテナントタグ付きメトリクスをロギングソリューションに発行するアプリケーションレベルの計装(instrumentation)が必要です。これにより、I/O トークン、ツール呼び出し、実行時間がキャプチャされます。テナントコンテキストを持つ構造化ログは、使用パターン、パフォーマンスボトルネック、および容量計画の詳細な分析を可能にします。AgentCore Observability は、Amazon CloudWatch によって駆動される OpenTelemetry 互換の統合により、エージェントワークフローに対するリアルタイムの可視性を提供し、エージェント実行の各ステップの詳細なビジュアライゼーションを提供します。
10. ガイドレール:コンテンツ安全性
マルチテナント向けガイドレールは、3 つの適用ポイントにおいて安全性とコンプライアンスを強制します。前処理入力ガイドレールは、エージェント処理前にユーザー入力を検証し、悪意あるプロンプトやプロンプトインジェクションをブロックするとともに、医療分野における HIPAA や金融分野における PCI-DSS といったテナント固有のコンプライアンス要件に基づいて個人識別情報(PII)をサンitize します。後処理出力ガイドレールは、エージェントの回答が事実上正確であるか検証し、ハルシネーションを検出し、フォーマット準拠を確認するとともに、テナント間での機密データ漏洩をスキャンします。毒性検出、コンテンツフィルタリング、および cust
原文を表示
Software as a service (SaaS) providers building multi-tenant agentic applications must address architectural challenges beyond the typical concerns of security, governance, and response accuracy. These include tenant isolation, tenant identity, tenant observability, data isolation, cost attribution, and noisy neighbor mitigation. Closing the gap between a working demo and a production deployment requires infrastructure built for multi-tenant environments.Amazon Bedrock AgentCore is a managed, serverless service for building, deploying and securely operating agentic applications on AWS. It provides constructs for deploying agents and hosting MCP servers, with built-in support for identity management, memory, observability, and evaluations, all designed to make multi-tenant agent architectures straightforward to build.
This post, part 1 of the blog series, explores design considerations for architecting multi-tenant agentic applications and the framework needed to address SaaS architecture challenges withAmazon Bedrock AgentCore.
Design considerations for building a multi-tenant agent
Building secure multi-tenant agentic applications with strong isolation requires careful architectural decisions across certain key components, as shown in Figure 1. Each component must balance tenant isolation, operational efficiency, and cost optimization while maintaining security and compliance standards. These design considerations revolve around three tenant isolation patterns: Silo, Pool, and Bridge, with tiering strategy as a key consideration when choosing among them.

*Figure 1: Design considerations for a multi-tenant agent*
In the following section, we elaborate how multi-tenancy impacts each of these components.
1. Agent Runtime Deployment: Dedicated compared to Shared
A key decision in a multi-tenant agentic architecture is how the agent runtime is provisioned relative to tenants. A *dedicated* runtime per tenant instantiates a separate execution environment for each tenant, with its own container image, process space, and lifecycle. This silo approach offers the strongest noisy-neighbor protection and streamlines compliance audits. A *shared* runtime hosts agents for all tenants within the same container image and process pool, lowering infrastructure costs and operational overhead but requiring strict in-process tenant context propagation.
Amazon Bedrock AgentCore Runtime resolves this tension through session-isolated microVM-based compute. AgentCore Runtime launches lightweight microVMs on a per-session basis, without the cost or latency of spinning up a full virtual machine for every tenant. Each session carries its own persistent file system, so agents can read and write session-scoped files, maintain intermediate computation artifacts, and preserve state across multi-step interactions, reducing the risk of cross-session data leakage. The architecture is a good fit for hosting multi-tenant MCP servers, agents, and AG-UI servers.Tenant context flows into the isolated execution environment through custom HTTP headers. When the SaaS platform forwards a request to an AgentCore Runtime session, it attaches headers carrying tenant-specific metadata such as tenant identifier, tier, regional preferences, feature flags, or entitlements, alongside standard authorization tokens. The agent reads these headers at invocation time to establish full tenant awareness, so it can run workflows tuned to that tenant’s business logic, invoke only licensed tools, and call tenant-specific API endpoints without hardcoded routing logic.
2. Shared compared to Tier-Specific compared to. Fine-Tuned Models
Shared foundation models (FMs) serve as the recommended starting point for most multi-tenant deployments, offering streamlined operations with single model maintenance. Tenants typically benefit from automatic model updates without per-tenant customizations. The option to select the model based on tenant tier (Tier-specific model) allows flexibility and balances cost, performance, and accuracy across tenant tiers. Tenant-specific fine-tuned models become necessary for specialized use cases requiring tenant-specific terminology, regulatory compliance, or performance SLAs, though they introduce higher operational complexity and per-tenant pipelines. A hybrid approach, using less capable models for standard tiers and fine-tuned or more capable models for premium enterprise customers, balances cost efficiency with customization needs.Amazon Bedrock provides a choice of large language models (LLMs) from leading providers, allowing SaaS providers to pick a model suitable for tenant and tier-specific needs. Amazon Bedrock fine-tuning supports the customization of FMs using your own labeled datasets to improve performance for domain-specific tasks. With Amazon Bedrock Custom Model Import, you can bring your own fine-tuned models and deploy them using the Amazon Bedrock managed infrastructure.
3. Workflows: Silo, Pool, and Bridge patterns
Multi-tenant agentic applications require flexible workflow management where each agent executes different sequences of steps based on tenant requirements and business logic. Workflows can be implemented through multiple mechanisms: as MCP tools that encapsulate step-by-step processes, as API endpoints that define business logic flows, or as agent skills that embed domain-specific workflow patterns.
Three primary patterns manage tenant-specific workflows. The silo pattern uses dedicated tenant-specific skills where each tenant’s complete workflow, including all business logic, validation rules, and integration steps, is embedded in isolated agent skills. This gives maximum customization and complete independence but requires separate skill maintenance per tenant. The pool pattern uses shared agent skills. The bridge pattern embeds common workflow steps such as authentication, logging, and error handling in shared agent skills that invoke tenant-specific skills at runtime for business-critical logic. The result is reusable infrastructure that coexists with tenant-specific customization.
4. Multi-tenant RAG
Retrieval Augmented Generation (RAG) systems require data isolation decisions. The silo pattern uses dedicated vector databases per tenant, providing maximum security and complete data separation. This is recommended for regulated industries and enterprise customers requiring dedicated infrastructure. The pool pattern uses shared vector databases with metadata-based tenant filtering and namespace-based access control, which supports cost-efficient operations for SaaS platforms serving many small-to-medium tenants. Retrieval operations should include automatic tenant filter injection and result sanitization to help prevent cross-tenant data leakage.
Amazon Bedrock Knowledge Bases provides fully managed RAG capabilities that connect FMs to your data sources, automatically handling data ingestion, chunking, embedding generation, and vector storage. It supports multiple vector databases and provides the ability to create siloed or shared vector database (using meta-data filtering).
For detailed guidance on implementing multi-tenant RAG architectures with Amazon Bedrock Knowledge Bases, see Multi-tenant RAG with Amazon Bedrock Knowledge Bases for silo, pool, and bridge deployment patterns, and Multi-tenancy in RAG applications in a single Amazon Bedrock knowledge base with metadata filtering for metadata-based tenant isolation within a shared knowledge base.
5. Tenant context, act-on-behalf patterns, and token propagation
Multi-tenant identity management requires careful handling of tenant context throughout the service chain. Tenant context, representing the complete identity, and request-specific state must flow through every architectural layer using reliable and secure mechanisms. Unlike deterministic software APIs with predictable execution paths, AI agents are non-deterministic and can be potentially autonomous, making security considerations different in important ways. Rogue or compromised agents could potentially make unauthorized calls to downstream services, leading to stolen credentials, privilege escalation, and the Confused Deputy problem. When agents operate with full user credentials (impersonation), a single compromised agent gains complete access to all user permissions across all downstream systems. This risk grows as agents become more autonomous and make independent decisions about which tools to invoke, when to invoke them, and with what parameters. The act-on-behalf pattern matters because it establishes a clear distinction between the user and the agent, with agents making calls on behalf of the user with explicitly limited, scoped permissions for each specific operation.
Encode tenant context within JSON Web Tokens (JWT) capturing three dimensions: Security Context (standard claims: iss, sub, exp, aud), Tenant Context (tenant_id and tenant-specific scopes), and Request Context (domain-specific attributes for business logic). Encoding tenant context this way provides a strong and flexible foundation for multi-tenant operations.
Choose between two patterns with distinct security implications: Impersonation allows agents to operate with complete user identity and permissions, offering straightforward implementation but violating the least privilege principles and creating security risks. Act-on-Behalf (Delegation), the recommended approach, implements true delegation where tokens are transformed at each service boundary with scope-limited credentials and an act claim (per OAuth 2.0 RFC 8693) identifying the agent. Use the On-behalf-of token exchange in AgentCore Identity, enabling agents and other workloads, such as MCP servers, to exchange an inbound user access token for a new, scoped access token that targets a downstream resource server. As the exchange converts a token issued for one audience directly into a token for a different downstream audience, your agents can access protected resources on behalf of authenticated users without triggering additional consent flows. The exchanged token carries both the agent’s own identity and the original caller’s identity, giving resource servers the signals they need to enforce fine-grained, zero-trust authorization at every hop.
6. Fine-grained access control for MCP tools and APIs
Multi-tenant agentic applications require restricting MCP server access using policies, fine-grained access control at the tool invocation layer, and tenant isolation at the data access layers. At the authorization layer, policies evaluate tenant context at runtime to make allow/deny authorization decisions, and to assess tenant quotas, tier-based permissions, and usage limits before allowing tool invocations based on current tenant state rather than relying solely on static permissions embedded in tokens. Decoupled and centralized policy stores allow dynamic updates without redeployment, with policy versioning supporting audit trails and rollback capabilities. AgentCore Policy intercepts and evaluates all agent requests against defined policies before allowing tool access, providing fine-grained control based on user identity and tool input parameters, with policies authored using natural language or directly in Cedar.
At the invocation layer, MCP servers enforce fine-grained access control by filtering available tools based on tenant tier, feature flags, and quota limits before agents can invoke them. Tool interceptors validate JWT claims to confirm that the requesting principal has appropriate permissions for the specific operation. Schema translation capabilities adapt tool interfaces based on tenant configurations and entitlements. AgentCore Gateway enables agents to securely access tools by transforming APIs and AWS Lambda functions into agent-compatible tools and connecting to existing MCP servers, with support for Amazon API Gateway, OpenAPI schemas, Smithy models, Lambda functions, and MCP servers. You can implement access control through gateway interceptors for custom logic or use resource-based policies for standard AWS-style access control.At the data access layer, Attribute-Based Access Control (ABAC) policies enforce tenant isolation for data access, with tenant identification occurring through JWT claims. ABAC policies use AWS Identity and Access Management (IAM) conditions to restrict data access based on principal tags and attributes, so agents can only query resources matching their tenant context through row-level security or storage policies.
7. Memory: Hierarchical namespace isolation
Multi-tenant memory management requires careful architectural design so that agents can maintain context and learned information while preventing cross-tenant data leakage. Memory systems should implement five logical levels:
- Global (cross-tenant shared knowledge)
- Strategy (agent-type-specific patterns and behaviors)
- Tenant (tenant-scoped conversational history and preferences)
- User (individual user context within a tenant)
- Session (ephemeral short-term memory for active conversations)
Access control enforces isolation through attribute-based policies that validate principal identities against requested namespace paths, so agents can only read and write memory within their allowed scope. The pool pattern uses shared infrastructure with hierarchical namespace-based logical isolation for operational and cost efficiency, storing all tenant data in a common data store with strict filtering based on namespace prefixes. The silo pattern deploys dedicated memory stores per tenant for maximum isolation, reducing cross-tenant access risk at a higher operational cost. Implementation involves constructing composite identifiers from tenant and user information (for example, tenant_123:user_456), authenticating with scoped credentials that carry tenant context as claims or tags, and prefixing all memory operations with the appropriate namespace path.
AgentCore Memory provides hierarchical namespace isolation across global, strategy, tenant, user, and session levels, supporting context-aware agent experiences with both short-term memory for multi-turn conversations and long-term memory that persists across sessions. It supports resource based policies and attribute-based access control for fine-grained access.
8. Agent identity, trust, and discovery
As agentic applications interact with external agents across organizational boundaries, three foundational concerns emerge: agent identity, agent trust, and agent discovery. While related, each addresses a distinct problem.
Agent Identity answers *“Who is this agent, and can it prove it?”* – establishing a verifiable, unique identity tied to an organization.
Agent Trust answers *“Should I trust this agent?”* – evaluating trustworthiness based on a combination of signals, not a single credential.
Agent Discovery answers *“How do I find the right agent?”* – locating agents by capability or affiliation without prior knowledge of endpoints.
Agent identity with AgentCore Identity
Amazon Bedrock AgentCore Identity implements agent identities as workload identities, a pattern well-established in cloud-native security. Each agent receives a cryptographically verifiable identity anchored to the organization’s AWS account and IAM infrastructure. Agents can securely access AWS resources and third-party tools on behalf of users using OAuth 2.0 flows, and AgentCore Identity integrates with existing corporate identity providers such as Okta, Microsoft Entra ID, and Amazon Cognito without requiring user migration.
Agent trust
Identity alone doesn’t answer whether an agent should be trusted. The industry is actively working on this problem. The Agent Naming Service (ANS) v2, currently an IETF Internet-Draft (work in progress), which anchors every agent identity to a DNS domain name. Clients can choose assurance levels that are appropriate to their transaction risk with three verification tiers, Bronze (PKI), Silver (PKI + DANE), and Gold (PKI + DANE + Transparency Log).
Agent discovery with AWS Agent Registry
AWS Agent Registry, available through Amazon Bedrock AgentCore, provides a centralized catalog for discovering agents, skills, MCP servers, and custom resources across an organization. Teams can publish, version, and share reusable agent capabilities. Consumers discover agents through natural language or structured search without needing prior knowledge of identifiers or endpoints. Built-in governance controls determine how consumers access the registry and whether records require approval before becoming discoverable.In summary, AgentCore Identity provides the foundational proof of identity, Agent Registry solves discovery, and emerging trust frameworks like ANS aim to close the gap on multi-signal trust evaluation.
9. Cost tracking per tenant and observability
Accurate multi-tenant cost attribution requires application-level instrumentation that emits tenant-tagged metrics to a logging solution for every agent invocation, capturing I/O tokens, tool invocations, and execution duration. Structured logging with tenant context allows detailed analysis of usage patterns, performance bottlenecks, and capacity planning. AgentCore Observability provides real-time visibility into agent workflows with OpenTelemetry-compatible integration powered by Amazon CloudWatch, offering detailed visualizations of each step of agent execution.
10. Guardrails: Content safety
Multi-tenant guardrails enforce safety and compliance at three enforcement points. Pre-processing input guardrails validate user input before agent processing, blocking malicious prompts, prompt injections, and sanitizing PII based on tenant-specific compliance requirements such as HIPAA for healthcare and PCI-DSS for finance. Post-processing output guardrails validate agent responses for factual accuracy, detect hallucinations, confirm format compliance, and scan for sensitive data leakage across tenant boundaries. You can apply guardrails by tenant or tier, providing configurations for toxicity detection, content filtering, and cust
関連記事
Amazon Bedrock を活用した AI 搭載採用アシスタントの構築方法
Amazon Bedrock AgentCore で NLP を活用した AI パワー搭載のダッシュボード自動化エージェントを構築
Amazon SageMaker AI のサーバーレスモデルカスタマイズ機能で NVIDIA Nemotron 3 モデルのファインチューニングが可能に
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み