> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# AgentActionGroupProps

****************************************************************************                        PROPS - Action Group Class ***************************************************************************.

Used as props by: [AgentActionGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.AgentActionGroup.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`bedrock/agents/action-group.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/agents/action-group.ts#L45)

## Example

TypeScript:

```ts
const bucket = s3.Bucket.fromBucketName(this, 'ExistingBucket', 'my-schema-bucket');
const s3Schema = bedrock.ApiSchema.fromS3File(bucket, 'schemas/action-group.yaml');

const actionGroupFunction = new lambda.Function(this, 'ActionGroupFunction', {
  runtime: lambda.Runtime.PYTHON_3_12,
  handler: 'index.handler',
  code: lambda.Code.fromAsset(path.join(__dirname, '../lambda/action-group')),
});

const actionGroup = new bedrock.AgentActionGroup({
  name: 'query-library',
  description: 'Use these functions to get information about the books in the library.',
  executor: bedrock.ActionGroupExecutor.fromLambda(actionGroupFunction),
  enabled: true,
  apiSchema: s3Schema,
});

const agent = new bedrock.Agent(this, 'Agent', {
  foundationModel: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0,
  instruction: 'You are a helpful and friendly agent that answers questions about literature.',
});

agent.addActionGroup(actionGroup);
```

Python:

```python
bucket = s3.Bucket.from_bucket_name(self, "ExistingBucket", "my-schema-bucket")
s3_schema = bedrock.ApiSchema.from_s3_file(bucket, "schemas/action-group.yaml")

action_group_function = lambda_.Function(self, "ActionGroupFunction",
    runtime=lambda_.Runtime.PYTHON_3_12,
    handler="index.handler",
    code=lambda_.Code.from_asset(path.join(__dirname, "../lambda/action-group"))
)

action_group = bedrock.AgentActionGroup(
    name="query-library",
    description="Use these functions to get information about the books in the library.",
    executor=bedrock.ActionGroupExecutor.from_lambda(action_group_function),
    enabled=True,
    api_schema=s3_schema
)

agent = bedrock.Agent(self, "Agent",
    foundation_model=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_HAIKU_V1_0,
    instruction="You are a helpful and friendly agent that answers questions about literature."
)

agent.add_action_group(action_group)
```

Java:

```java
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);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
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);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
bucket := s3.Bucket_FromBucketName(this, jsii.String("ExistingBucket"), jsii.String("my-schema-bucket"))
s3Schema := bedrock.ApiSchema_FromS3File(bucket, jsii.String("schemas/action-group.yaml"))

actionGroupFunction := lambda.NewFunction(this, jsii.String("ActionGroupFunction"), &FunctionProps{
	Runtime: lambda.Runtime_PYTHON_3_12(),
	Handler: jsii.String("index.handler"),
	Code: lambda.Code_FromAsset(path.join(__dirname, jsii.String("../lambda/action-group"))),
})

actionGroup := bedrock.NewAgentActionGroup(&AgentActionGroupProps{
	Name: jsii.String("query-library"),
	Description: jsii.String("Use these functions to get information about the books in the library."),
	Executor: bedrock.ActionGroupExecutor_FromLambda(actionGroupFunction),
	Enabled: jsii.Boolean(true),
	ApiSchema: s3Schema,
})

agent := bedrock.NewAgent(this, jsii.String("Agent"), &AgentProps{
	FoundationModel: bedrock.BedrockFoundationModel_ANTHROPIC_CLAUDE_HAIKU_V1_0(),
	Instruction: jsii.String("You are a helpful and friendly agent that answers questions about literature."),
})

agent.AddActionGroup(actionGroup)
```

## Properties

- `apiSchema`: [ApiSchema](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.ApiSchema.html) — The API Schema defining the functions available to the agent.

  **Default:** undefined - No API Schema is provided

- `description`: string — A description of the action group.

  **Default:** undefined - No description is provided

- `enabled`: boolean — Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.

  **Default:** true - The action group is enabled

- `executor`: [ActionGroupExecutor](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.ActionGroupExecutor.html) — The action group executor that implements the API functions.

  **Default:** undefined - No executor is provided

- `forceDelete`: boolean — Specifies whether to delete the resource even if it's in use.

  **Default:** false - The resource will not be deleted if it's in use

- `functionSchema`: [FunctionSchema](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.FunctionSchema.html) — Defines functions that each define parameters that the agent needs to invoke from the user.

  **Default:** undefined - No function schema is provided

  NO L2 yet as this doesn't make much sense IMHO.

- `name`: string — The name of the action group.

  **Default:** A unique name is generated in the format 'action_group_quick_start_UUID'

- `parentActionGroupSignature`: [ParentActionGroupSignature](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.ParentActionGroupSignature.html) — The AWS Defined signature for enabling certain capabilities in your agent.

  **Default:** undefined - No parent action group signature is provided

  When this property is specified, you must leave the description, apiSchema,
  and actionGroupExecutor fields blank for this action group.
