Class ActionGroupExecutor
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.ActionGroupExecutor
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:41:04.436Z")
@Stability(Experimental)
public class ActionGroupExecutor
extends software.amazon.jsii.JsiiObject
(experimental) Defines how fulfillment of the action group is handled after the necessary information has been elicited from the user.
Valid executors are:
- Lambda function
- Return Control
Example:
IBucket bucket = Bucket.fromBucketName(this, "ExistingBucket", "my-schema-bucket");
S3ApiSchema s3Schema = ApiSchema.fromS3File(bucket, "schemas/action-group.yaml");
Function actionGroupFunction = Function.Builder.create(this, "ActionGroupFunction")
.runtime(Runtime.PYTHON_3_12)
.handler("index.handler")
.code(Code.fromAsset(join(__dirname, "../lambda/action-group")))
.build();
AgentActionGroup actionGroup = AgentActionGroup.Builder.create()
.name("query-library")
.description("Use these functions to get information about the books in the library.")
.executor(ActionGroupExecutor.fromLambda(actionGroupFunction))
.enabled(true)
.apiSchema(s3Schema)
.build();
Agent agent = Agent.Builder.create(this, "Agent")
.foundationModel(BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0)
.instruction("You are a helpful and friendly agent that answers questions about literature.")
.build();
agent.addActionGroup(actionGroup);
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ActionGroupExecutor(experimental) Returns the action group invocation results directly in the InvokeAgent response. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedActionGroupExecutor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedActionGroupExecutor(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic ActionGroupExecutorfromLambda(IFunction lambdaFunction) (experimental) Defines an action group with a Lambda function containing the business logic.(experimental) The custom control type for the action group executor.(experimental) The Lambda function that will be called by the action group.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
-
Field Details
-
RETURN_CONTROL
(experimental) Returns the action group invocation results directly in the InvokeAgent response.The information and parameters can be sent to your own systems to yield results.
- See Also:
-
-
Constructor Details
-
ActionGroupExecutor
protected ActionGroupExecutor(software.amazon.jsii.JsiiObjectRef objRef) -
ActionGroupExecutor
protected ActionGroupExecutor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromLambda
@Stability(Experimental) @NotNull public static ActionGroupExecutor fromLambda(@NotNull IFunction lambdaFunction) (experimental) Defines an action group with a Lambda function containing the business logic.- Parameters:
lambdaFunction-- Lambda function to be called by the action group.
- See Also:
-
getCustomControl
(experimental) The custom control type for the action group executor.Currently only supports 'RETURN_CONTROL' which returns results directly in the InvokeAgent response.
-
getLambdaFunction
(experimental) The Lambda function that will be called by the action group.Contains the business logic for handling the action group's invocation.
-