agent_action_groups
Creates, updates, deletes, gets or lists an agent_action_groups resource.
Overview
| Name | agent_action_groups |
| Type | Resource |
| Id | aws.bedrock_agent.agent_action_groups |
Fields
The following fields are returned by SELECT queries:
- get_agent_action_group
- list_agent_action_groups
| Name | Datatype | Description |
|---|---|---|
action_group_executor | object | Contains details about the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user. |
action_group_id | string | The unique identifier of the action group. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
action_group_name | string | The name of the action group. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
action_group_state | string | Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. (ENABLED, DISABLED) |
agent_id | string | The unique identifier of the agent to which the action group belongs. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
agent_version | string | The version of the agent to which the action group belongs. (pattern: <code>(DRAFT|[0-9]{0,4}[1-9][0-9]{0,4})</code>) |
api_schema | object | Contains details about the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. You can either include the schema directly in the payload field or you can upload it to an S3 bucket and specify the S3 bucket location in the s3 field. |
client_token | string | A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,256}</code>) |
created_at | string (date-time) | The time at which the action group was created. |
description | string | The description of the action group. |
function_schema | object | Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group. This data type is used in the following API operations: CreateAgentActionGroup request CreateAgentActionGroup response UpdateAgentActionGroup request UpdateAgentActionGroup response GetAgentActionGroup response |
parent_action_group_signature_params | object | The configuration settings for a computer use action. Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools. |
parent_action_signature | string | If this field is set as AMAZON.UserInput, the agent can request the user for additional information when trying to complete a task. The description, apiSchema, and actionGroupExecutor fields must be blank for this action group. During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. (AMAZON.UserInput, AMAZON.CodeInterpreter, ANTHROPIC.Computer, ANTHROPIC.Bash, ANTHROPIC.TextEditor) |
updated_at | string (date-time) | The time at which the action group was last updated. |
| Name | Datatype | Description |
|---|---|---|
action_group_id | string | The unique identifier of the action group. (pattern: <code>[0-9a-zA-Z]{10}</code>) |
action_group_name | string | The name of the action group. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>) |
action_group_state | string | Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. (ENABLED, DISABLED) |
description | string | The description of the action group. |
updated_at | string (date-time) | The time at which the action group was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_agent_action_group | select | agent_id, agent_version, action_group_id, region | Gets information about an action group for an agent. | |
list_agent_action_groups | select | agent_id, agent_version, region | Lists the action groups for an agent and information about each one. | |
create_agent_action_group | insert | agent_id, agent_version, region, actionGroupName | Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them. To allow your agent to request the user for additional information when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.UserInput. To allow your agent to generate, run, and troubleshoot code when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.CodeInterpreter. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information. | |
update_agent_action_group | update | agent_id, agent_version, action_group_id, region, actionGroupName | Updates the configuration for an action group for an agent. | |
delete_agent_action_group | delete | agent_id, agent_version, action_group_id, region | skipResourceInUseCheck | Deletes an action group in an agent. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
action_group_id | string | The unique identifier of the action group to delete. |
agent_id | string | The unique identifier of the agent that the action group belongs to. |
agent_version | string | The version of the agent that the action group belongs to. |
region | string | AWS region (default: us-east-1) |
skipResourceInUseCheck | boolean | By default, this value is false and deletion is stopped if the resource is in use. If you set it to true, the resource will be deleted even if the resource is in use. |
SELECT examples
- get_agent_action_group
- list_agent_action_groups
Gets information about an action group for an agent.
SELECT
action_group_executor,
action_group_id,
action_group_name,
action_group_state,
agent_id,
agent_version,
api_schema,
client_token,
created_at,
description,
function_schema,
parent_action_group_signature_params,
parent_action_signature,
updated_at
FROM aws.bedrock_agent.agent_action_groups
WHERE agent_id = '{{ agent_id }}' -- required
AND agent_version = '{{ agent_version }}' -- required
AND action_group_id = '{{ action_group_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the action groups for an agent and information about each one.
SELECT
action_group_id,
action_group_name,
action_group_state,
description,
updated_at
FROM aws.bedrock_agent.agent_action_groups
WHERE agent_id = '{{ agent_id }}' -- required
AND agent_version = '{{ agent_version }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_agent_action_group
- Manifest
Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them. To allow your agent to request the user for additional information when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.UserInput. To allow your agent to generate, run, and troubleshoot code when trying to complete a task, add an action group with the parentActionGroupSignature field set to AMAZON.CodeInterpreter. You must leave the description, apiSchema, and actionGroupExecutor fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
INSERT INTO aws.bedrock_agent.agent_action_groups (
actionGroupName,
clientToken,
description,
parentActionGroupSignature,
parentActionGroupSignatureParams,
actionGroupExecutor,
apiSchema,
actionGroupState,
functionSchema,
agent_id,
agent_version,
region
)
SELECT
'{{ actionGroupName }}' /* required */,
'{{ clientToken }}',
'{{ description }}',
'{{ parentActionGroupSignature }}',
'{{ parentActionGroupSignatureParams }}',
'{{ actionGroupExecutor }}',
'{{ apiSchema }}',
'{{ actionGroupState }}',
'{{ functionSchema }}',
'{{ agent_id }}',
'{{ agent_version }}',
'{{ region }}'
RETURNING
agent_action_group
;
# Description fields are for documentation purposes
- name: agent_action_groups
props:
- name: agent_id
value: "{{ agent_id }}"
description: Required parameter for the agent_action_groups resource.
- name: agent_version
value: "{{ agent_version }}"
description: Required parameter for the agent_action_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the agent_action_groups resource.
- name: actionGroupName
value: "{{ actionGroupName }}"
- name: clientToken
value: "{{ clientToken }}"
- name: description
value: "{{ description }}"
- name: parentActionGroupSignature
value: "{{ parentActionGroupSignature }}"
valid_values: ['AMAZON.UserInput', 'AMAZON.CodeInterpreter', 'ANTHROPIC.Computer', 'ANTHROPIC.Bash', 'ANTHROPIC.TextEditor']
- name: parentActionGroupSignatureParams
value: "{{ parentActionGroupSignatureParams }}"
- name: actionGroupExecutor
description: |
Contains details about the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.
value:
lambda: "{{ lambda }}"
customControl: "{{ customControl }}"
- name: apiSchema
description: |
Contains details about the OpenAPI schema for the action group. For more information, see Action group OpenAPI schemas. You can either include the schema directly in the payload field or you can upload it to an S3 bucket and specify the S3 bucket location in the s3 field.
value:
s3:
s3BucketName: "{{ s3BucketName }}"
s3ObjectKey: "{{ s3ObjectKey }}"
payload: "{{ payload }}"
- name: actionGroupState
value: "{{ actionGroupState }}"
valid_values: ['ENABLED', 'DISABLED']
- name: functionSchema
description: |
Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group. This data type is used in the following API operations: CreateAgentActionGroup request CreateAgentActionGroup response UpdateAgentActionGroup request UpdateAgentActionGroup response GetAgentActionGroup response
value:
functions:
- name: "{{ name }}"
description: "{{ description }}"
parameters: "{{ parameters }}"
requireConfirmation: "{{ requireConfirmation }}"
UPDATE examples
- update_agent_action_group
Updates the configuration for an action group for an agent.
UPDATE aws.bedrock_agent.agent_action_groups
SET
actionGroupName = '{{ actionGroupName }}',
description = '{{ description }}',
parentActionGroupSignature = '{{ parentActionGroupSignature }}',
parentActionGroupSignatureParams = '{{ parentActionGroupSignatureParams }}',
actionGroupExecutor = '{{ actionGroupExecutor }}',
actionGroupState = '{{ actionGroupState }}',
apiSchema = '{{ apiSchema }}',
functionSchema = '{{ functionSchema }}'
WHERE
agent_id = '{{ agent_id }}' --required
AND agent_version = '{{ agent_version }}' --required
AND action_group_id = '{{ action_group_id }}' --required
AND region = '{{ region }}' --required
AND actionGroupName = '{{ actionGroupName }}' --required
RETURNING
agent_action_group;
DELETE examples
- delete_agent_action_group
Deletes an action group in an agent.
DELETE FROM aws.bedrock_agent.agent_action_groups
WHERE agent_id = '{{ agent_id }}' --required
AND agent_version = '{{ agent_version }}' --required
AND action_group_id = '{{ action_group_id }}' --required
AND region = '{{ region }}' --required
AND skipResourceInUseCheck = '{{ skipResourceInUseCheck }}'
;