Guide · Amazon Bedrock Agents · Multi-Agent Orchestration

Amazon Bedrock Multi-Agent Orchestration for MCP Servers — Supervisor Agents, Collaborator Routing, and Session Propagation

Amazon Bedrock Agents supports multi-agent collaboration where a supervisor agent routes sub-tasks to specialized collaborator agents. Each collaborator is a fully independent Bedrock Agent with its own action groups, knowledge bases, and foundation model — the supervisor treats them as opaque sub-agents it can invoke mid-orchestration. For MCP server platforms, this architecture enables a central orchestrator agent to delegate domain-specific tool calls to purpose-built agents, keeping each agent's context window focused on its specialty and avoiding the token-budget problems that come from loading all tools into a single agent.

TL;DR

Multi-agent collaboration in Bedrock uses a supervisor/collaborator model: create collaborators as normal Bedrock Agents with their own aliases, then call AssociateAgentCollaboratorCommand on the supervisor to register each one with a collaborationInstruction describing when to invoke it. The supervisor must be prepared with agentCollaboration: 'SUPERVISOR' (or 'SUPERVISOR_ROUTER' for pure routing without its own action groups). Invoke the supervisor with InvokeAgentCommand as normal — Bedrock transparently routes to collaborators when the supervisor's model decides to delegate. The first production gotcha: collaborator associations use alias IDs, not agent IDs — if you associate an agent ID directly, the routing silently fails. The second: each collaborator must be individually prepared before the supervisor can include it; a collaborator in NOT_PREPARED state causes the whole invocation to fail.

Why multi-agent orchestration matters for MCP platforms

A monolithic Bedrock Agent loaded with fifty action groups consumes tokens just listing available tools in its system prompt, leaving less space for reasoning and conversation history. The model also struggles to pick the right tool when too many are present — precision drops as the tool count grows beyond roughly fifteen to twenty tools in a single agent's context.

Multi-agent collaboration solves this by decomposing the tool surface. A supervisor agent can have a small number of specialized sub-agents: one for database queries, one for email operations, one for calendar management, one for file system access. The supervisor sees collaborators as high-level capabilities rather than individual tools, so its context stays manageable. Each collaborator maintains its own tool-specific context during delegation.

For MCP server developers, the pattern maps cleanly to MCP server boundaries: each collaborator agent corresponds to a distinct MCP server (a Postgres server, a filesystem server, a web search server). The supervisor agent acts as the router that understands user intent and delegates to the right MCP-backed agent. This avoids the alternative of flattening all MCP tools into a single Bedrock Agent — an approach that works at small scale but degrades at ten or more MCP servers.

Bedrock's multi-agent architecture is built into the managed orchestration runtime, so you do not need to implement the routing logic yourself. You declare the collaborators and their descriptions; the foundation model running the supervisor decides when and how to invoke each one.

Collaboration modes: SUPERVISOR vs SUPERVISOR_ROUTER

Bedrock Agents has two supervisor modes, controlled by the agentCollaboration field on the agent resource:

ModeSupervisor has own action groups?Supervisor has own knowledge bases?Use case
SUPERVISOR Yes Yes Supervisor can both handle requests itself and delegate to collaborators; mixed workloads
SUPERVISOR_ROUTER No No Pure routing agent; every request is delegated to a collaborator; maximally decoupled architecture
DISABLED Yes Yes Standard single agent; collaborator associations are not evaluated

SUPERVISOR_ROUTER produces a simpler system: the supervisor's sole job is intent classification and routing. This is the right choice when you have a clean domain decomposition and do not want the supervisor to execute any tools itself. Use SUPERVISOR when the supervisor needs fallback capabilities — for example, a general-purpose Q&A action group that handles requests that do not fit any specialist collaborator.

Set the mode when creating or updating the agent. The field is accepted in both CreateAgentCommand and UpdateAgentCommand:

import { BedrockAgentClient, CreateAgentCommand } from "@aws-sdk/client-bedrock-agent";

const client = new BedrockAgentClient({ region: "us-east-1" });

