Show / Hide Table of Contents

Class AgentActionGroup

(experimental) **************************************************************************** DEF - Action Group Class ***************************************************************************.

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

Stability: Experimental

ExampleMetadata: fixture=default infused

Examples
var bucket = Bucket.FromBucketName(this, "ExistingBucket", "my-schema-bucket");
             var s3Schema = ApiSchema.FromS3File(bucket, "schemas/action-group.yaml");

             var actionGroupFunction = new Function(this, "ActionGroupFunction", new FunctionProps {
                 Runtime = Runtime.PYTHON_3_12,
                 Handler = "index.handler",
                 Code = Code.FromAsset(Join(__dirname, "../lambda/action-group"))
             });

             var actionGroup = new AgentActionGroup(new AgentActionGroupProps {
                 Name = "query-library",
                 Description = "Use these functions to get information about the books in the library.",
                 Executor = ActionGroupExecutor.FromLambda(actionGroupFunction),
                 Enabled = true,
                 ApiSchema = s3Schema
             });

             var agent = new Agent(this, "Agent", new AgentProps {
                 FoundationModel = BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0,
                 Instruction = "You are a helpful and friendly agent that answers questions about literature."
             });

             agent.AddActionGroup(actionGroup);

Synopsis

Constructors

AgentActionGroup(IAgentActionGroupProps)

(experimental) **************************************************************************** DEF - Action Group Class ***************************************************************************.

Properties

ApiSchema

(experimental) The api schema for this action group (if defined).

Description

(experimental) A description of the action group.

Enabled

(experimental) Whether this action group is available for the agent to invoke or not.

Executor

(experimental) The action group executor for this action group (if defined).

ForceDelete

(experimental) Whether to delete the resource even if it's in use.

FunctionSchema

(experimental) The function schema for this action group (if defined).

Name

(experimental) The name of the action group.

ParentActionGroupSignature

(experimental) The AWS Defined signature (if defined).

Methods

CodeInterpreter(bool)

(experimental) Defines an action group that allows your agent to request the user for additional information when trying to complete a task.

UserInput(bool)

(experimental) Defines an action group that allows your agent to request the user for additional information when trying to complete a task.

Constructors

AgentActionGroup(IAgentActionGroupProps)

(experimental) **************************************************************************** DEF - Action Group Class ***************************************************************************.

public AgentActionGroup(IAgentActionGroupProps props)
Parameters
props IAgentActionGroupProps
Remarks

Stability: Experimental

Properties

ApiSchema

(experimental) The api schema for this action group (if defined).

public virtual ApiSchema? ApiSchema { get; }
Property Value

ApiSchema

Remarks

Stability: Experimental

Description

(experimental) A description of the action group.

public virtual string? Description { get; }
Property Value

string

Remarks

Stability: Experimental

Enabled

(experimental) Whether this action group is available for the agent to invoke or not.

public virtual bool Enabled { get; }
Property Value

bool

Remarks

Stability: Experimental

Executor

(experimental) The action group executor for this action group (if defined).

public virtual ActionGroupExecutor? Executor { get; }
Property Value

ActionGroupExecutor

Remarks

Stability: Experimental

ForceDelete

(experimental) Whether to delete the resource even if it's in use.

public virtual bool? ForceDelete { get; }
Property Value

bool?

Remarks

Stability: Experimental

FunctionSchema

(experimental) The function schema for this action group (if defined).

public virtual FunctionSchema? FunctionSchema { get; }
Property Value

FunctionSchema

Remarks

Stability: Experimental

Name

(experimental) The name of the action group.

public virtual string Name { get; }
Property Value

string

Remarks

Stability: Experimental

ParentActionGroupSignature

(experimental) The AWS Defined signature (if defined).

public virtual ParentActionGroupSignature? ParentActionGroupSignature { get; }
Property Value

ParentActionGroupSignature

Remarks

Stability: Experimental

Methods

CodeInterpreter(bool)

(experimental) Defines an action group that allows your agent to request the user for additional information when trying to complete a task.

public static AgentActionGroup CodeInterpreter(bool enabled)
Parameters
enabled bool

Specifies whether the action group is available for the agent.

Returns

AgentActionGroup

Remarks

Stability: Experimental

UserInput(bool)

(experimental) Defines an action group that allows your agent to request the user for additional information when trying to complete a task.

public static AgentActionGroup UserInput(bool enabled)
Parameters
enabled bool

Specifies whether the action group is available for the agent.

Returns

AgentActionGroup

Remarks

Stability: Experimental

Back to top Generated by DocFX