쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

CreateAgentActionGroup - Amazon Bedrock
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

CreateAgentActionGroup

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.

Request Syntax

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

URI Request Parameters

The request uses the following URI parameters.

agentId

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

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

Required: Yes

agentVersion

The version of the agent for which to create 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 or the custom control method for handling the information elicited from the user.

Type: ActionGroupExecutor object

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

Required: No

actionGroupName

The name to give 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

clientToken

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.

Type: String

Length Constraints: Minimum length of 33. Maximum length of 256.

Pattern: ^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,256}$

Required: No

description

A description of 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

Specify a 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.

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 Anthropic 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 created.

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

Create an action group using an OpenAPI schema and a Lambda function

The following example creates an action group using an OpenAPI schema uploaded to an Amazon S3 bucket and sends the information elicited from the user to a Lambda function.

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

Create an action group using an OpenAPI schema and return control

The following example creates an action group using an OpenAPI schema uploaded to an Amazon S3 bucket and returns control by sending the information in the InvokeAgent response.

{ "actionGroupName": "WeatherAPIs", "description": "Actions to get current weather and historical trends for a location", "actionGroupState": "ENABLED", "apiSchema": { "s3": { "s3BucketName": "openapi-spec-iad", "s3ObjectKey": "get_weather_openapi.yaml" } }, "actionGroupExecutor": { "customControl": "RETURN_CONTROL" } }

Create an action group using function details and return control

The following example creates an action group using function details and returns control by sending the information in the InvokeAgent response

PUT /agents/AGENT12345/agentversions/DRAFT/actiongroups/ HTTP/1.1 Content-type: application/json { "actionGroupName": "OrderManagementAction", "description": "Action to get the order history, product details, product availability and to update the order", "actionGroupState": "ENABLED", "actionGroupExecutor": { "customControl": "RETURN_CONTROL" }, "functionSchema": { "functions": [{ "name": "GetOrderDetails", "description": "Retrieves the order history for a given OrderId and returns productId, color, productName, size, productType, quantity, and status." "parameters": { "orderId": { "type": "string", "required": true } } }] } }

See Also

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

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.