const { agent } = await client.send(new CreateAgentCommand({
  agentName: "platform-supervisor",
  agentResourceRoleArn: "arn:aws:iam::123456789012:role/BedrockAgentRole",
  foundationModel: "anthropic.claude-3-5-sonnet-20241022-v2:0",
  instruction: `You are a platform orchestrator. When a user asks about database operations,
delegate to the database-agent collaborator. When a user asks about file operations,
delegate to the filesystem-agent collaborator. For general questions, answer directly.`,
  agentCollaboration: "SUPERVISOR",  // or "SUPERVISOR_ROUTER"
  idleSessionTTLInSeconds: 1800
}));

Note that not all foundation models support the supervisor role. Claude 3 and 3.5 family models support multi-agent collaboration. Check the Bedrock documentation for your preferred model before deploying a supervisor — invoking a supervisor backed by an unsupported model returns a ValidationException during preparation, not at invoke time.

Building collaborator agents

Collaborator agents are ordinary Bedrock Agents. They do not require any special configuration to become collaborators — the association is defined on the supervisor, not on the collaborator. Build each collaborator agent with its own action groups, knowledge bases, instruction, and model, then prepare it and create a named alias.

// 1. Create the database collaborator agent
const { agent: dbAgent } = await client.send(new CreateAgentCommand({
  agentName: "database-agent",
  agentResourceRoleArn: "arn:aws:iam::123456789012:role/BedrockAgentRole",
  foundationModel: "anthropic.claude-3-haiku-20240307-v1:0",
  instruction: `You handle all database operations. You can run SQL queries, describe schemas,
and manage database connections. Always validate inputs before executing queries.`,
  idleSessionTTLInSeconds: 900
}));

// 2. Add action groups to the collaborator
await client.send(new CreateAgentActionGroupCommand({
  agentId: dbAgent.agentId,
  agentVersion: "DRAFT",
  actionGroupName: "DatabaseTools",
  actionGroupExecutor: {
    lambda: "arn:aws:lambda:us-east-1:123456789012:function:db-tools-handler"
  },
  functionSchema: {
    functions: [
      {
        name: "runQuery",
        description: "Execute a read-only SQL SELECT query against the database",
        parameters: {
          sql: { type: "string", description: "The SQL query to execute", required: true },
          database: { type: "string", description: "Target database name", required: true }
        }
      }
    ]
  }
}));

// 3. Prepare the agent (required before creating alias or associating)
await client.send(new PrepareAgentCommand({
  agentId: dbAgent.agentId
}));

// 4. Create a named alias — this alias ID is what gets used in the supervisor association
const { agentAlias: dbAlias } = await client.send(new CreateAgentAliasCommand({
  agentId: dbAgent.agentId,
  agentAliasName: "v1",
  routingConfiguration: [{ agentVersion: "1" }]
}));

Wait for the alias status to reach PREPARED before proceeding to the supervisor association. The alias transitions asynchronously — poll GetAgentAliasCommand until agentAliasStatus is PREPARED. Attempting to associate an alias that is still in CREATING state returns a ConflictException.

Associating collaborators with the supervisor

Use AssociateAgentCollaboratorCommand to register each collaborator with the supervisor. The key fields are agentDescriptor (the collaborator's alias ARN), collaborationInstruction (how the supervisor should decide to invoke this collaborator), and collaboratorName (a logical name the supervisor's model references in its reasoning).

import { AssociateAgentCollaboratorCommand } from "@aws-sdk/client-bedrock-agent";

// Associate the database collaborator with the supervisor
await client.send(new AssociateAgentCollaboratorCommand({
  agentId: supervisorAgent.agentId,
  agentVersion: "DRAFT",
  agentDescriptor: {
    // Use the alias ARN, not the agent ARN — this is the most common mistake
    aliasArn: `arn:aws:bedrock:us-east-1:123456789012:agent-alias/${dbAgent.agentId}/${dbAlias.agentAliasId}`
  },
  collaborationInstruction: `Delegate to this agent for all database operations: running SQL queries,
retrieving schema information, checking connection health, and managing database users.
This agent has access to the production PostgreSQL database.`,
  collaboratorName: "DatabaseSpecialist",
  relayConversationHistory: "TO_COLLABORATOR"  // or "DISABLED"
}));

