Show / Hide Table of Contents

Class AgentCollaborator

(experimental) **************************************************************************** Agent Collaborator Class ***************************************************************************.

Inheritance
object
AgentCollaborator
Namespace: Amazon.CDK.AWS.Bedrock.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Alpha.dll
Syntax (csharp)
public class AgentCollaborator : DeputyBase
Syntax (vb)
Public Class AgentCollaborator Inherits DeputyBase
Remarks

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
// Create a specialized agent
             var customerSupportAgent = new Agent(this, "CustomerSupportAgent", new AgentProps {
                 Instruction = "You specialize in answering customer support questions.",
                 FoundationModel = BedrockFoundationModel.AMAZON_NOVA_LITE_V1
             });

             // Create an agent alias
             var customerSupportAlias = new AgentAlias(this, "CustomerSupportAlias", new AgentAliasProps {
                 Agent = customerSupportAgent,
                 AgentAliasName = "production"
             });

             // Create a main agent that collaborates with the specialized agent
             var mainAgent = new Agent(this, "MainAgent", new AgentProps {
                 Instruction = "You route specialized questions to other agents.",
                 FoundationModel = BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
                 AgentCollaboration = new Dictionary<string, object> {
                     { "type", AgentCollaboratorType.SUPERVISOR },
                     { "collaborators", new [] {
                         new AgentCollaborator(new AgentCollaboratorProps {
                             AgentAlias = customerSupportAlias,
                             CollaborationInstruction = "Route customer support questions to this agent.",
                             CollaboratorName = "CustomerSupport",
                             RelayConversationHistory = true
                         }) } }
                 }
             });

Synopsis

Constructors

AgentCollaborator(IAgentCollaboratorProps)

(experimental) **************************************************************************** Agent Collaborator Class ***************************************************************************.

Properties

AgentAlias

(experimental) The agent alias that this collaborator represents.

CollaborationInstruction

(experimental) Instructions on how this agent should collaborate with the main agent.

CollaboratorName

(experimental) A friendly name for the collaborator.

RelayConversationHistory

(experimental) Whether to relay conversation history to this collaborator.

Methods

Grant(IGrantable)

(experimental) Grants the given identity permissions to collaborate with the agent [disable-awslint:no-grants].

Constructors

AgentCollaborator(IAgentCollaboratorProps)

(experimental) **************************************************************************** Agent Collaborator Class ***************************************************************************.

public AgentCollaborator(IAgentCollaboratorProps props)
Parameters
props IAgentCollaboratorProps
Remarks

Stability: Experimental

Properties

AgentAlias

(experimental) The agent alias that this collaborator represents.

public virtual IAgentAlias AgentAlias { get; }
Property Value

IAgentAlias

Remarks

This is the agent that will be called upon for collaboration.

Stability: Experimental

CollaborationInstruction

(experimental) Instructions on how this agent should collaborate with the main agent.

public virtual string CollaborationInstruction { get; }
Property Value

string

Remarks

Stability: Experimental

CollaboratorName

(experimental) A friendly name for the collaborator.

public virtual string CollaboratorName { get; }
Property Value

string

Remarks

Stability: Experimental

RelayConversationHistory

(experimental) Whether to relay conversation history to this collaborator.

public virtual bool? RelayConversationHistory { get; }
Property Value

bool?

Remarks

Default: - undefined (uses service default)

Stability: Experimental

Methods

Grant(IGrantable)

(experimental) Grants the given identity permissions to collaborate with the agent [disable-awslint:no-grants].

public virtual Grant Grant(IGrantable grantee)
Parameters
grantee IGrantable

The principal to grant permissions to.

Returns

Grant

The Grant object

Remarks

Stability: Experimental

Back to top Generated by DocFX