Interface AgentCollaboratorProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AgentCollaboratorProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:41:04.446Z")
@Stability(Experimental)
public interface AgentCollaboratorProps
extends software.amazon.jsii.JsiiSerializable
(experimental) **************************************************************************** PROPS - Agent Collaborator Class ***************************************************************************.
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 TypeInterfaceDescriptionstatic final classA builder forAgentCollaboratorPropsstatic final classAn implementation forAgentCollaboratorProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()(experimental) Descriptor for the collaborating agent.(experimental) Instructions on how this agent should collaborate with the main agent.(experimental) A friendly name for the collaborator.default Boolean(experimental) Whether to relay conversation history to this collaborator.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAgentAlias
(experimental) Descriptor for the collaborating agent.This cannot be the TSTALIASID (
agent.testAlias). -
getCollaborationInstruction
(experimental) Instructions on how this agent should collaborate with the main agent. -
getCollaboratorName
(experimental) A friendly name for the collaborator. -
getRelayConversationHistory
(experimental) Whether to relay conversation history to this collaborator.Default: - undefined (uses service default)
-
builder
- Returns:
- a
AgentCollaboratorProps.BuilderofAgentCollaboratorProps
-