The relayConversationHistory field controls whether the supervisor passes the full conversation history to the collaborator when delegating:

After associating all collaborators, re-prepare the supervisor agent. The preparation step updates the supervisor's orchestration manifest with the current collaborator list — without re-preparation, the new associations are not visible to the runtime.

// Re-prepare supervisor after all collaborator associations
await client.send(new PrepareAgentCommand({
  agentId: supervisorAgent.agentId
}));

// Wait for PREPARED status
let supervisorStatus = "PREPARING";
while (supervisorStatus !== "PREPARED") {
  await new Promise(r => setTimeout(r, 2000));
  const { agent } = await client.send(new GetAgentCommand({
    agentId: supervisorAgent.agentId
  }));
  supervisorStatus = agent.agentStatus;
}

// Create supervisor alias
const { agentAlias: supervisorAlias } = await client.send(new CreateAgentAliasCommand({
  agentId: supervisorAgent.agentId,
  agentAliasName: "prod-v1",
  routingConfiguration: [{ agentVersion: "1" }]
}));

Invoking the multi-agent system

Once configured, invoke the supervisor exactly as you would a single agent using InvokeAgentCommand from the @aws-sdk/client-bedrock-agent-runtime package. The routing to collaborators is fully transparent to the caller.

import {
  BedrockAgentRuntimeClient,
  InvokeAgentCommand
} from "@aws-sdk/client-bedrock-agent-runtime";

const runtime = new BedrockAgentRuntimeClient({ region: "us-east-1" });

const response = await runtime.send(new InvokeAgentCommand({
  agentId: supervisorAgent.agentId,
  agentAliasId: supervisorAlias.agentAliasId,
  sessionId: "user-session-abc123",
  inputText: "Show me the five most recent orders from the orders table",
  enableTrace: true  // Returns orchestration traces including collaborator routing decisions
}));

// Consume the response stream
let finalAnswer = "";
for await (const event of response.completion) {
  if (event.chunk?.bytes) {
    finalAnswer += new TextDecoder().decode(event.chunk.bytes);
  }
  // Trace events reveal which collaborator was invoked and why
  if (event.trace?.trace?.orchestrationTrace?.observation) {
    const obs = event.trace.trace.orchestrationTrace.observation;
    console.log("Collaborator routing:", obs.agentCollaboratorInvocationOutput);
  }
}

The trace output includes agentCollaboratorInvocationOutput events that show which collaborator was selected, what input was sent to it, and what it returned. Enable traces during development to verify that routing is working as expected. Each collaborator invocation appears as a nested trace within the supervisor's orchestration trace.

Session propagation and isolation

The supervisor passes the same sessionId to collaborators by default, which means the collaborator and supervisor share session context within the same user conversation. This enables the collaborator to reference earlier turns from the same session when relayConversationHistory: 'TO_COLLABORATOR' is set.

Important session behaviors to understand:

MCP server integration pattern

Multi-agent collaboration maps directly onto a multi-MCP-server architecture. Each MCP server becomes a collaborator agent backed by Lambda action groups that proxy MCP tool calls:

// Lambda handler for a collaborator backed by an MCP server
export const handler = async (event) => {
  const { function: functionName, parameters } = event.actionGroup === "MCPTools"
    ? event
    : { function: event.function, parameters: event.parameters };

  // Parse parameters from Bedrock's key-value format
  const args = Object.fromEntries(
    (parameters || []).map(p => [p.name, p.value])
  );

  // Forward to MCP server
  const mcpResponse = await mcpClient.callTool(functionName, args);

  return {
    messageVersion: "1.0",
    response: {
      actionGroup: event.actionGroup,
      function: functionName,
      functionResponse: {
        responseBody: {
          TEXT: { body: JSON.stringify(mcpResponse.content) }
        }
      }
    }
  };
};

