UpdateAgentActionGroup - Amazon Bedrock

UpdateAgentActionGroup

Updates the configuration for an action group for an agent.

Request Syntax

PUT /agents/agentId/agentversions/agentVersion/actiongroups/actionGroupId/ HTTP/1.1 Content-type: application/json { "actionGroupExecutor": { ... }, "actionGroupName": "string", "actionGroupState": "string", "apiSchema": { ... }, "description": "string", "functionSchema": { ... }, "parentActionGroupSignature": "string", "parentActionGroupSignatureParams": { "string" : "string" } }

URI Request Parameters

The request uses the following URI parameters.

actionGroupId

The unique identifier of the action group.

Pattern: ^[0-9a-zA-Z]{10}$

Required: Yes

agentId

The unique identifier of the agent for which to update the action group.

Pattern: ^[0-9a-zA-Z]{10}$

Required: Yes

agentVersion

The unique identifier of the agent version for which to update the action group.

Length Constraints: Fixed length of 5.

Pattern: ^DRAFT$

Required: Yes

Request Body

The request accepts the following data in JSON format.

actionGroupExecutor

The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.

Type: ActionGroupExecutor object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: No

actionGroupName

Specifies a new name for the action group.

Type: String

Pattern: ^([0-9a-zA-Z][_-]?){1,100}$

Required: Yes

actionGroupState

Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.

Type: String

Valid Values: ENABLED | DISABLED

Required: No

apiSchema

Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see Action group OpenAPI schemas.

Type: APISchema object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: No

description

Specifies a new name for the action group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 200.

Required: No

functionSchema

Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.

Type: FunctionSchema object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: No

parentActionGroupSignature

Update the built-in or computer use action for this action group. If you specify a value, you must leave the description, apiSchema, and actionGroupExecutor fields empty for this action group.

  • To allow your agent to request the user for additional information when trying to complete a task, set this field to AMAZON.UserInput.

  • To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to AMAZON.CodeInterpreter.

  • To allow your agent to use an Anthropic computer use tool, specify one of the following values.

    Important

    Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. When operating computer use functionality, we recommend taking additional security precautions, such as executing computer actions in virtual environments with restricted data access and limited internet connectivity. For more information, see Configure an Amazon Bedrock Agent to complete tasks with computer use tools.

    • ANTHROPIC.Computer - Gives the agent permission to use the mouse and keyboard and take screenshots.

    • ANTHROPIC.TextEditor - Gives the agent permission to view, create and edit files.

    • ANTHROPIC.Bash - Gives the agent permission to run commands in a bash shell.

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.

Type: String

Valid Values: AMAZON.UserInput | AMAZON.CodeInterpreter | ANTHROPIC.Computer | ANTHROPIC.Bash | ANTHROPIC.TextEditor

Required: No

parentActionGroupSignatureParams

The configuration settings for a computer use action.

Important

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.

Type: String to string map

Key Length Constraints: Minimum length of 0. Maximum length of 100.

Value Length Constraints: Minimum length of 0. Maximum length of 100.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "agentActionGroup": { "actionGroupExecutor": { ... }, "actionGroupId": "string", "actionGroupName": "string", "actionGroupState": "string", "agentId": "string", "agentVersion": "string", "apiSchema": { ... }, "clientToken": "string", "createdAt": "string", "description": "string", "functionSchema": { ... }, "parentActionGroupSignatureParams": { "string" : "string" }, "parentActionSignature": "string", "updatedAt": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

agentActionGroup

Contains details about the action group that was updated.

Type: AgentActionGroup object

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

The request is denied because of missing access permissions.

HTTP Status Code: 403

ConflictException

There was a conflict performing an operation.

HTTP Status Code: 409

InternalServerException

An internal server error occurred. Retry your request.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

HTTP Status Code: 404

ServiceQuotaExceededException

The number of requests exceeds the service quota. Resubmit your request later.

HTTP Status Code: 402

ThrottlingException

The number of requests exceeds the limit. Resubmit your request later.

HTTP Status Code: 429

ValidationException

Input validation failed. Check your request parameters and retry the request.

HTTP Status Code: 400

Examples

Example request

This example illustrates one usage of UpdateAgentActionGroup.

PUT /agents/AGENT12345/agentversions/1/actiongroups/ACTION1234/ HTTP/1.1 Content-type: application/json { "actionGroupName": "bedrock-temp-actions", "actionGroupState": "ENABLED", "description": "Testing = latest IT Management action", "apiSchema": { "s3": { "s3BucketName": "apischema-s3", "s3ObjectKey": "it_agent_openapi.json" } }, "actionGroupExecutor": { "lambda": "arn:aws:lambda:us-west-2:123456789012:function:ItAgentLambda" } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: