Skip to main content

agent_action_groups

Creates, updates, deletes, gets or lists an agent_action_groups resource.

Overview

Nameagent_action_groups
TypeResource
Idaws.bedrock_agent.agent_action_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
action_group_executorobjectContains 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_idstringThe unique identifier of the action group. (pattern: <code>[0-9a-zA-Z]{10}</code>)
action_group_namestringThe name of the action group. (pattern: <code>([0-9a-zA-Z][_-]?){1,100}</code>)
action_group_statestringSpecifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request. (ENABLED, DISABLED)
agent_idstringThe unique identifier of the agent to which the action group belongs. (pattern: <code>[0-9a-zA-Z]{10}</code>)
agent_versionstringThe 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_schemaobjectContains 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_tokenstringA 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_atstring (date-time)The time at which the action group was created.
descriptionstringThe description of the action group.
function_schemaobjectDefines 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_paramsobjectThe 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_signaturestringIf 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_atstring (date-time)The time at which the action group was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_agent_action_groupselectagent_id, agent_version, action_group_id, regionGets information about an action group for an agent.
list_agent_action_groupsselectagent_id, agent_version, regionLists the action groups for an agent and information about each one.
create_agent_action_groupinsertagent_id, agent_version, region, actionGroupNameCreates 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_groupupdateagent_id, agent_version, action_group_id, region, actionGroupNameUpdates the configuration for an action group for an agent.
delete_agent_action_groupdeleteagent_id, agent_version, action_group_id, regionskipResourceInUseCheckDeletes 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.

NameDatatypeDescription
action_group_idstringThe unique identifier of the action group to delete.
agent_idstringThe unique identifier of the agent that the action group belongs to.
agent_versionstringThe version of the agent that the action group belongs to.
regionstringAWS region (default: us-east-1)
skipResourceInUseCheckbooleanBy 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

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
;

INSERT examples

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
;

UPDATE examples

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

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 }}'
;