Class AgentCollaboration
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.AgentCollaboration
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:49.440Z")
@Stability(Experimental)
public class AgentCollaboration
extends software.amazon.jsii.JsiiObject
(experimental) Class to manage agent collaboration configuration.
Example:
// Create a specialized agent
Agent customerSupportAgent = Agent.Builder.create(this, "CustomerSupportAgent")
.instruction("You specialize in answering customer support questions.")
.foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
.build();
// Create an agent alias
AgentAlias customerSupportAlias = AgentAlias.Builder.create(this, "CustomerSupportAlias")
.agent(customerSupportAgent)
.agentAliasName("production")
.build();
// Create a main agent that collaborates with the specialized agent
Agent mainAgent = Agent.Builder.create(this, "MainAgent")
.instruction("You route specialized questions to other agents.")
.foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
.agentCollaboration(Map.of(
"type", AgentCollaboratorType.SUPERVISOR,
"collaborators", List.of(
AgentCollaborator.Builder.create()
.agentAlias(customerSupportAlias)
.collaborationInstruction("Route customer support questions to this agent.")
.collaboratorName("CustomerSupport")
.relayConversationHistory(true)
.build())))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forAgentCollaboration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAgentCollaboration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAgentCollaboration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescription(experimental) Collaborators that this agent will work with.getType()(experimental) The collaboration type for the agent.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
AgentCollaboration
protected AgentCollaboration(software.amazon.jsii.JsiiObjectRef objRef) -
AgentCollaboration
protected AgentCollaboration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
AgentCollaboration
- Parameters:
config- This parameter is required.
-
-
Method Details
-
getCollaborators
(experimental) Collaborators that this agent will work with. -
getType
(experimental) The collaboration type for the agent.
-