With this pattern, adding a new MCP server to your platform means: create a new collaborator agent with that server's Lambda handler, associate it with the supervisor, and re-prepare the supervisor. No changes to the supervisor's instruction or action groups are required — the collaborator's collaborationInstruction and collaboratorName tell the supervisor's model when to delegate to the new agent.

Common failures and diagnostics

SymptomRoot causeFix
Supervisor never routes to a collaborator despite matching requests collaborationInstruction is too vague or conflicts with supervisor instruction Make collaborationInstruction domain-specific with concrete examples. Use enableTrace: true to see the supervisor's routing decision in orchestrationTrace.
ConflictException on AssociateAgentCollaboratorCommand Collaborator alias is still in CREATING state Poll GetAgentAliasCommand until agentAliasStatus === 'PREPARED' before associating.
Collaborator routing silently fails; supervisor handles all requests itself aliasArn in agentDescriptor points to agent ARN instead of alias ARN Alias ARN format: arn:aws:bedrock:{region}:{account}:agent-alias/{agentId}/{aliasId}. Agent ARN format: arn:aws:bedrock:{region}:{account}:agent/{agentId} — do not use the agent ARN.
ValidationException: Agent not prepared on supervisor invocation Supervisor was not re-prepared after adding collaborator associations Call PrepareAgentCommand on the supervisor every time collaborators are added, removed, or updated.
High latency on routed requests Collaborator cold-start + supervisor-to-collaborator network round-trip Use SUPERVISOR_ROUTER mode with pre-warmed collaborator aliases using provisioned throughput; or use on-demand invocation but set user expectations for first-request latency.
ServiceQuotaExceededException during parallel invocations Parallel collaborator invocations multiply TPS against quota Request quota increases for Bedrock Agents invocation TPS, or limit the supervisor to sequential collaborator routing by using a model that does not parallelize tool calls.

Listing and managing collaborator associations

Use ListAgentCollaboratorsCommand to audit which collaborators are registered with a supervisor agent version. The command returns the full set of associations including their collaborationInstruction, collaboratorName, and the target alias ARN.

import { ListAgentCollaboratorsCommand } from "@aws-sdk/client-bedrock-agent";

const { agentCollaboratorSummaries } = await client.send(
  new ListAgentCollaboratorsCommand({
    agentId: supervisorAgent.agentId,
    agentVersion: "DRAFT"
  })
);

for (const collab of agentCollaboratorSummaries) {
  console.log(collab.collaboratorName, collab.agentDescriptor.aliasArn);
}

To remove a collaborator, use DisassociateAgentCollaboratorCommand with the collaboratorId (returned in the association summary). After disassociation, re-prepare the supervisor. Note that disassociating a collaborator does not delete the collaborator agent itself — the agent and its alias continue to exist independently and can be re-associated later or invoked directly.

Versioning: once a supervisor agent version is published (not DRAFT), its collaborator associations are immutable. To change the collaborator set, update the DRAFT version, re-prepare, and publish a new version. Update the supervisor alias routing configuration to point to the new version.

IAM requirements for multi-agent collaboration

The supervisor agent's IAM execution role must have bedrock:InvokeAgent permission on the collaborator agent aliases. Without this permission, the supervisor can be prepared successfully, but delegation fails at runtime with an AccessDeniedException in the trace.

{
  "Effect": "Allow",
  "Action": "bedrock:InvokeAgent",
  "Resource": [
    "arn:aws:bedrock:us-east-1:123456789012:agent-alias/DBAGENTID/*",
    "arn:aws:bedrock:us-east-1:123456789012:agent-alias/FSAGENTID/*"
  ]
}

Use a wildcard on the alias ID suffix (/*) so the permission covers all current and future alias versions for each collaborator agent. If you use specific alias IDs, the supervisor's execution role needs updating every time you create a new alias version for a collaborator.

Each collaborator agent's execution role needs its own permissions for its action groups (Lambda invoke, Bedrock model access, knowledge base query). These are independent of the supervisor's role — the collaborator runs under its own IAM role when invoked by the supervisor.